问题
Lets say I have 4 applications (app1, app2, app3, app4) running on a WebLogic Server.
I am writing a new web application in Java, that will run on the SAME server, and the purpose of the application will basically be to list all the web applications running on the same server. So, it should list (app1, app2, app3, app4)
Now I know that I can use WLST script to gather the names of all the applications on the server, but I need to access these names in my java application.
Any ideas?
Thanks
回答1:
You will have to use Java Management Extensions (JMX).
JMX is a Java technology that defines standards for implementing management and monitoring of applications, and service oriented networks. These resources are represented by objects called MBeans (ManagedBeans).
Check this example.
来源:https://stackoverflow.com/questions/12081341/find-name-of-all-application-running-on-a-weblogic-server-through-a-java-web-app