Search code examples
javajbossjboss6.xapplication-server

how to get current process name, node name in jboss application server


In WebSphere Application Server we have utility classes like AdminService and AdminFactory and using them we can retrieve cellName, nodename and process name programmatically. is there any API in jboss application server to retrieve such inofrmation. i would like to retrieve process name and current application name.


Solution

  • Please run below code at your context further information check here

        InitialContext ic = new InitialContext();
        String moduleName = (String) ic.lookup("java:module/ModuleName");
        String appName = (String) ic.lookup("java:app/AppName");