wood burning stoves*
The moose likes JBoss/WildFly and the fly likes WAR file deployment and jboss-service.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "WAR file deployment and jboss-service.xml" Watch "WAR file deployment and jboss-service.xml" New topic

WAR file deployment and jboss-service.xml

Reddy Prashanth
Ranch Hand

Joined: Aug 09, 2005
Posts: 61

I am new to JBOSS AS. I am trying to deploy a war file in jboss4.2. I have to define a JMX bean to use in my WAR file (only this war file). Where should I keep my *-service.xml file inside the WAR. Is it possible ??

I came to know that for .SAR files, we can place the file inside META-INF. But I have to use a WAR file.

Could someone please guide me.
Peter Johnson

Joined: May 14, 2008
Posts: 5812

As far as I know, you will have to place the WAR within an EAR and add the *-service.xml file to the EAR also. In addition, the MBean classes would have to be in a separate JAR file within the EAR (they cannot be located within the WAR). Then you will have to add entries to but the application.xml and jboss-app.xml files.

With JBoss AS 5.x, it might be possible to locate the *-service.xml file within WEB-INF or META-INF, but I haven't tried it so am not sure.

JBoss In Action
Reddy Prashanth
Ranch Hand

Joined: Aug 09, 2005
Posts: 61
Thank you Peter.

I'll try this one. But I am trying to find a way to work with only WAR file , not EAR :-). If that doesn't work, I will go with EAR.
subject: WAR file deployment and jboss-service.xml
Similar Threads
Configure Jboss in Ant???
JBoss Basic ThreadPool
Saving files in WAR file
What's the point of an ear file?
how to use MSSQL for JMS