• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to retrieve the Jnp or RMi port of JBoss server

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I am just wondering whether is there any way to retrieve the HOST name, JNP or RMI port where JBoss is running and this app is deployed in the same JBoss.

Regards,
-Amit
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This kind of information can be found in various MBeans. For example, the jboss.system:type=ServerInfo MBeans has a hostName property, and the jboss:service=Naming MBean has a port property. You can use the jmx-console or twiddle to easily scan the mbeans to see which ones contain the information you want, and then have your code query the appropriate mbean properties.
 
amycybs amit
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks peter,

I could browse through the Mbean attributes but couldnt find a proper method to get Attribute rmiPort's value.

This is what I did:

I used MBean: jboss:service=Naming and got all the attributes like port and rmiPort, but still no idea as how to get the value of these attributes.

Any suggestion?

Thanks for the help.

Amit
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess I do not understand your question. What tool are you using to access the MBeans? JMX Console? Twiddle? JMX Console, for example, shows the attribute name and value.
 
amycybs amit
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Peter,

I was writing a JMX client to get these information from the JBoss and was not able to find an proper method in MBean API to get the attribute's value.

I already figured it out and here is the sample:



Thanks for your help.

-Amit
reply
    Bookmark Topic Watch Topic
  • New Topic