How to determine the type and version of the J2ee application server?

I need to find information about the application server my EJBs are running on. System.properties contains a lot of information about Java and the operating system, but I need to know what type of application server and possibly even the version.

Is there a way to get this information in an application-independent way (possibly JMX)?
Alternatively, is there a WebSphere way to get this information?

+3
source share
3 answers

Check out the WAS MBeans that are available. It looks like Server MBean might have some of the information you are looking for.

+1
source

You can try ServletContext.getServerInfo (), although I'm not sure what specific information WebSphere will provide you. On Tomcat, I get a string, for example. "Apache Tomcat / 6.0.16"

+2
source

, .

, ?

0

Source: https://habr.com/ru/post/1729569/


All Articles