7 Replies Latest reply on Jun 24, 2009 9:44 AM by beve

    AS5 changes

    beve

      I've been working on getting ESB4.x working on AS5 and this requires some changes to the codebase apart from the addition of deployers for AS5.

      We have a number of mbeans defined in jbossesb.sar/META-INF/jboss-service.xml. Some of them lookup an mbean named ServerConfig only find out the server data directory or the server tmp directory. This causes problems with AS 5 as the ServerConfig class has changed.
      For AS 5 I've added a property to the mbeans that can be set in the configuration:

      <mbean code="org.jboss.soa.esb.listeners.config.JBoss4ESBDeployer" name="jboss.esb:service=ESBDeployer">
       <attribute name="ServerTempDir">${jboss.server.temp.dir}</attribute>
       <depends>jboss.esb:service=ESBRegistry</depends>
       <depends>jboss.esb:service=JuddiRMI</depends>
      </mbean>
      

      So adding the ServerTmpDir property we can by pass the lookup:
      if (serverTmpDir != null)
      {
       tmpDir = new File(serverTmpDir);
      }
      else
      {
       final ServerConfig config = (ServerConfig) MBeanProxyExt.create(ServerConfig.class, ServerConfigImplMBean.OBJECT_NAME);
       tmpDir = config.getServerTempDeployDir();
      }
      

      This is quite ugly (but can be cleaned up) and it would be cleaner to always use the properties instead. This might cause problems though if users upgrade only jbossesb-rosetta.jar and don't update their configuration files. Leaving this as is will cover both.

      Should we support only properties or both options do you think?



        • 1. Re: AS5 changes
          kconner

          IMO you should move all the MBeans across to properties and force an error if the property is missing, don't bother supporting the current mechanism. It is definitely the cleaner solution and allows people to override the values if they feel it to be necessary.

          Nobody should be updating the jars without also updating the configuration, but the forced error will highlight any missing settings.

          Kev

          • 2. Re: AS5 changes
            kconner

            In fact, to make it more flexible, you could change the property to reflect the actual file/directory being created rather than the data or tmp directories.

            Kev

            • 3. Re: AS5 changes
              beve

               

              In fact, to make it more flexible, you could change the property to reflect the actual file/directory being created rather than the data or tmp directories.

              Do you mean having clearer names of the properties. For example, for the JBoss4ESBDeployer perhaps 'warFilesDir' ?



              • 4. Re: AS5 changes
                kconner

                Yes, that would be the idea. Expose the real purpose, defaulting it to the current values using property substitution, and then people are free to change these to other locations if they choose.

                Does that sound reasonable?

                Kev

                • 5. Re: AS5 changes
                  beve

                   

                  Does that sound reasonable?

                  Sounds good to me. I'll do this now so if anyone objects speak up :)

                  Thanks Kev.



                  • 6. Re: AS5 changes
                    beve

                    Updated the wiki with some information about the changes but mostly about the new deployers for AS 5:
                    http://www.jboss.org/community/wiki/JBossAS5integrationforESB4x

                    • 7. Re: AS5 changes
                      beve

                      This work has now been merged into the main trunk. I've updated the wiki page with some more information and details about how to try this out.

                      http://www.jboss.org/community/wiki/JBossAS5integrationforESB4x

                      Regards,

                      /Daniel