The question: Is there some way to "connect" to a running JVM and change system properties (given by -Dproperty=value) without stopping the JVM and without having programmed a way of doing it?
Now, the context: I have a JBoss server running on a remote machine, which is hosting my application, but also other applications. Those other apps may not be stopped. The server is invoked with a specific -D property that is relevant to my application only. This property was assigned the wrong value at server startup. I need to change that property. The easiest way would be to restart JBoss, but that would cause all apps to go down for some time. Is there a way of changing that property without stopping any applications but my own?
Thank you!
Example found in one of my code:
System.setProperty("javax.net.ssl.trustStore", keystore_file);
You can run it in response for "reconfigure" query (add reconfigure()
to your server code).
Many system properties are only examined on start up so changing them doesn't always help.
I suggest you add support within your application to perform the change via a request so your application will know that it has happened and handle it accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With