10 Replies Latest reply on Apr 4, 2011 9:33 AM by Dave Siracusa

    ESB Hot Deploy Issue w/ System Properties

    Dave Siracusa Newbie

      I specify two config files in system properties.

      Deployed ESBs rely on values in my jboss-esb.xml and jbm-queue.service.xml.

      It works fine when deploying new/updated .ESB files, however properties fails to resolve on a fresh start of SOA-P 5.0.

      If I rename the .ESB to .TMP and back again all is good.

       

      The server.log indicates it loads those two property files in the beginning of the log.

        • 1. Re: ESB Hot Deploy Issue w/ System Properties
          Tom Fennelly Master

          Can you provide an example that demonstrates this please.

          • 2. Re: ESB Hot Deploy Issue w/ System Properties
            Dave Siracusa Newbie

            Upon SOA-P 5.0 restart I get this:

            2010-08-11 08:32:12,240 196860 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main:) Failed to load profile: Summar
            y of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

            DEPLOYMENTS IN ERROR:
              Deployment "vfszip:/C:/ybd/ESB-Tools/jboss-soa-p.5.0.0/jboss-as/server/default/deploy/Quickstart_JMS_Transacted.esb/" is in error due to t
            he following reason(s): java.lang.NumberFormatException: For input string: "${SP_RedeliveryDelay}"

             

            If I rename the .esb file to .tmp, and back again it's happy.

            I also added this to properties-service.xml:

              <mbean code="org.jboss.varia.property.SystemPropertiesService"
              name="jboss:type=Service,name=SystemProperties">

                <attribute name="URLList">
                  conf/test-local-esb.properties
                </attribute>

            </mbean>

             

            The test-local-esb.properties file contains:

            SP_RedeliveryDelay=1000
            SP_dLQMaxResent=5

             

            I moved the properties reference to jboss-service.xml all is well, however I lose the live update.

            • 3. Re: ESB Hot Deploy Issue w/ System Properties
              Magesh Bojan Master

              Can you try adding a depends like this in deployment.xml?

               

              <depends>jboss:type=Service,name=SystemProperties</depends>
              
              • 4. Re: ESB Hot Deploy Issue w/ System Properties
                Dave Siracusa Newbie

                I've spoken to Redhat on this issue, it's a bug.

                • 5. Re: ESB Hot Deploy Issue w/ System Properties
                  Magesh Bojan Master

                  Hi Dave,

                   

                  As a follow up test, I experimented by moving the properties-service.xml to deployers folder and restarted the server and it works now (with the depends tag). Can you try this from your side and let us know? This should behave the same way as it did before and allow you to change the properties at runtime too.

                   

                  However, you should note that modifying the values at runtime does not automatically propogate itself to the ESB deployment. A fix(https://jira.jboss.org/browse/JBESB-2874) is provided in the forthcoming release that will automatically re-deploy the ESB deployment if a dependent service is redeployed/restarted. So, if you modify the properties at runtime, by just invoking stop and then start on the SystemProperties service will propogate the values to the ESB deployment.

                  • 6. Re: ESB Hot Deploy Issue w/ System Properties
                    Poyan Gerami Novice

                    Hello,

                    We have this problem in jboss-soa-p.5.0.0 with included jboss esb 4.7. As you say i can not modify properties at runtime. Is thair any work around for this for esb 4.7 ?

                    If i put my properties service in deploy dir i get some problem in startup (some esb classes runs before the properties service is loaded).  When i put my properties service in deployers dir it work fine in startup but i can not change any values at runtime.

                     

                    Thanks

                    • 7. Re: ESB Hot Deploy Issue w/ System Properties
                      Dave Siracusa Newbie

                      In order to modify properties at runtime you can run twiddle (below) in the bin directory, you must specify the property file as a parameter.

                      Call it for each property file.Afterwards you can touch your .ESB to pickup the changes. 

                       

                      (linux)

                      ./jboss/bin/twiddle.sh -u admin -p admin invoke jboss:name=MySystemProperties,type=Service load conf/local-esb.properties

                      ./jboss/bin/twiddle.sh -u admin -p admin invoke jboss:name=MySystemProperties,type=Service load conf/`hostname`/machine.properties

                       

                      (windows)

                      call twiddle.bat -u admin "                                   "

                      call twiddle.bat -u admin "                                   "

                       

                      To have the properties picked up properly, modify jboss-service.xml as such (below).

                      Note: The system property 'my.host.machine' is specified so I can load a unique file based on hostname.

                      This can be specified via run. If you don't need that specify a fixed folder like the first file.

                       

                      <mbean code="org.jboss.varia.property.SystemPropertiesService"
                        name="jboss:type=Service,name=MySystemProperties">

                          <attribute name="URLList">
                             conf/local-esb.properties,conf/${my.host.machine}/machine.properties
                          </attribute>
                         </mbean>

                      • 8. Re: ESB Hot Deploy Issue w/ System Properties
                        Poyan Gerami Novice

                        Thanks works fine! I could have my properties service in separete *-service.xml file and that work to.

                        • 9. Re: ESB Hot Deploy Issue w/ System Properties
                          Poyan Gerami Novice

                          another problem is hot deploy, we must restart the server for deploying the properties service because we have the service in the deployers folder. Is it possible to get around it somehow?

                          • 10. Re: ESB Hot Deploy Issue w/ System Properties
                            Dave Siracusa Newbie

                            My MySystemProperties is defined in jboss-as/server/all/conf/jboss-service.xml and contains 1 or more external proprty files.

                            Those properties can be changed and reloaded live via twiddle.  Any dependent applications that are configured (xml) w/ system properties would need to be refreshed.  Running code which access system properties should pick up the change.