3 Replies Latest reply on Nov 21, 2008 1:15 AM by jaikiran

    Can Jboss.xml be Externalised ?

    shetty_ritesh

      As Jboss.xml finally becomes part of Binary. Any changes in Jboss.xml results in new .ear
      Is there any way i can externalise values specified in Jboss.xml

      Example if i need to change the JNDI name <destination-jndi-name> in a MDB to a different value without changing the build ? Some thing like a change in deployment file like a property file. IS such a thing available in Jboss 4.0.X servers ?

        • 1. Re: Can Jboss.xml be Externalised ?
          jaikiran

           

          "shetty_ritesh" wrote:


          Example if i need to change the JNDI name <destination-jndi-name> in a MDB to a different value without changing the build ?


          Instead of moving the jboss.xml to some other location, you can use replaceable system properties to configure the destination-jndi-name.

          Here's an example:
          <jboss>
          
           <enterprise-beans>
          
           <message-driven>
           <ejb-name>MyFirstMDB</ejb-name>
           <destination-jndi-name>${myqueue.placeholder}</destination-jndi-name>
           </message-driven>
          
           </enterprise-beans>
          
          
          </jboss>


          Then you can pass the myqueue.placeholder as a java system property as follows

          run.bat -Dmyqueue.placeholder=queue/testQueue


          • 2. Re: Can Jboss.xml be Externalised ?
            shetty_ritesh

            Thanks Jai Kiran, this is exactly what i was expecting.
            But i have one concern. There may be many such configurations that need to be externalised. Can we have something like a properties file from which the jboss picks up the key value pair ?

            • 3. Re: Can Jboss.xml be Externalised ?
              jaikiran

               

              "shetty_ritesh" wrote:
              Can we have something like a properties file from which the jboss picks up the key value pair ?


              http://www.jboss.com/index.html?module=bb&op=viewtopic&t=145915#4190838 something that i learnt just yesterday :-)