File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes jmx management port number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "jmx management port number" Watch "jmx management port number" New topic
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: 3274
    
    5

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: 3274
    
    5

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.
 
Consider Paul's rocket mass heater.
 
subject: jmx management port number
 
Similar Threads
WAS 5.1 Oracle 9.1 clash
please help with running this code
No printing with Win XP and AirPort Extreme
Difference between serverName and host name
JBoss Remote Lookup