How to identify if an application is running on WebLogic or JBoss?

vikash srivastava :

On the basis of which instance an application running (like WebLogic or JBoss), I have to fetch the IP, which is mapped with a different header. So how I can identify programmatically with Java if a webapp is running on WebLogic or JBoss?

Matteo Baldi :

You can try to get the jboss.server.name system property (so you know your app is running in a JBoss container) and the weblogic.Name one (for the WebLogic version).

Ex.

String weblogicServerName = System.getProperty("weblogic.Name");
String jbossServerName = System.getProperty("jboss.server.name");

The one set identify your container.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=151071&siteId=1