简体   繁体   中英

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

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM