8 Replies Latest reply on Aug 23, 2007 10:55 AM by J-C jc

    XML conf && EAR

    J-C jc Apprentice

      I deploy my application as an ear. For that app I need to configure some of JBoss MBeans. When I write this XML file in deploy that works fine.

      I'd like to add the XML config inside the EAR. I have tried to put it at the root of the EAR of in the META-INF directory, XML config files are ignored.

      Is it possible to deploy XML conf file in an EAR ?

      Is there a naming convention for that XML file in an EAR ? (I have triex x-service.xml and jboss-service.xml)

        • 1. Re: XML conf && EAR
          Wolfgang Koppenberger Newbie


          try this:


          • 2. Re: XML conf && EAR
            J-C jc Apprentice

            I have tried to add .sar. Unfortunatelly it does not works.
            Do I have to update the application.xml file ?

            • 3. Re: XML conf && EAR
              Wolfgang Koppenberger Newbie

              Ok. Please give us more information about you system... like:

              - Which jboss version do you run?
              - Have you made any configuration changes in jboss?
              - What means "it does not work..." -> it happen nothing, error, etc...?
              - Do you deploy you .ear inflated or packed?
              - File myapp.ear/META-INF/application.xml
              - File myapp.ear/myapp.sar/META-INF/jboss-service.xml

              • 4. Re: XML conf && EAR
                J-C jc Apprentice


                I just forgot to create the jboss-app.xml file:


                Now with that it works fine.

                Without jboss-app.xml my MBean was not deployed.

                Thanks for the help !

                • 5. Re: XML conf && EAR
                  J-C jc Apprentice

                  Next issue. I wrotte tje jboss-service.xml:

                   <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
                   <arg type="java.lang.String" value="ServerMasterPassword"/>
                   <!-- The opaque master password file used to decrypt the encrypted
                   database password key -->
                   <attribute name="KeyStorePass">{CLASS}org.jboss.security.plugins.FilePassword:${jboss.server.home.dir}/deploy/demo-ear-1.0-SNAPSHOT.ear/toto.sar/META-INF/server.password</attribute>
                   <attribute name="Salt">MySalt</attribute>
                   <attribute name="IterationCount">13</attribute>
                   <depends optional-attribute-name="ManagerServiceName">jboss.security:service=JaasSecurityManager</depends>
                   <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
                   <attribute name="AuthConfig">file:///${jboss.server.home.dir}/deploy/demo-ear-1.0-SNAPSHOT.ear/toto.sar/META-INF/login-config.xml</attribute>
                   <!-- The service which supports dynamic processing of login-config.xml
                   <depends optional-attribute-name="LoginConfigService">
                   <!-- Optionally specify the security mgr service to use when
                   this service is stopped to flush the auth caches of the domains
                   registered by this service.
                   <depends optional-attribute-name="SecurityManagerService">

                  It references two other files:



                  I have tried to use relative path in order not to have the ear name in the file location. File are not found.

                  Is it possible to use relative path for those kinds of attribute ?

                  Where is the base path ?

                  • 6. Re: XML conf && EAR
                    Wolfgang Koppenberger Newbie

                    Take a look at:


                    • 7. Re: XML conf && EAR
                      Wolfgang Koppenberger Newbie

                      But i still don't know what you want to do???

                      If you want to you JAAS for your MBean -> take a look at the files in



                      • 8. Re: XML conf && EAR
                        J-C jc Apprentice

                        Just to explain the context. I use maven2 to build and tests a complete application. It is fully automatic. Tests can be executed on a platform without having to install or configure third party products (except in some cases the database)

                        I have several app that all uses a jboss AS with a default config/customiezation for my organization.

                        In my build process, I install this JBoss AS and then I deploy my config file and my ear. I do not want to overwritte files of my Jboss install. So that when I upgrade the jboss AS, I do not have to check copy/paste file (since there is none).

                        I just want to deploy all MBean required by my application in their own config file. That's why I do not want to modify login-config.xml file.

                        I have used ${jboss.home.url}. Now that it works fine