Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to display list of war versions deployed under Jboss?  RSS feed

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have deployed many different war files in the JBoss server and as a business requirement people from the other team need to see the list of wars deployed under Jboss along with versions of war files like

ABC.war (Maven version) 1.0.0
PQR.war (Maven version) 1.0.0

I am not sure how to read the versions of deployed war files for this requirement.

Please let me know if you have any solution.
 
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are several MBeans that you can query to determine what WARs have been deployed. Some of them go by the context name, others by the WAR file name. Here are some examples (you can find others in the JMX console):

jboss.web.deployment:war=/XXX (where XXX is the context)
jboss.management.local:J2EEApplication=null,J2EEServer=Local,j2eeType=WebModule,name=XXX.war (where XXX is the WAR file name)

As far a version number go, you will have to handle that on your own. If you let Maven add the version number as part of the WAR file name, then you can extract it from there. Otherwise you will have to write some script/code to extract the version number from within the WAR file (assuming that you or Maven placed it in there somewhere).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!