3

I need to detect information about the Application Server my EJBs are running in. The System.properties 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 ?

David Nouls
  • 1,865
  • 12
  • 20
  • 2
    Dupe: http://stackoverflow.com/questions/1745836/determine-which-application-server-our-application-is-deployed-to – BalusC Jan 22 '10 at 14:33

3 Answers3

2

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"

Steve B.
  • 49,740
  • 11
  • 90
  • 128
1

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.

Rick
  • 3,745
  • 1
  • 15
  • 16
0

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

What is the problem you need to solve?

Thorbjørn Ravn Andersen
  • 68,906
  • 28
  • 171
  • 323