Can Java Code tell if it is in an App Server?

Posted by Grasper on Stack Overflow See other posts from Stack Overflow or by Grasper
Published on 2009-03-23T13:54:22Z Indexed on 2010/04/05 12:23 UTC
Read the original article Hit count: 363

Filed under:
|
|
|
|

Is there something I can call from a POJO to see if the code is currently in an App Server or outside of an App Server?

Something like this (In rough PseudoCode):

System.getRunningEnvironment().equals(Environment.Glassfish)

or

System.getRunningEnvironment().equals(Environment.ApplicationServer)

or

System.getRunningEnvironment().equals(Environment.JavaSE)

© Stack Overflow or respective owner

Related posts about java

Related posts about j2ee