| Author |
jmx management port number
|
luri ron
Ranch Hand
Joined: Dec 11, 2008
Posts: 86
|
|
|
how do i change the port number to use the one from my own configuration after the java process start?
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
|
Would you not need to change the port number before the java process started? I'm not sure you can dynamically alter listening port for JMX queries
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
Dawn Charangat
Ranch Hand
Joined: Apr 26, 2007
Posts: 249
|
|
|
you can use the JMXConnection(ip,port,username,password) constructor to do that. Almost always, the u/n and p/w are "admin"
|
 |
luri ron
Ranch Hand
Joined: Dec 11, 2008
Posts: 86
|
|
you meant JMXConnector? but this is for the client side to connect to the server.
i want to change the port number of the server side. when the server is brought up. the default iimplementation of JMX management start the registry on the port number, and i want to see if there is a way to intercept it and use the port number from my config file instead of using the system property from the startup script.
any thought on this? thanks.
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
|
What server are you running? Some servers might allow you to override using a -D runtime property...
|
 |
luri ron
Ranch Hand
Joined: Dec 11, 2008
Posts: 86
|
|
|
we can change the property by doing a System.setProperty, but the JMX already start the registry and doing a bunch of stuff. i want to change the port number before JMX start the registry.
|
 |
 |
|
|
subject: jmx management port number
|
|
|