I just found it:

MBeanServer server = ManagementFactory.getPlatformMBeanServer();
String jvmRoute = (String)server.getAttribute(new
ObjectName("Catalina:type=Engine"), "jvmRoute");

Thanks

2015-05-12 17:53 GMT-05:00 José Luis Cetina <maxtorz...@gmail.com>:

> Is there any way to get the jvmroute value from server.xml
>
> I see this example in JBoos
>
> MBeanServer server = org.jboss.mx.util.MBeanServerLocator.locateJBoss();
>   String jvmRoute = (String)server.getAttribute(new
> ObjectName("jboss.web:type=Engine"), "jvmRoute");
>
>
> Is there a similar way to do this in tomee, is this code a good idea? I
> just want to read the jvmroute
> and append to each user session.
>
> Thanks
>
> --
> -------------------------------------------------------------------
> *José Luis Cetina*
> -------------------------------------------------------------------
>



-- 
-------------------------------------------------------------------
*José Luis Cetina*
-------------------------------------------------------------------

Reply via email to