Meaningless Drivel is fun!*
The moose likes JBoss/WildFly and the fly likes JBoss JMX client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss JMX client" Watch "JBoss JMX client" New topic
Author

JBoss JMX client

Pawan Komaram
Ranch Hand

Joined: Dec 08, 2009
Posts: 91
hi,


I want to connect to JBoss JMX agent programmatically...which means from a java program. I am not able to connect to this agent even locally or remotely using JConsole or JVisualVM. I have put the following entries in the run.conf.bat file to enable the agent for remote access.


Still the agent is not visible to JConsole. The following is the URL I have used to connect the agent from a java program.
service:jmx:rmi:///jndi/rmi://<remotehost-ip>:1234/jmxrmi

My Server is running as a windows service using wrapper.jar
Pawan Komaram
Ranch Hand

Joined: Dec 08, 2009
Posts: 91

I have now connected to JMX agent successfully by just putting the custom port number in the jboss-service.xml under jmx-remoting.sar.

Does anyone how to get the reference to datasource object using this JMX agent?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10239
    
168

Pawan Komaram wrote:
I have now connected to JMX agent successfully by just putting the custom port number in the jboss-service.xml under jmx-remoting.sar.


What exactly did you change? I wouldn't expect any changes to JBoss config files (other than just passing those JVM arguments) for connecting JConsole with a running JBoss AS.

[My Blog] [JavaRanch Journal]
Pawan Komaram
Ranch Hand

Joined: Dec 08, 2009
Posts: 91
I have just put my own port number (1090) in the following XML file .

<JBOSS_HOME>\server\<your-server-name>\deploy\jmx-remoting.sar\META-INF\jboss-service.xml

After changing it the xml looks like this......



After this change I have restarted the server and used the following URL to connect from JConsole as well as from java program. I haven't pass any JVM arguments after this change.......

The URL is
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss JMX client