14 Replies Latest reply on Mar 22, 2007 5:22 PM by Derek Adams

    Big changes in deployment, distribution, and testing

    Bill Burke Master

      Kurt and I have been doing a number of things to leverage the JBoss kernel for ESB and to clean up the overall distribution of JBoss ESB. A lot of sweeping changes have been done for deployment and testing. We've also drastically changed the distribution.

      Here's what we've done so far:

      * ESB Deployer: real packaging and hotdeployment for ESB
      We've written a JBoss Deployer for ESB which allows you to create ESB jar archives or raw esb XML files and deploy them to a JBoss instance. In the old ESB jboss integration, you could only have one jbossesb.xml file. Now you can have multiple deployments. The two deployment options are:

      - a .esb jar archive. This is a regular JAR file with a .esb suffix that has any number of user classes in it. A META-INF/jboss-esb.xml file in the .esb jar archive is required and this defines your providers and services in the current and past XML file format. You may also add a META-INF/classloader.xml file if you want to have classloader scoping for this .esb deployment. The syntax is exactly the same as other classloading configuration of other JBoss components.

      - a xxx-esb.xml file. This is just a raw esb .xml file that defines

      * New .sar files. jbossesb.sar and jbossesb-registry.sar. In the old distribution, everything was in one scoped .sar file. This was not feasible as it required user classes, actions, services, etc. that use ESB to be in the same scoped classloader domain as the esb files. Now, only the jbossesb-registry.sar is scoped for the JAXR and Scout snapshots.

      * Everything is self contained in the .sar files now. There is no special installation step for installing into JBoss AS other than copying the .sar files into the deploy directory. All configuration files are now under jbossesb.sar. This includes juddi and esb property files, and datasource -ds.xml files for juddi and esb.

      * jbossesb.sar now will initialize the juddi and message store database at boot time if they haven't already been initialized. Look in jbossesb.sar/META-INF/jboss-service.xml to see how this is done with a generic DatabaseInitializer service that we wrote.

      * New distribution. JBoss ESB will now have a ESB Server distribution, and a SAR distribution. The ESB Server distribution is the raw JBoss 4.x Kernel configured with basic services that a full blown ESB needs like, database connection pooling, JNDI, juddi, JMS, transactions. FYI, this boots in 11 seconds. Most of the time is in initializing JMS and Tomcat. The SAR distribution is just the esb .sar files, without the server. The idea with the SAR distribution is if you want to deploy onto an existing JBoss AS distribution

      * To build the distribution, I created a new ant file under product/build-distr.xml. After you do ant dist, do a ant -f build-distr.xml This will create a full server distribution under product/build/jbossesb-server-4.0.1.

      * To run the distribution $ cd product/build/jbossesb-server-4.0.1/bin. run.bat or run.sh

      * TESTING. I've incorporated the JBoss Test junit integration that we use in the appserver project. It is really good because it allows you to specify archives/files you want to deploy to a running server for the duration of the tests of that test class. Look at qa/junit/src/org/jboss/soa/esb/server/unit/SimpleDeployUnitTestCase.java.

      * I added an ant target in qa/junit that allows you to run all the tests in a specific directory in the source tree. For example:

      ant -Dtest=server one-test

      will run the SimpleDeployUnitTestCase example I talk about above.

      This target creates junit output into qa/build/reports which another ant target "tests-report-html" can transform into a nice HTML report of all the tests you ran. Eventually we should really port all the tests to this framework so that you can build and run all tests within ESB just by checking out and building ESB.

      Well, I think that is about it. Hopefully I didn't miss anything. If I did, Kurt speak up!!!