Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss JMX client

 
Pawan Komaram
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Pawan Komaram
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic