[jboss-user] [Management, JMX/JBoss] - How to get hostname with jboss_3.2.3

amedina do-not-reply at jboss.com
Mon Jan 29 11:17:19 EST 2007


Hi,
is there any way to get the name of the jboss-server in jboss 3.2.3?
This way fails, but works with 4.0.5. I'm starting jboss with the all config, on deployment I get a ClassDefNotFoundException:MBeanServerConnection.


  | try {
  |         MBeanServerConnection server = (MBeanServerConnection) new InitialContext().lookup("jmx/rmi/RMIAdaptor");
  | 	ObjectName serverInfo = new ObjectName("jboss.system:type=ServerInfo");
  | 	hostName = (String) server.getAttribute(serverInfo, "HostName");
  | } catch (Exception e) {
  | 	//...
  | }
  | 

I'm wondering, cause in javaDoc says, that MBeanServerConnection is implemented since 1.5.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007872#4007872

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007872



More information about the jboss-user mailing list