0 Replies Latest reply on Jan 29, 2007 11:17 AM by Alexander Medina

    How to get hostname with jboss_3.2.3

    Alexander Medina Newbie

      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.