7 Replies Latest reply on Mar 14, 2012 1:59 AM by Hung Huynh

    How to programmatically obtain the release version from JBoss 7 at runtime?

    Kip Moore Newbie

      Pre-JBoss 7, I used to be able to obtain the runtime version from the "jboss.system" MBean programmatically at runtime something like so:

       

      MBeanServer server = ManagementFactory.getPlatformMBeanServer(); 
      Hashtable props = new Hashtable(); 
      props.put("type", "Server"); 
      ObjectName name = new ObjectName("jboss.system", props); 
      String version = (String) (server.getAttribute(name, "Version"));
      

       

      JBoss 7 no longer seems to have this MBean any more, and I'm stumped as to how to get this information again.  Clearly it comes from somewhere as it is displayed in the Administration Console on the default page, but I can't figure out where JBoss 7 keeps this info.  Help?