How can I determine the J2ee application server type and version?

I need to detect information about the Application Server my EJBs are running in. The contain a lot of information about Java and the Operating system, but I need to know what type of application server and if possible even the version.

Is there a way to get this information in an application independent way (JMX maybe) ? Alternatively, is there a WebSphere specific way of getting this information ?


Take a look through the WAS MBeans that are available. It looks like the Server MBean may have some of the info you're looking for.

You could try ServletContext.getServerInfo(), though I'm not sure what specific information WebSphere will give you with that. On Tomcat I get the string e.g. "Apache Tomcat/6.0.16"

There is no guarantee you are allowed to check system properties.

What is the problem you need to solve?

Need Your Help

Cancelling PendingIntent crashes application

java android

I've set an Alarm using PendingIntent and now I want to cancel the alarm. However trying to do so, crashes the entire application.

Gaming server Batch File

windows batch-file cmd

I need a batch file that I can leave running, if "Unturned.exe" is not running to start "" /b "C:\Users\Administrator\Desktop\1.lnk" and then idle and scan and wait for it to shutdown again. like i...