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

    AS5 changes

    Daniel Bevenius Master

      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?