[jboss-svn-commits] JBL Code SVN: r27106 - in labs/jbossesb/trunk: product and 107 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Jun 24 03:07:47 EDT 2009


Author: beve
Date: 2009-06-24 03:07:46 -0400 (Wed, 24 Jun 2009)
New Revision: 27106

Added:
   labs/jbossesb/trunk/product/ftp/src/main/resources/META-INF/jboss-classloading.xml
   labs/jbossesb/trunk/product/ftp/src/main/resources/META-INF/jboss-structure.xml
   labs/jbossesb/trunk/product/install/esb-deployers-jboss-beans.xml
   labs/jbossesb/trunk/product/install/jboss-service-jbossas5.xml
   labs/jbossesb/trunk/product/install/jboss-structure.xml
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/util/JBossDeployerUtil.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployer.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployment.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeploymentMBean.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbMetaData.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployer.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWsdlDeployer.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/overview.html
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/util/
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/util/VfsUtil.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.xml
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.xml
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbExtensionProvider.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbStructure.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.xml
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestClassLoaderDeployer.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestUtil.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/actionArtifactMap.properties
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/esb-archive.esb
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/deployment.xml
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/jboss-esb.xml
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/request.xsd
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/util/
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/util/VfsUtilUnitTest.java
   labs/jbossesb/trunk/product/samples/quickstarts/native_client/war/resources/WEB-INF/jboss-web.xml
   labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice/lib/commons-httpclient-3.0.1.jar
   labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice_inonly/lib/commons-httpclient-3.0.1.jar
   labs/jbossesb/trunk/product/samples/quickstarts/scripting_chain/jboss-structure.xml
   labs/jbossesb/trunk/product/samples/quickstarts/spring_aop/jboss-structure.xml
   labs/jbossesb/trunk/product/samples/quickstarts/spring_aop/lib/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer1/war/resources/WEB-INF/jboss-web.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer2/war/resources/WEB-INF/jboss-web.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise/war/resources/WEB-INF/jboss-web.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise2/war/resources/WEB-INF/jboss-web.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise3/war/resources/WEB-INF/jboss-web.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise4/war/resources/WEB-INF/jboss-web.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/META-INF/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/META-INF/standard-jaxws-client-config.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHRequest.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHResponse.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageRequest.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageResponse.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpoint.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpointBean.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMProtocolHandler.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceRequest.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceResponse.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/XOPSupport.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/MTOMClient.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/jboss.png
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/war/resources/WEB-INF/jboss-web.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/ServerHandler.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpoint.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpointImpl.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/ClientHandler.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/WSAClient.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/jaxws-handlers.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/war/resources/WEB-INF/jboss-web.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/jboss-web.xml
   labs/jbossesb/trunk/product/services/jbossesb/src/main/resources/META-INF/jboss-scanning.xml
   labs/jbossesb/trunk/product/services/jbpm/src/main/resources/META-INF/jboss-scanning.xml
   labs/jbossesb/trunk/product/services/jbrules/src/main/resources/META-INF/jboss-scanning.xml
   labs/jbossesb/trunk/product/services/jbrules/src/main/resources/META-INF/jboss-structure.xml
   labs/jbossesb/trunk/product/services/slsb/src/main/resources/META-INF/jboss-structure.xml
   labs/jbossesb/trunk/product/services/smooks/src/main/resources/META-INF/jboss-scanning.xml
   labs/jbossesb/trunk/product/services/smooks/src/main/resources/META-INF/jboss-structure.xml
   labs/jbossesb/trunk/product/services/soap/src/main/resources/META-INF/jboss-scanning.xml
   labs/jbossesb/trunk/product/services/soap/src/main/resources/META-INF/jboss-structure.xml
   labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-scanning.xml
   labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-service-as5.xml
   labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-structure.xml
   labs/jbossesb/trunk/product/services/spring/lib/ext/cglib-nodep-2.1_3.jar
   labs/jbossesb/trunk/product/services/spring/src/main/resources/META-INF/jboss-scanning.xml
   labs/jbossesb/trunk/product/services/spring/src/main/resources/META-INF/jboss-structure.xml
   labs/jbossesb/trunk/product/tools/console/management-esb/src/main/resources/jbossesbmanagement-service-as5.xml
   labs/jbossesb/trunk/qa/junit/resources/server/simple-scoped/META-INF/jboss-classloading.xml
   labs/jbossesb/trunk/testlib/commons-httpclient-3.0.1.jar
Removed:
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployer.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployment.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeploymentMBean.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbMetaData.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployer.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWsdlDeployer.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/overview.html
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JmsRouterIntegrationTest.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.xml
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.xml
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbExtensionProvider.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbStructure.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.xml
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestUtil.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/actionArtifactMap.properties
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/esb-archive.esb
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/deployment.xml
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/jboss-esb.xml
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/request.xsd
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/META-INF/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/META-INF/standard-jaxws-client-config.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHRequest.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHResponse.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageRequest.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageResponse.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpoint.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpointBean.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMProtocolHandler.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceRequest.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceResponse.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/XOPSupport.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/MTOMClient.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/jboss.png
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/ServerHandler.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpoint.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpointImpl.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/ClientHandler.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/WSAClient.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/jaxws-handlers.xml
Modified:
   labs/jbossesb/trunk/
   labs/jbossesb/trunk/product/.project
   labs/jbossesb/trunk/product/build-distr.xml
   labs/jbossesb/trunk/product/build.xml
   labs/jbossesb/trunk/product/esb-config.xml
   labs/jbossesb/trunk/product/ftp/src/main/java/org/jboss/ftp/FTPServer.java
   labs/jbossesb/trunk/product/install/build.xml
   labs/jbossesb/trunk/product/install/embedded-console/esb-console.war
   labs/jbossesb/trunk/product/install/jboss-service.xml
   labs/jbossesb/trunk/product/ivy-build.xml
   labs/jbossesb/trunk/product/ivy.xml
   labs/jbossesb/trunk/product/rosetta/aop/resources/META-INF/jboss-aop.xml
   labs/jbossesb/trunk/product/rosetta/build.xml
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseMBean.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/JuddiRMIService.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/JuddiRMIServiceMBean.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyServiceMBean.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployerMBean.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/jca/JBoss42ActivationBridge.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/ManagedLifecycleController.java
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java
   labs/jbossesb/trunk/product/rosetta/tests/build.xml
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JMSRouterUnitTest.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetterUnitTest.java
   labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/FileGatewayListenerUnitTest.java
   labs/jbossesb/trunk/product/samples/quickstarts/conf/base-build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/db-service.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_hibernate_action/jbm-queue-service.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_hibernate_action/jbmq-queue-service.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbm-queue-service.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbmq-queue-service.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_topic_notifier/jboss-esb-unfiltered.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_tx_sql_action/quickstart-ds.xml
   labs/jbossesb/trunk/product/samples/quickstarts/jms_transacted/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/load_generator/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/messagefilter/readme.txt
   labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice_inonly/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice_inonly/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SOAPTest.java
   labs/jbossesb/trunk/product/samples/quickstarts/spring_jpetstore/readme.txt
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise/listener.log
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise2/listener.log
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise3/listener.log
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise4/listener.log
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/build.xml
   labs/jbossesb/trunk/product/services/base-project-build.xml
   labs/jbossesb/trunk/product/services/jbpm/src/main/resources/jbpm-ds.xml
   labs/jbossesb/trunk/product/services/jbpm/src/main/resources/jbpm-service.xml
   labs/jbossesb/trunk/product/services/soapui-client/build.xml
   labs/jbossesb/trunk/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java
   labs/jbossesb/trunk/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBean.java
   labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-service.xml
   labs/jbossesb/trunk/product/tools/console/management-esb/build.xml
   labs/jbossesb/trunk/product/tools/console/management-web/web.xml
   labs/jbossesb/trunk/qa/base-cp.xml
   labs/jbossesb/trunk/qa/build.xml
   labs/jbossesb/trunk/qa/junit/build.xml
   labs/jbossesb/trunk/qa/junit/resources/server/jbpmReply/META-INF/deployment.xml
   labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/jbpmReply/JbpmReplyUnitTest.java
   labs/jbossesb/trunk/qa/quickstarts/build.xml
Log:
Work for https://jira.jboss.org/jira/browse/JBESB-2245 "Investigate support for AS 5"



Property changes on: labs/jbossesb/trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /labs/jbossesb/workspace/dbevenius/jbossas5:1-25583
   + /labs/jbossesb/workspace/dbevenius/jbossas5:1-27101

Modified: labs/jbossesb/trunk/product/.project
===================================================================
--- labs/jbossesb/trunk/product/.project	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/.project	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>JBossESB-CP4.4_NEW</name>
+	<name>JBossESB-AS5</name>
 	<comment></comment>
 	<projects>
 	</projects>

Modified: labs/jbossesb/trunk/product/build-distr.xml
===================================================================
--- labs/jbossesb/trunk/product/build-distr.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/build-distr.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -4,8 +4,6 @@
 
 	<property file="skip.properties"/>
     
-    <!-- Load Build Properties File -->
-    <property file="${org.jboss.esb.properties}"/>
 
     <property name="build.dir" value="build"/>
     <property name="lib.dir" value="build/lib"/>
@@ -14,37 +12,50 @@
     <property name="services.dir" value="services"/>
     <property name="build.lib.dir" value="${build.dir}/jbossesb/lib"/>
     <property name="version" value="4.2.MR1"/>
-    <property name="esbserver.dist.dir" value="${build.dir}/jbossesb-server-${version}"/>
     <property name="installation.files.dir" value="install"/>
+	
+    <!-- Load Build Properties File -->
+    <property file="${org.jboss.esb.properties}"/>
+	
+	<echo message="org.jboss.esb.server.home=${org.jboss.esb.server.home}"/>
+	<echo message="esbserver.dist.dir=${esbserver.dist.dir}"/>
+	<condition property="esbserver.dist.dir" value="${org.jboss.esb.server.home}" else="${build.dir}/jbossesb-server-${version}">
+        <isset property="org.jboss.esb.server.home"/>
+    </condition>
+	<echo message="esbserver.dist.dir=${esbserver.dist.dir}"/>
+	
+	<condition property="skip.server.unzip" value="true">
+	        <available file="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deployers"/>
+    </condition>
 
     <target name="dist" depends="server.dist, copy.esbserver.files" />
 
     <target name="copy.esbserver.files" unless="skip.server.esb">
-        <copy todir="${esbserver.dist.dir}/docs" failonerror="false">
+        <copy todir="${org.jboss.esb.server.home}/docs" failonerror="false">
             <fileset dir="${build.dir}/jbossesb/docs">
                 <include name="**/*"/>
             </fileset>
         </copy>
-        <copy todir="${esbserver.dist.dir}" failonerror="false">
+        <copy todir="${org.jboss.esb.server.home}" failonerror="false">
             <fileset dir="${build.dir}/jbossesb">
                 <include name="javadocs/**/*"/>
             </fileset>
         </copy>
-        <copy todir="${esbserver.dist.dir}" failonerror="false">
+        <copy todir="${org.jboss.esb.server.home}" failonerror="false">
             <fileset dir="${build.dir}/jbossesb">
                 <include name="samples/**/*"/>
             </fileset>
         </copy>
-        <copy todir="${esbserver.dist.dir}" failonerror="false">
+        <copy todir="${org.jboss.esb.server.home}" failonerror="false">
             <fileset dir="${build.dir}/jbossesb">
                 <include name="tools/**/*"/>
             </fileset>
         </copy>
-        <copy todir="${esbserver.dist.dir}/docs/schema">
+        <copy todir="${org.jboss.esb.server.home}/docs/schema">
             <fileset dir="${build.dir}/jbossesb/xml/"
-                includes="jbossesb-1.0.1.xsd jbossesb-1.1.0.xsd"/>
+                includes="jbossesb-1.0.1.xsd jbossesb-1.1.0.xsd jbossesb-1.2.0.xsd"/>
         </copy>
-        <copy todir="${esbserver.dist.dir}">
+        <copy todir="${org.jboss.esb.server.home}">
             <fileset dir="${build.dir}/jbossesb">
                 <include name="*.txt"/>
             </fileset>
@@ -63,7 +74,7 @@
         </ant>
     </target>
 
-    <target name="unpack.server.zip" unless="skip.server.esb">
+    <target name="unpack.server.zip" unless="skip.server.unzip">
         <delete dir="${esbserver.dist.dir}"/>
         <unzip src="${installation.files.dir}/standalone/jbossesb-server-base.zip" dest="${build.dir}"/>
 		<chmod dir="${build.dir}/jbossesb-server/bin" perm="ugo+rx" includes="*.sh"/>

Modified: labs/jbossesb/trunk/product/build.xml
===================================================================
--- labs/jbossesb/trunk/product/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -39,6 +39,9 @@
 	<!-- JBoss ESB version -->
 	<property name="version" value="4.5.GA"/>
 	<property name="esb.server.name" value="jbossesb-server-${version}"/>
+	<condition property="esbserver.dist.dir" value="${org.jboss.esb.server.home}" else="${basedir}/build/jbossesb-server-${version}">
+        <isset property="org.jboss.esb.server.home"/>
+    </condition>
 	<property name="esbserver.dist.dir" value="${org.jboss.esb.internal.dest}/${esb.server.name}"/>
 
 	<!-- Set internal property defaults -->
@@ -534,8 +537,14 @@
 	
 	<target name="stop-server" depends="esb.init">
 		<stop-server serverHome="${org.jboss.esb.server.home}"/>
-		<wait-on-shutdown serverHome="${org.jboss.esb.server.home}"
-			serverConfig="${org.jboss.esb.test.server.config}"/>
+		<condition property="shutDownString" value="Shutdown complete" else="[org.jboss.system.server.Server] Shutdown complete">
+            <available file="${org.jboss.esb.server.home}/server/${org.jboss.esb.test.server.config}/deployers"/>
+        </condition>
+
+        <wait-on-shutdown serverHome="${org.jboss.esb.server.home}"
+            serverConfig="${org.jboss.esb.test.server.config}" 
+            shutDownString="${shutDownString}"
+        />
 	</target>
 
     <target name="instr-report">

Modified: labs/jbossesb/trunk/product/esb-config.xml
===================================================================
--- labs/jbossesb/trunk/product/esb-config.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/esb-config.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -9,7 +9,7 @@
     <property name="esb.ftp.server.location" location="${esb.ftp.location}/build"/>
     <property name="esb.ftp.server.name" value="ftp-server.sar"/>
 
-    <property name="agent.jvmarg" value=""/>
+     <property name="agent.jvmarg" value="-Xms128m -Xmx512m -XX:PermSize=200m -XX:MaxPermSize=500m"/>
     <property name="org.jboss.esb.server.config" value="default"/>
 	
 	<condition property="esb.ftp.config.all">
@@ -46,12 +46,14 @@
     	<attribute name="serverConfig"/>
     	<element name="serverElements" implicit="yes" optional="true"/>
         <sequential>
-	    	<echo message="Starting local ESB server"/>
+	    	<echo message="Starting local ESB server: @{serverHome}/server/@{serverConfig}"/>
+            <echo message="java.endorsed.dirs : ${server.endorsed}"/>
             <java classname="org.jboss.Main" fork="true" spawn="true"
                 dir="@{serverHome}/bin">
                 <classpath refid="server.classpath"/>
                 <jvmarg line="${agent.jvmarg}"/>
                 <jvmarg line="-Djava.endorsed.dirs=${server.endorsed}"/>
+                <jvmarg line="-Dxb.builder.useUnorderedSequence=true"/>
                 <arg value="-c"/>
                 <arg value="@{serverConfig}"/>
             	<serverElements/>
@@ -60,24 +62,24 @@
     </macrodef>
     
 	<macrodef name="stop-server">
-    	<attribute name="serverHome"/>
-		<sequential>
-	    	<echo message="Stopping local ESB server"/>
-	        <java classname="org.jboss.Shutdown" fork="true"
-	    	    dir="@{serverHome}/bin">
-	            <classpath>
-	        	    <pathelement location="@{serverHome}/bin/shutdown.jar"/>
-	                <pathelement location="@{serverHome}/client/jbossall-client.jar"/>
-	            </classpath>
-	            <arg value="--server"/>
-	            <arg value="jnp://localhost:1099"/>
-	            <arg value="--shutdown"/>
-	        </java>
-	    </sequential>
-	</macrodef>
+        <attribute name="serverHome"/>
+        <sequential>
+            <echo message="Stopping local ESB server"/>
+            <java classname="org.jboss.Shutdown" fork="true"
+                dir="@{serverHome}/bin">
+                <classpath>
+                    <pathelement location="@{serverHome}/bin/shutdown.jar"/>
+                    <pathelement location="@{serverHome}/client/jbossall-client.jar"/>
+                </classpath>
+                <arg value="--server"/>
+                <arg value="jnp://localhost:1099"/>
+                <arg value="--shutdown"/>
+            </java>
+        </sequential>
+    </macrodef>
 	
     <macrodef name="wait-on-server">
-        <attribute name="seconds" default="120"/>
+        <attribute name="seconds" default="180"/>
         <sequential>
             <echo message="Waiting for ESB server to start..."/>
             <waitfor maxwait="@{seconds}" maxwaitunit="second" checkevery="5" checkeveryunit="second" timeoutproperty="startup.timeout">
@@ -88,25 +90,34 @@
     </macrodef>
     
     <macrodef name="wait-on-shutdown">
-    	<attribute name="serverHome"/>
-    	<attribute name="serverConfig"/>
+        <attribute name="serverHome"/>
+        <attribute name="serverConfig"/>
         <attribute name="seconds" default="120"/>
+        <attribute name="shutDownString" default="[org.jboss.system.server.Server] Shutdown complete"/>
         <sequential>
             <tstamp>
                 <format property="shutdown.time" pattern="yyyy-MM-dd HH:mm:ss z"/>
             </tstamp>
             <echo message="${shutdown.time}: waiting for ESB server to stop, checking file @{serverHome}/server/@{serverConfig}/log/server.log ..."/>
             <waitfor maxwait="@{seconds}" maxwaitunit="second" checkevery="5" checkeveryunit="second" timeoutproperty="shutdown.timeout">
-            	<isfileselected file="@{serverHome}/server/@{serverConfig}/log/server.log">
-                    <contains text="[org.jboss.system.server.Server] Shutdown complete"/>
-            	</isfileselected>
-	        </waitfor>
-	        <fail message="Timeout waiting for ESB server to shutdown." if="shutdown.timeout"/>
-	    </sequential>
-	</macrodef>
+                <isfileselected file="@{serverHome}/server/@{serverConfig}/log/server.log">
+                    <contains text="@{shutDownString}"/>
+                </isfileselected>
+            </waitfor>
+            <fail message="Timeout waiting for ESB server to shutdown." if="shutdown.timeout"/>
+			<!-- When AS5 is the appserver JBM can block on a receive which will timeout but this will also delay the shutdown of the server
+				 which is the reason for this additional delay
+			-->
+            <waitfor maxwait="20" maxwaitunit="second">
+				<available file="bogusfile.bogus"/>
+			</waitfor>
+        </sequential>
+    </macrodef>
 
     <!-- Configuring an app server installation -->
     <target name="esb.init-app-server" if="org.jboss.esb.server.home">
+        <echo message="Using set org.jboss.esb.server.home : ${org.jboss.esb.server.home}"/>
+        <echo message="Using set org.jboss.esb.server.config : ${org.jboss.esb.server.config}"/>
         <property name="org.jboss.esb.test.server.config" value="test-esb"/>
     	<condition property="esb.server.config.nameclash">
 		<and>
@@ -129,6 +140,9 @@
         <condition property="org.jboss.soa.esb.qa.jmsprovider" value="jbm">
             <available file="${esb.server.deploy.dir}/jboss-messaging.sar"/>
         </condition>
+        <condition property="org.jboss.soa.esb.qa.jmsprovider" value="jbm">
+            <available file="${esb.server.deploy.dir}/messaging"/>
+        </condition>
 
         <condition property="org.jboss.soa.esb.qa.jmsprovider" value="jbmq">
             <available file="${esb.server.deploy.dir}/jms/jbossmq-service.xml"/>
@@ -139,6 +153,17 @@
     	
         <fail unless="org.jboss.soa.esb.qa.jmsprovider" message="Could not determine server messaging subsystem"/>
     	<property name="org.jboss.esb.server.config.appserver" value="true"/>
+    	
+    	<!-- Check for JBossAS5 -->
+        <condition property="jbossas5">
+            <available file="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deployers"/>
+        </condition>
+        <!-- Check for JBossAS4.x -->
+        <condition property="jbossas4">
+            <not>
+                <available file="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deployers"/>
+            </not>
+        </condition>
 	</target>
 	
 	<target name="esb.configure-app-server" unless="soa.test.no-prepare" if="org.jboss.esb.server.config.appserver">

Modified: labs/jbossesb/trunk/product/ftp/src/main/java/org/jboss/ftp/FTPServer.java
===================================================================
--- labs/jbossesb/trunk/product/ftp/src/main/java/org/jboss/ftp/FTPServer.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/ftp/src/main/java/org/jboss/ftp/FTPServer.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -48,8 +48,7 @@
       URL properties = Thread.currentThread().getContextClassLoader().getResource("res/conf/ftpd.properties");
       PathSubstitutionPropertiesConfiguration config = new PathSubstitutionPropertiesConfiguration(properties.openStream());
 
-      URI uri = properties.toURI();
-      File file = new File(uri);
+      File file = new File(properties.getFile());
       String path = file.getParentFile().getParentFile().getParentFile().toString();
       if (!path.endsWith("/")) path += "/";
 

Copied: labs/jbossesb/trunk/product/ftp/src/main/resources/META-INF/jboss-classloading.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/ftp/src/main/resources/META-INF/jboss-classloading.xml)
===================================================================
--- labs/jbossesb/trunk/product/ftp/src/main/resources/META-INF/jboss-classloading.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/ftp/src/main/resources/META-INF/jboss-classloading.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,2 @@
+<classloading xmlns="urn:jboss:classloading:1.0" domain="ftpserver.sar" parent-first="false" />
+

Copied: labs/jbossesb/trunk/product/ftp/src/main/resources/META-INF/jboss-structure.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/ftp/src/main/resources/META-INF/jboss-structure.xml)
===================================================================
--- labs/jbossesb/trunk/product/ftp/src/main/resources/META-INF/jboss-structure.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/ftp/src/main/resources/META-INF/jboss-structure.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,15 @@
+<structure>
+    <context>
+        <path name=""/>
+        <metaDataPath>
+            <path name="META-INF"/>
+            <path name=""/>
+        </metaDataPath>
+        <classpath>
+            <path name=""/>
+            <path name=""  suffixes=".jar"/>
+            <path name="lib"  suffixes=".jar"/>
+            <path name="res/conf" suffixes=".properties"/>
+        </classpath>
+    </context>
+</structure>

Modified: labs/jbossesb/trunk/product/install/build.xml
===================================================================
--- labs/jbossesb/trunk/product/install/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/install/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -31,6 +31,17 @@
             <isset property="hierarchy.jbossesb"/>
           </or>
         </condition>
+	
+	<!-- Check for JBossAS5 -->
+    <condition property="jbossas5">
+        <available file="${server.dir}/deployers"/>
+    </condition>
+    <!-- Check for JBossAS4.x -->
+    <condition property="jbossas4">
+        <not>
+            <available file="${server.dir}/deployers"/>
+        </not>
+    </condition>
 
         <fail unless="hierarchy.recognised" message="Cannot determine build hierarchy"/>
 
@@ -51,7 +62,7 @@
 
         <target name="dependencies" depends="dependencies.source, dependencies.jbossesb"/>
 
-	<target name="deploy"   depends="internal.deploy, deploy.bindings"   description="Wrapper for internal.deploy"/>
+	<target name="deploy" depends="internal.deploy, internal.deploy.jbossas5, deploy.bindings"   description="Wrapper for internal.deploy"/>
 
 	<target name="check.tomcat.props">
 		<fail unless="org.jboss.esb.tomcat.home" message="Cannot determine target deployment, please check deployment.properties"/>
@@ -60,11 +71,14 @@
 	<target name="tomcat"   depends="check.tomcat.props, dependencies, tomcat.compile, tomcat.war.all.deploy"  description="Wrapper for tomcat.war.all.deploy"/>
 	
         <target name="jms.config.check">
+			<echo message="deploy.dir : ${deploy.dir}"/>
           <available property="jbm.present"
             file="${deploy.dir}/jboss-messaging"/>
           <available property="jbm.present"
             file="${deploy.dir}/jboss-messaging.sar"/>
-          <available property="jbmq.present"
+          <available property="jbm.present"
+            file="${deploy.dir}/messaging"/>
+          <available property="jbm.present"
             file="${deploy.dir}/jms/jbossmq-service.xml"/>
           <available property="jbmq.present"
             file="${hadeploy.dir}/jms/jbossmq-service.xml"/>
@@ -101,86 +115,230 @@
 		<fail unless="esb.server.configured" message="Cannot determine target deployment, please check deployment.properties"/>
 	</target>
 	
-        <target name="internal.deploy" depends="check.deploy.props, dependencies, jms.config" description="Deploys Internal Services to the server">
-          <!-- jbossesb.sar -->
-          <copy todir="${deploy.dir}/jbossesb.sar">
-            <fileset dir="${org.jboss.esb.dist.lib}/jbossesb.sar"/>
-          </copy>
+	<target name="internal.deploy" if="jbossas4" depends="check.deploy.props, dependencies, jms.config" description="Deploys Internal Services to the server">
+	        
+	        <!-- jbossesb.sar -->
+	        <copy todir="${deploy.dir}/jbossesb.sar">
+	            <fileset dir="${org.jboss.esb.dist.lib}/jbossesb.sar"/>
+	        </copy>
 
-          <!-- jbossesb.esb -->
-          <copy todir="${deploy.dir}/jbossesb.esb">
-            <fileset dir="${org.jboss.esb.dist.lib}/jbossesb.esb"
-              excludes="${messaging.excludes}"/>
-          </copy>
+	        <!-- jbossesb.esb -->
+	        <copy todir="${deploy.dir}/jbossesb.esb">
+	            <fileset dir="${org.jboss.esb.dist.lib}/jbossesb.esb" excludes="${messaging.excludes}"/>
+	        </copy>
 
-          <!-- jbpm.esb -->
-          <copy todir="${deploy.dir}/jbpm.esb">
-            <fileset dir="${org.jboss.esb.dist.lib}/jbpm.esb"
-              excludes="${messaging.excludes}"/>
-          </copy>
+	        <!-- jbpm.esb -->
+	        <copy todir="${deploy.dir}/jbpm.esb">
+	            <fileset dir="${org.jboss.esb.dist.lib}/jbpm.esb" excludes="${messaging.excludes}"/>
+	        </copy>
 
-          <!-- jbrules.esb -->
-          <copy todir="${deploy.dir}/jbrules.esb">
-            <fileset dir="${org.jboss.esb.dist.lib}/jbrules.esb"
-              excludes="${messaging.excludes}"/>
-          </copy>
+	        <!-- jbrules.esb -->
+	        <copy todir="${deploy.dir}/jbrules.esb">
+	            <fileset dir="${org.jboss.esb.dist.lib}/jbrules.esb" excludes="${messaging.excludes}"/>
+	        </copy>
 
-          <!-- smooks.esb -->
-          <copy todir="${deploy.dir}/smooks.esb">
-            <fileset dir="${org.jboss.esb.dist.lib}/smooks.esb"
-              excludes="${messaging.excludes}"/>
-          </copy>
+	        <!-- smooks.esb -->
+	        <copy todir="${deploy.dir}/smooks.esb">
+	        <fileset dir="${org.jboss.esb.dist.lib}/smooks.esb" excludes="${messaging.excludes}"/>
+	        </copy>
 
-          <!-- spring.esb -->
-          <copy todir="${deploy.dir}/spring.esb">
-            <fileset dir="${org.jboss.esb.dist.lib}/spring.esb"
-              excludes="${messaging.excludes}"/>
-          </copy>
+	        <!-- spring.esb -->
+	        <copy todir="${deploy.dir}/spring.esb">
+	            <fileset dir="${org.jboss.esb.dist.lib}/spring.esb" excludes="${messaging.excludes}"/>
+	        </copy>
 
-          <!-- soap.esb -->
-          <copy todir="${deploy.dir}/soap.esb">
-            <fileset dir="${org.jboss.esb.dist.lib}/soap.esb"
-              excludes="${messaging.excludes}"/>
-            <!-- hack for wise import -->
-            <fileset dir="${client.dir}"
-              includes="jboss-jaxws.jar jaxb-api.jar jaxb-impl.jar"/>
-          </copy>
-        	
-       	 <!-- slsb.esb -->
-         <copy todir="${deploy.dir}/slsb.esb">
-           <fileset dir="${org.jboss.esb.dist.lib}/slsb.esb"
-            excludes="${messaging.excludes}"/>
-         </copy>
+	        <!-- soap.esb -->
+	        <copy todir="${deploy.dir}/soap.esb"> 
+	            <fileset dir="${org.jboss.esb.dist.lib}/soap.esb" excludes="${messaging.excludes}, META-INF/jboss-structure.xml"/>
+	            <fileset dir="${client.dir}" includes="jboss-jaxws.jar jaxb-api.jar jaxb-impl.jar"/>
+	        </copy>
+	            
+	        <!-- slsb.esb -->
+	        <copy todir="${deploy.dir}/slsb.esb">
+	            <fileset dir="${org.jboss.esb.dist.lib}/slsb.esb" excludes="${messaging.excludes}"/>
+	        </copy>
 
-          <!-- soapui-client.sar -->
-          <copy todir="${deploy.dir}/soapui-client.sar">
-              <fileset dir="${org.jboss.esb.dist.lib}/soapui-client.sar" excludes="${messaging.excludes}"/>
-          </copy>
+	        <!-- soapui-client.sar -->
+	        <copy todir="${deploy.dir}/soapui-client.sar">
+	            <fileset dir="${org.jboss.esb.dist.lib}/soapui-client.sar" excludes="${messaging.excludes}, META-INF/jboss-service-as5.xml"/>
+	        </copy>
 
-          <!-- contracts app -->
-          <copy file="${org.jboss.esb.dist}/tools/console/console/jboss-esb-console.ear/contract.war" todir="${deploy.dir}" />
+	        <!-- contracts app -->
+	        <copy file="${org.jboss.esb.dist}/tools/console/console/jboss-esb-console.ear/contract.war" todir="${deploy.dir}" />
 
-          <!-- install h2 jar -->
-          <copy file="${org.jboss.esb.dist.lib}/h2-1.0.68.jar" todir="${server.lib.dir}"/>
+	        <!-- install h2 jar -->
+	        <copy file="${org.jboss.esb.dist.lib}/h2-1.0.68.jar" todir="${server.lib.dir}"/>
 
-	 <!-- embedded jopr console -->
-	  <ant dir="embedded-console" target="replace">
-                <property name="org.jboss.esb.server.home" value="${org.jboss.esb.server.home}"/>
-                <property name="org.jboss.esb.server.config" value="${org.jboss.esb.server.config}"/>
-	  </ant>
+	        <!-- embedded jopr console -->
+	        <ant dir="embedded-console" target="replace">
+	            <property name="org.jboss.esb.server.home" value="${org.jboss.esb.server.home}"/>
+	            <property name="org.jboss.esb.server.config" value="${org.jboss.esb.server.config}"/>
+	        </ant>
 
+	        <ant dir="jbpm-patch" target="replace">
+	            <property name="org.jboss.esb.server.home" value="${org.jboss.esb.server.home}"/>
+	            <property name="org.jboss.esb.server.config" value="${org.jboss.esb.server.config}"/>
+	        </ant> 
+	        
+	        <ant dir="${product.dir}/tools/console/management-esb" target="deploy">
+	            <property name="org.jboss.esb.server.home" value="${org.jboss.esb.server.home}"/>
+	            <property name="org.jboss.esb.server.config" value="${org.jboss.esb.server.config}"/>
+	        </ant> 
 
-	  <ant dir="jbpm-patch" target="replace">
-		<property name="org.jboss.esb.server.home" value="${org.jboss.esb.server.home}"/>
-		<property name="org.jboss.esb.server.config" value="${org.jboss.esb.server.config}"/>
-          </ant> 
-	  <ant dir="${product.dir}/tools/console/management-esb" target="deploy">
-		<property name="org.jboss.esb.server.home" value="${org.jboss.esb.server.home}"/>
-		<property name="org.jboss.esb.server.config" value="${org.jboss.esb.server.config}"/>
-          </ant> 
+	    </target>
+	
+	<target name="internal.deploy.jbossas5" if="jbossas5" depends="check.deploy.props, dependencies, jms.config" description="Deploys Internal Services to the JBossAS5">
+		<echo message="Deploy to JBossAS5"/>
+		
+		<!-- jbossesb deployer -->
+        <property name="deployers.dir" value="${server.dir}/deployers"/>
+        <mkdir dir="${deployers.dir}/esb.deployer"/>
+		        
+        <copy todir="${deployers.dir}/esb.deployer/lib" overwrite="true">
+            <fileset dir="${org.jboss.esb.dist.lib}/jbossesb.sar/lib">
+                <include name="jbossesb-rosetta.jar"/>
+            	<include name="jbossesb-config-model-1.0.1.jar"/>
+                <include name="jbossesb-config-model-1.1.0.jar"/>
+                <include name="commons-lang-2.1.jar"/>
+                <include name="commons-net-2.0.0-652071.jar"/>
+                <include name="commons-ssl-0.3.4.jar"/>
+                <include name="commons-io-1.3.jar"/>
+                <include name="groovy-all-1.5.0.jar"/>
+                <include name="jbossts-common.jar"/>
+                <include name="jsch-0.1.38.jar"/>
+                <include name="juddi-2.0rc5.aop.jar"/>
+                <include name="juddi-client-2.0rc5.jar"/>
+                <include name="mina-core-1.1.7.jar"/>
+                <include name="mina-filter-ssl-1.1.7.jar"/>
+                <include name="mvel-1.3.3-java1.5.jar"/>
+                <include name="scout-1.0.aop.jar"/>
+                <include name="slf4j-api-1.4.3.jar"/>
+                <include name="slf4j-log4j12-1.4.3.jar"/>
+                <include name="stax-api-1.0.1.jar"/>
+                <include name="wstx-asl-3.2.0.jar"/>
+                <include name="xbean-2.2.0.jar"/>
+                <include name="xstream-1.2.2.jar"/>
+            </fileset>
+            <fileset dir="${org.jboss.esb.dist.lib}">
+                <include name="commons-codec-1.3.jar"/>
+            </fileset>
+        </copy>
+		
+		<copy todir="${deployers.dir}/esb.deployer/META-INF" overwrite="true">
+            <fileset dir="${basedir}">
+                <include name="esb-deployers-jboss-beans.xml"/>
+                <include name="jboss-structure.xml"/>
+            </fileset>
+        </copy>
+		
+		<copy todir="${deployers.dir}/esb.deployer" overwrite="true">
+            <fileset dir="${org.jboss.esb.dist.lib}/jbossesb.sar">
+                <include name="actionArtifactMap.properties"/>
+                <include name="esb.juddi.xml"/>
+                <include name="jbossesb-properties.xml"/>
+                <include name="privateKeyStore"/>
+                <include name="publicKeyStore"/>
+            </fileset>
+		</copy>
+		
+        <!-- jbossesb.sar -->
+        <copy todir="${deploy.dir}/jbossesb.sar" includeemptydirs="false" overwrite="true">
+            <fileset dir="${org.jboss.esb.dist.lib}/jbossesb.sar">
+            	<exclude name="lib/jbossesb-rosetta.jar"/>
+            	<exclude name="lib/jbossesb-config-model-1.0.1.jar"/>
+            	<exclude name="lib/jbossesb-config-model-1.1.0.jar"/>
+            	<exclude name="lib/commons-lang-2.1.jar"/>
+            	<exclude name="lib/commons-net-2.0.0-652071.jar"/>
+            	<exclude name="lib/commons-ssl-0.3.4.jar"/>
+                <exclude name="lib/commons-io-1.3.jar"/>
+            	<exclude name="lib/groovy-all-1.5.0.jar"/>
+            	<exclude name="lib/jbossts-common.jar"/>
+            	<exclude name="lib/jsch-0.1.38.jar"/>
+            	<exclude name="lib/juddi-2.0rc5.aop.jar"/>
+            	<exclude name="lib/juddi-client-2.0rc5.jar"/>
+            	<exclude name="lib/mina-core-1.1.7.jar"/>
+            	<exclude name="lib/mina-filter-ssl-1.1.7.jar"/>
+            	<exclude name="lib/mvel-1.3.3-java1.5.jar"/>
+            	<exclude name="lib/scout-1.0.aop.jar"/>
+            	<exclude name="lib/slf4j-api-1.4.3.jar"/>
+            	<exclude name="lib/slf4j-log4j12-1.4.3.jar"/>
+            	<exclude name="lib/stax-api-1.0.1.jar"/>
+            	<exclude name="lib/wstx-asl-3.2.0.jar"/>
+            	<exclude name="lib/xbean-2.2.0.jar"/>
+            	<exclude name="lib/xstream-1.2.2.jar"/>
+            	<exclude name="META-INF/jboss-service.xml"/>
+            	<exclude name="actionArtifactMap.properties"/>
+            	<exclude name="esb.juddi.xml"/>
+            	<exclude name="jbossesb-properties.xml"/>
+            	<exclude name="privateKeyStore"/>
+            	<exclude name="publicKeyStore"/>
+            </fileset>
+        </copy>
+		<copy tofile="${deploy.dir}/jbossesb.sar/META-INF/jboss-service.xml" file="${basedir}/jboss-service-jbossas5.xml" overwrite="true"/>
 
-    </target>
+	        <!-- jbossesb.esb -->
+	        <copy todir="${deploy.dir}/jbossesb.esb">
+	            <fileset dir="${org.jboss.esb.dist.lib}/jbossesb.esb" excludes="${messaging.excludes}"/>
+	        </copy>
 
+	        <!-- jbpm.esb   -->
+	        <copy todir="${deploy.dir}/jbpm.esb">
+	            <fileset dir="${org.jboss.esb.dist.lib}/jbpm.esb" excludes="${messaging.excludes}"/>
+	        </copy>
+	        
+	        <!-- jbrules.esb -->
+	        <copy todir="${deploy.dir}/jbrules.esb">
+	            <fileset dir="${org.jboss.esb.dist.lib}/jbrules.esb" excludes="${messaging.excludes}"/>
+	        </copy>
+
+	        <!-- smooks.esb  -->
+	        <copy todir="${deploy.dir}/smooks.esb">
+	            <fileset dir="${org.jboss.esb.dist.lib}/smooks.esb" excludes="${messaging.excludes}"/>
+	        </copy>
+	        
+	        <!-- spring.esb  -->
+	        <copy todir="${deploy.dir}/spring.esb">
+	            <fileset dir="${org.jboss.esb.dist.lib}/spring.esb" excludes="${messaging.excludes}"/>
+	        </copy>
+
+	        <!-- soap.esb  -->
+	        <copy todir="${deploy.dir}/soap.esb">
+	            <fileset dir="${org.jboss.esb.dist.lib}/soap.esb" excludes="${messaging.excludes}"/>
+	            <fileset dir="${client.dir}" includes="jboss-jaxws.jar jaxb-api.jar jaxb-impl.jar"/>
+	        </copy>
+	                
+	        <!-- slsb.esb  -->
+	        <copy todir="${deploy.dir}/slsb.esb">
+	            <fileset dir="${org.jboss.esb.dist.lib}/slsb.esb" excludes="${messaging.excludes}"/>
+	        </copy>
+	        
+	        <!-- soapui-client.sar  -->
+	        <copy todir="${deploy.dir}/soapui-client.sar">
+	            <fileset dir="${org.jboss.esb.dist.lib}/soapui-client.sar" excludes="${messaging.excludes} META-INF/jboss-service-as5.xml"/>
+	        </copy>
+	        <copy tofile="${deploy.dir}/soapui-client.sar/META-INF/jboss-service.xml" file="${org.jboss.esb.dist.lib}/soapui-client.sar/META-INF/jboss-service-as5.xml" overwrite="true"/>
+
+	        <!-- contracts app  -->
+	        <copy file="${org.jboss.esb.dist}/tools/console/console/jboss-esb-console.ear/contract.war" todir="${deploy.dir}" />
+
+	        <!-- install h2 jar -->
+	        <copy file="${org.jboss.esb.dist.lib}/h2-1.0.68.jar" todir="${server.lib.dir}"/>
+		
+    		<copy file="${product.dir}/build/lib/scout-1.0.jar" tofile="${client.dir}/scout.jar" overwrite="true"/>
+
+	        <!-- embedded jopr console   -->
+	        <ant dir="embedded-console" target="replace">
+	            <property name="org.jboss.esb.server.home" value="${org.jboss.esb.server.home}"/>
+	            <property name="org.jboss.esb.server.config" value="${org.jboss.esb.server.config}"/>
+	        </ant>
+
+	        <ant dir="jbpm-patch" target="replace">
+	            <property name="org.jboss.esb.server.home" value="${org.jboss.esb.server.home}"/>
+	            <property name="org.jboss.esb.server.config" value="${org.jboss.esb.server.config}"/>
+	        </ant> 
+	        
+	    </target>
+
     <target name="undeploy" depends="check.deploy.props, undeploy.bindings" description="Undeploy ESB components.">
         <delete dir="${deploy.dir}/jbossesb.sar" />
         <delete dir="${deploy.dir}/jbossesb.esb" />
@@ -192,7 +350,12 @@
         <delete dir="${deploy.dir}/soapui-client.sar" />
         <delete dir="${deploy.dir}/contract.war" />
         <delete dir="${conf.dir}/action-templates.xml" />
+    	<antcall target="undeploy.jbossas5"/>
     </target>
+	
+	<target name="undeploy.jbossas5" if="jbossas5" >
+        <delete dir="${server.dir}/deployers/esb.deployer"/>
+    </target>
 
         <property name="org.jboss.esb.tomcat.55lib"
             location="${org.jboss.esb.tomcat.home}/common/lib"/>
@@ -287,13 +450,19 @@
 	</target>
 
 	<target name="init.bindings.props" depends="check.deploy.props, dependencies">
-		<property name="bindings.dir" location="${org.jboss.esb.server.home}/docs/examples/binding-manager"/>
-		<property name="bindings.location" location="${bindings.dir}/sample-bindings.xml"/>
-		<property name="bindings.tmp.location" location="${bindings.location}.tmp"/>
-		<property name="bindings.backup.location" location="${bindings.location}.bak"/>
-		<available property="bindings.exist" file="${bindings.backup.location}" type="file"/>
-	</target>
+	        <condition property="bindings.dir" value="${org.jboss.esb.server.home}/docs/examples/binding-manager" else="${conf.dir}/bindingservice.beans/META-INF">
+	            <available file="${org.jboss.esb.server.home}/docs/examples/binding-manager"/>
+	        </condition>
+	   
+	        <condition property="bindings.location" value="${bindings.dir}/sample-bindings.xml" else="${bindings.dir}/bindings-jboss-beans.xml">
+	            <available file="${org.jboss.esb.server.home}/docs/examples/binding-manager"/>
+	        </condition> 
 
+	        <property name="bindings.tmp.location" location="${bindings.location}.tmp"/>
+	        <property name="bindings.backup.location" location="${bindings.location}.bak"/>
+	        <available property="bindings.exist" file="${bindings.backup.location}" type="file"/>
+	    </target>
+
 	<target name="deploy.bindings" depends="init.bindings.props" unless="bindings.exist" description="Deploys ESB Bindings into the application server">
 		<xslt style="bindings.xslt" in="${bindings.location}" out="${bindings.tmp.location}"/>
 		<move file="${bindings.location}" tofile="${bindings.backup.location}"/>

Modified: labs/jbossesb/trunk/product/install/embedded-console/esb-console.war
===================================================================
(Binary files differ)

Copied: labs/jbossesb/trunk/product/install/esb-deployers-jboss-beans.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/install/esb-deployers-jboss-beans.xml)
===================================================================
--- labs/jbossesb/trunk/product/install/esb-deployers-jboss-beans.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/install/esb-deployers-jboss-beans.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- JBoss ESB 4.x + JBossAS5 integration -->
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+	
+	<bean name="EsbConfigParser" class="org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser">
+		<property name="esbDeploymentPrefix">jboss.esb:deployment=</property>
+		<property name="warDeploymentPrefix">jboss.web.deployment:war=</property>
+		<property name="actionArtifactsFile">/actionArtifactMap.properties</property>
+	</bean>
+
+	<bean name="EsbWebServiceDeployer" class="org.jboss.soa.esb.listeners.deployers.mc.EsbWebServiceDeployer"/>
+
+	<bean name="EsbWsdlDeployer" class="org.jboss.soa.esb.listeners.deployers.mc.EsbWsdlDeployer"/>
+
+	<bean name="EsbDeployer" class="org.jboss.soa.esb.listeners.deployers.mc.EsbDeployer">
+		<property name="esbBeanPrefix">jboss.esb</property>
+		<property name="defaultDependencies">
+			<list elementClass="java.lang.String">
+				<value>jboss.esb:service=ESBRegistry</value>
+				<value>jboss.esb:service=JuddiRMI</value>
+			</list>
+		</property>
+	</bean>
+
+</deployment>

Copied: labs/jbossesb/trunk/product/install/jboss-service-jbossas5.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/install/jboss-service-jbossas5.xml)
===================================================================
--- labs/jbossesb/trunk/product/install/jboss-service-jbossas5.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/install/jboss-service-jbossas5.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+	<mbean code="org.jboss.soa.esb.common.JBossESBPropertyService" name="jboss.esb:service=PropertyService">
+		<attribute name="PropertyFile">jbossesb-properties.xml</attribute>
+        <attribute name="PropertiesFileDir">${jboss.server.data.dir}</attribute>
+        <depends>jboss:service=TransactionManager</depends>
+	</mbean>
+
+	<mbean code="org.jboss.internal.soa.esb.services.registry.RegistryService" name="jboss.esb:service=ESBRegistry">
+		<depends>jboss.esb:service=PropertyService</depends>
+	</mbean>
+
+    <mbean code="org.jboss.internal.soa.esb.dependencies.JuddiRMIService" name="jboss.esb:service=JuddiRMI" description="Juddi RMI Service">
+       <attribute name="PropertiesResourceFile">esb.juddi.xml</attribute>
+       <attribute name="PropertiesFileDir">${jboss.server.data.dir}</attribute>
+       <depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>
+       <depends>jboss.esb:service=PropertyService</depends>
+    </mbean>
+
+	<mbean code="org.jboss.soa.esb.listeners.message.MessageCounter" name="jboss.esb:service=MessageCounter"/>
+
+</server>

Modified: labs/jbossesb/trunk/product/install/jboss-service.xml
===================================================================
--- labs/jbossesb/trunk/product/install/jboss-service.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/install/jboss-service.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,27 +1,32 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <server>
-   <mbean code="org.jboss.soa.esb.common.JBossESBPropertyService"
-      name="jboss.esb:service=PropertyService">
-       <attribute name="PropertyFile">jbossesb-properties.xml</attribute>
-   </mbean>
-   <mbean code="org.jboss.internal.soa.esb.services.registry.RegistryService"
-      name="jboss.esb:service=ESBRegistry">
-       <depends>jboss.esb:service=PropertyService</depends>
-   </mbean>
-   <mbean code="org.jboss.internal.soa.esb.dependencies.JuddiRMIService"
-       name="jboss.esb:service=JuddiRMI"
-       description="Juddi RMI Service">
+
+	<classpath codebase="deploy/jbossesb.sar/lib" archives="*.jar"/>
+
+	<mbean code="org.jboss.soa.esb.common.JBossESBPropertyService" name="jboss.esb:service=PropertyService">
+		<attribute name="PropertyFile">jbossesb-properties.xml</attribute>
+		<attribute name="PropertiesFileDir">${jboss.server.data.dir}</attribute>
+		<depends>jboss:service=TransactionManager</depends>
+	</mbean>
+
+	<mbean code="org.jboss.internal.soa.esb.services.registry.RegistryService" name="jboss.esb:service=ESBRegistry">
+		<depends>jboss.esb:service=PropertyService</depends>
+	</mbean>
+
+	<mbean code="org.jboss.internal.soa.esb.dependencies.JuddiRMIService" name="jboss.esb:service=JuddiRMI" description="Juddi RMI Service">
        <attribute name="PropertiesResourceFile">esb.juddi.xml</attribute>
+       <attribute name="PropertiesFileDir">${jboss.server.data.dir}</attribute>
        <depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>
        <depends>jboss.esb:service=PropertyService</depends>
-   </mbean>
-   <mbean code="org.jboss.soa.esb.listeners.config.JBoss4ESBDeployer"
-  	     name="jboss.esb:service=ESBDeployer">
-    <depends>jboss.esb:service=ESBRegistry</depends>
-    <depends>jboss.esb:service=JuddiRMI</depends>
-  </mbean>
-  <mbean code="org.jboss.soa.esb.listeners.message.MessageCounter"
-	name="jboss.esb:service=MessageCounter">
-  </mbean>
+	</mbean>
+
+	<mbean code="org.jboss.soa.esb.listeners.config.JBoss4ESBDeployer" name="jboss.esb:service=ESBDeployer">
+		<attribute name="WarFilesDir">${jboss.server.temp.dir}</attribute>
+		<depends>jboss.esb:service=ESBRegistry</depends>
+		<depends>jboss.esb:service=JuddiRMI</depends>
+	</mbean>
+
+	<mbean code="org.jboss.soa.esb.listeners.message.MessageCounter" name="jboss.esb:service=MessageCounter"/>
+
 </server>

Copied: labs/jbossesb/trunk/product/install/jboss-structure.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/install/jboss-structure.xml)
===================================================================
--- labs/jbossesb/trunk/product/install/jboss-structure.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/install/jboss-structure.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<structure>
+    <context>
+        <path name=""/>
+        <metaDataPath>
+            <path name="META-INF"/>
+        </metaDataPath>        
+        <classpath>
+            <path name=""/>
+            <path name="lib" suffixes=".jar"/>
+        </classpath>
+    </context>
+</structure>

Modified: labs/jbossesb/trunk/product/ivy-build.xml
===================================================================
--- labs/jbossesb/trunk/product/ivy-build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/ivy-build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -11,7 +11,7 @@
     </target>
 
     <target name="retrieve" depends="ivy.init">
-        <ivy:retrieve />
+        <ivy:retrieve log="quiet"/>
     </target>
 
     <target name="clean" depends="ivy.init">

Modified: labs/jbossesb/trunk/product/ivy.xml
===================================================================
--- labs/jbossesb/trunk/product/ivy.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/ivy.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -81,5 +81,58 @@
 
 		<!-- xmlunit -->	
         <dependency org="xmlunit" name="xmlunit" rev="1.2"/>
+
+		<!-- JBoss Microcontainer dependencies -->
+        <dependency org="org.jboss.deployers" name="jboss-deployers-vfs-spi" rev="2.0.5.GA">
+            <exclude org="jboss" module="jboss-vfs"/>
+        </dependency>
+        <dependency org="org.jboss.deployers" name="jboss-deployers-vfs" rev="2.0.5.GA"/>
+        <dependency org="org.jboss.deployers" name="jboss-deployers-spi" rev="2.0.5.GA"/>
+        <dependency org="org.jboss.deployers" name="jboss-deployers-core-spi" rev="2.0.5.GA"/>
+        <dependency org="org.jboss.deployers" name="jboss-deployers-core" rev="2.0.5.GA"/>
+        <dependency org="org.jboss.deployers" name="jboss-deployers-impl" rev="2.0.5.GA"/>
+        <dependency org="org.jboss.deployers" name="jboss-deployers-structure-spi" rev="2.0.5.GA"/>
+        <dependency org="org.jboss.deployers" name="jboss-deployers-client" rev="2.0.5.GA"/>
+        <dependency org="org.jboss.deployers" name="jboss-deployers-client-spi" rev="2.0.5.GA"/>
+        <dependency org="org.jboss.deployers" name="jboss-deployers-client-spi" rev="2.0.5.GA"/>
+
+        <dependency org="org.jboss.microcontainer" name="jboss-dependency" rev="2.0.4.GA"/>
+        <dependency org="org.jboss.microcontainer" name="jboss-kernel" rev="2.0.4.GA"/>
+
+        <dependency org="org.jboss.cl" name="jboss-classloader" rev="2.0.4.GA"/>
+        <dependency org="org.jboss.cl" name="jboss-classloading" rev="2.0.4.GA"/>
+        <dependency org="org.jboss.cl" name="jboss-classloading-vfs" rev="2.0.4.GA"/>
+
+        <dependency org="org.jboss.man" name="jboss-managed" rev="2.0.0.GA"/>
+        <dependency org="org.jboss.man"	name="jboss-metatype" rev="2.0.0.GA"/>
+
+        <dependency org="org.jboss.integration" name="jboss-classloading-spi" rev="5.0.3.GA"/>
+        <dependency org="org.jboss.integration" name="jboss-profileservice-spi" rev="5.0.3.GA"/>
+
+        <dependency org="org.jboss" name="jboss-vfs" rev="2.1.0.GA"/>
+        <dependency org="org.jboss" name="jboss-common-core" rev="2.2.11.GA"/>
+        <dependency org="org.jboss" name="jboss-mdr" rev="2.0.1.GA"/>
+        <dependency org="org.jboss"	name="jboss-reflect" rev="2.0.1.GA"/>
+        <dependency org="org.jboss"	name="jbossxb" rev="2.0.0.GA"/>
+
+
+		<!-- Note that jboss-metadata is still in beta -->
+        <dependency org="org.jboss"	name="jboss-metadata" rev="1.0.0.Beta6"/>
+
+        <dependency org="org.jboss.jbossas"	name="jboss-as-bootstrap" rev="5.0.1.GA"/>
+        <dependency org="org.jboss.jbossas"	name="jboss-as-j2se" rev="5.0.1.GA"/>
+        <dependency org="org.jboss.jbossas"	name="jboss-as-jmx" rev="5.0.1.GA"/>
+        <dependency org="org.jboss.jbossas"	name="jboss-as-main" rev="5.0.1.GA"/>
+        <dependency org="org.jboss.jbossas"	name="jboss-as-mbeans" rev="5.0.1.GA"/>
+        <dependency org="org.jboss.jbossas"	name="jboss-as-system" rev="5.0.1.GA"/>
+        <dependency org="org.jboss.jbossas"	name="jboss-as-system-jmx" rev="5.0.1.GA"/>
+        <dependency org="org.jboss.jbossas"	name="jboss-as-webservices" rev="5.0.1.GA"/>
+
+        <dependency org="org.jboss.logging" name="jboss-logging-spi" rev="2.0.5.GA"/>
+        <dependency org="org.jboss.javaee" name="jboss-ejb-api" rev="3.0.0.GA"/>
+        <dependency org="org.jboss.test" name="jboss-test" rev="1.1.3.GA"/>
+
+        <dependency org="javax.xml.bind" name="jaxb-api" rev="2.1"/>
+
     </dependencies>
 </ivy-module>

Modified: labs/jbossesb/trunk/product/rosetta/aop/resources/META-INF/jboss-aop.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/aop/resources/META-INF/jboss-aop.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/aop/resources/META-INF/jboss-aop.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,9 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE aop PUBLIC
-   "-//JBoss//DTD JBOSS AOP 1.0//EN"
-   "http://labs.jboss.com/portal/jbossaop/dtd/jboss-aop_1_0.dtd">
+<aop xmlns="urn:jboss:aop-beans:1.0">
 
-<aop>
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.ScoutAspect" scope="PER_VM"/>
    <aspect class="org.jboss.internal.soa.esb.services.registry.aspect.JUDDIAspect" scope="PER_VM"/>
    

Modified: labs/jbossesb/trunk/product/rosetta/build.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -183,6 +183,7 @@
     </target>
 
     <path id="xbeans-classpath">
+        <fileset dir="${org.jboss.esb.lib.dir}" includes="xbeans.jar"/>
         <fileset dir="${org.jboss.esb.lib.dir}" includes="*.jar"/>
         <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
     </path>

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -280,7 +280,7 @@
 
 
     private boolean jmsConnectRetry(Exception exc) {
-        _logger.debug("JMS error.  Attempting JMS reconnect.", exc);
+        _logger.info("JMS error.  Attempting JMS reconnect.", exc);
 
         synchronized(this) {
             try {
@@ -444,7 +444,7 @@
         }
         return jmsMessage;
     } // ________________________________
-
+    
     /**
      * Sets the strategy for handling the setting of properties on an outgoing
      * JMS Message.

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -29,8 +29,10 @@
 import java.sql.Statement;
 
 import org.h2.tools.Server;
+import org.jboss.mx.util.MBeanProxyExt;
 import org.jboss.system.ServiceMBeanSupport;
-import org.jboss.system.server.ServerConfigLocator;
+import org.jboss.system.server.ServerConfig;
+import org.jboss.system.server.ServerConfigImplMBean;
 
 /**
  * Integration with H2.
@@ -121,6 +123,8 @@
     /** Server thread delay for remote H2. */
     private long delay = DEFAULT_DELAY ;
 
+    private String datadir;
+
     // Attributes ----------------------------------------------------
    
     /**
@@ -573,7 +577,17 @@
    
     File getDataDir()
     {
-        return ServerConfigLocator.locate().getServerDataDir();
+        if (datadir == null)
+        {
+            final ServerConfig serverConfig = (ServerConfig) MBeanProxyExt.create(ServerConfig.class, ServerConfigImplMBean.OBJECT_NAME);
+            return serverConfig.getServerDataDir();
+        }
+        return new File(datadir);
     }
 
+    public void setDataDir(String datadir)
+    {
+        this.datadir = datadir;
+    }
+
 }

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseMBean.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseMBean.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseMBean.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -84,4 +84,7 @@
    /** The binding address, default is '0.0.0.0' */
    String getBindAddress();
    void setBindAddress(String address);
+   
+   /** Set the dir that will be used by the database. */
+   void setDataDir(final String datadir);
 }

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/JuddiRMIService.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/JuddiRMIService.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/JuddiRMIService.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -26,6 +26,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.InputStream;
 import java.net.URL;
@@ -37,9 +38,10 @@
 import org.apache.log4j.Logger;
 import org.jboss.internal.soa.esb.util.PropertiesHelper;
 import org.jboss.internal.soa.esb.util.XMLHelper;
+import org.jboss.mx.util.MBeanProxyExt;
 import org.jboss.system.ServiceMBeanSupport;
 import org.jboss.system.server.ServerConfig;
-import org.jboss.system.server.ServerConfigLocator;
+import org.jboss.system.server.ServerConfigImplMBean;
 
 public class JuddiRMIService extends ServiceMBeanSupport implements JuddiRMIServiceMBean
 {
@@ -53,6 +55,7 @@
    private static final String JUDDI_PROPERTY_FILE_COMMENTS = "Auto generated property file, do not edit" ;
    
    private String propertiesResourceFile ;
+   private String propertiesFileDir;
 
    public String getPropertiesResourceFile()
    {
@@ -98,8 +101,18 @@
             xmlPropertyIS.close() ;
         }
         
-        final ServerConfig serverConfig = ServerConfigLocator.locate() ;
-        final File dataDir = serverConfig.getServerDataDir() ;
+        if (propertiesFileDir == null)
+        {
+            final String errorMsg = String.format("No property named '%s' was configured in jbossesb.sar/META-INF/jboss-service.xml for %s", "propertiesFileDir", getClass().getName());
+            throw new IllegalArgumentException(errorMsg);
+        }
+        
+        File dataDir = new File(propertiesFileDir);
+        if (!dataDir.exists())
+        {
+            final String errorMsg = String.format("The directory configured for %s='%s' does not exist.", "warFilesDir", dataDir);
+            throw new FileNotFoundException(errorMsg);
+        }
         final File juddiPropertyFile = new File(dataDir, JUDDI_PROPERTIES_RESOURCE_FILE) ;
         
         final ByteArrayInputStream bais = new ByteArrayInputStream(propertyFileContents) ;
@@ -137,4 +150,9 @@
 		ic.unbind(JNDIRegistration.INQUIRY_SERVICE) ;
 		ic.unbind(JNDIRegistration.PUBLISH_SERVICE) ;
 	}
+
+    public void setPropertiesFileDir(final String directory)
+    {
+        this.propertiesFileDir = directory;
+    }
 }

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/JuddiRMIServiceMBean.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/JuddiRMIServiceMBean.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/JuddiRMIServiceMBean.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -27,9 +27,9 @@
 public interface JuddiRMIServiceMBean extends ServiceMBean
 {
 
-   String getPropertiesResourceFile()
-           ;
+   String getPropertiesResourceFile() ;
 
-   void setPropertiesResourceFile(String propertiesResourceFile)
-           ;
+   void setPropertiesResourceFile(String propertiesResourceFile) ;
+   
+   void setPropertiesFileDir(final String directory);
 }

Copied: labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/util/JBossDeployerUtil.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/internal/soa/esb/util/JBossDeployerUtil.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/util/JBossDeployerUtil.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/util/JBossDeployerUtil.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,222 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.util;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.log4j.Logger;
+import org.jboss.deployment.DeploymentException;
+import org.jboss.internal.soa.esb.assertion.AssertArgument;
+import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
+import org.jboss.internal.soa.esb.webservice.AddressingHandler;
+import org.jboss.internal.soa.esb.webservice.ESBContractGenerator;
+import org.jboss.internal.soa.esb.webservice.ESBResponseFilter;
+import org.jboss.internal.soa.esb.webservice.ESBServiceContractPublisher;
+import org.jboss.internal.soa.esb.webservice.ESBServiceEndpointInfo;
+import org.jboss.internal.soa.esb.webservice.JAXWSProviderClassGenerator;
+import org.jboss.mx.util.ObjectNameConverter;
+import org.jboss.soa.esb.Service;
+import org.jboss.soa.esb.listeners.config.WebserviceInfo;
+import org.jboss.soa.esb.listeners.config.model.ModelAdapter;
+import org.jboss.soa.esb.listeners.config.model.ModelParser;
+import org.jboss.soa.esb.util.ClassUtil;
+
+/**
+ * Util class for JBoss AS Deployers.
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ * 
+ */
+public class JBossDeployerUtil
+{
+    private static final String PREFIX_CANONICAL_NAME = "jboss.esb:deployment=" ;
+    private static final String ESB_ARTIFACT_NAME = "jbossesb.esb" ;
+    
+    private static final String HANDLER_CHAIN_PREFIX = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<handler-chains xmlns=\"http://java.sun.com/xml/ns/javaee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" + " xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd\">" + "<handler-chain><protocol-bindings>##SOAP11_HTTP</protocol-bindings>";
+    private static final String HANDLER_CHAIN_POSTFIX = "</handler-chain></handler-chains>";
+    private static final String HANDLER_PREFIX = "<handler><handler-name>";
+    private static final String HANDLER_MIDDLE = "</handler-name><handler-class>";
+    private static final String HANDLER_POSTFIX = "</handler-class></handler>";
+
+    private static final String WSADDR_NAME = "WSAddressing Handler";
+    private static final String WSADDR_HANDLER = "org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler";
+
+    private static final String WSADDR_CONTEXT_NAME = "WSAddressing Context Handler";
+    private static final String WSADDR_CONTEXT_HANDLER = AddressingHandler.class.getName();
+    
+    private static Logger log = Logger.getLogger(JBossDeployerUtil.class);
+
+    private JBossDeployerUtil() { }
+
+    public static String getHandlers(final ESBServiceEndpointInfo serviceInfo)
+    {
+        final String result;
+
+        if (!serviceInfo.isAddressing())
+        {
+            result = null;
+        } 
+        else
+        {
+            final StringBuilder sb = new StringBuilder(HANDLER_CHAIN_PREFIX);
+            if (serviceInfo.isAddressing())
+            {
+                sb.append(HANDLER_PREFIX).append(WSADDR_CONTEXT_NAME).append(HANDLER_MIDDLE).append(WSADDR_CONTEXT_HANDLER).append(HANDLER_POSTFIX);
+                sb.append(HANDLER_PREFIX).append(WSADDR_NAME).append(HANDLER_MIDDLE).append(WSADDR_HANDLER).append(HANDLER_POSTFIX);
+            }
+            sb.append(HANDLER_CHAIN_POSTFIX);
+            result = sb.toString();
+        }
+        return result;
+    }
+
+    public static File getESBWarFile(final String deploymentName, final String esbName, final boolean createDir, final File dir)
+    {
+        final File esbDir = new File(dir, deploymentName);
+        if (!esbDir.exists())
+        {
+            if (!createDir)
+            {
+                return null;
+            }
+            esbDir.mkdir();
+        }
+
+        final int lastSeparator = esbName.lastIndexOf('.');
+        final String warFileName = ((lastSeparator >= 0) ? esbName.substring(0, lastSeparator) : esbName) + ".war";
+
+        return new File(esbDir, warFileName);
+    }
+
+    public static File createDir(final File parentDir, String dirName)
+    {
+        final File esbWarFiles = new File(parentDir, dirName);
+        esbWarFiles.mkdirs();
+        return esbWarFiles;
+    }
+
+    public static String readEsbConfig(final InputStream in) throws DeploymentException
+    {
+        try
+        {
+            final StringWriter sw = new StringWriter();
+            XMLHelper.replaceSystemProperties(XMLHelper.getXMLStreamReader(in), XMLHelper.getXMLStreamWriter(sw));
+            return sw.toString();
+        } catch (XMLStreamException e)
+        {
+            throw new DeploymentException(e.getMessage(), e);
+        } finally
+        {
+            try
+            {
+                in.close();
+            } catch (IOException ignore)
+            {
+            }
+        }
+    }
+
+    public static ModelAdapter getJbossEsbModel(final String configuration) throws DeploymentException
+    {
+        try
+        {
+            final StringReader sr = new StringReader(configuration);
+            return ModelParser.getParser().parse(sr);
+        } catch (final Exception ex)
+        {
+            throw new DeploymentException("Failed to parse jboss-esb.xml", ex);
+        }
+    }
+
+    public static Properties getArtifactProperties(final String fileName) throws IOException
+    {
+        Properties properties = null;
+        final InputStream in = ClassUtil.getResourceAsStream(fileName, JBossDeployerUtil.class);
+        if (in != null)
+        {
+            log.debug("Loaded action artifact mapping from " + fileName);
+            properties = new Properties();
+            properties.load(in);
+        }
+        else
+        {
+            log.debug("No action artifact mapping") ;
+        }
+        return properties;
+    }
+    
+    public static Set<ObjectName> getActionDependencies(final String deploymentName, final ModelAdapter model, final Properties actionArtifactProperties) throws DeploymentException
+    {
+        final Set<ObjectName> deps = new HashSet<ObjectName>();
+        final Set<String> artifacts = new HashSet<String>() ;
+        artifacts.add(ESB_ARTIFACT_NAME) ;
+    
+        final Set<String> actionClasses = model.getActions() ;
+          
+        final int numActionClasses = (actionClasses == null ? 0 : actionClasses.size()) ;
+        if (numActionClasses > 0)
+        {
+            for(final String actionClass: actionClasses)
+            {
+                final String artifact = (String) actionArtifactProperties.get(actionClass) ;
+                if (artifact != null)
+                {
+                    artifacts.add(artifact) ;
+                }
+            }
+        }
+          
+        for(final String artifact: artifacts)
+        {
+            if (!deploymentName.equals(artifact))
+            {
+                final String canonicalName = PREFIX_CANONICAL_NAME + artifact ;
+                try
+                {
+                    ObjectName on = ObjectNameConverter.convert(canonicalName);
+                    deps.add(on) ;
+                } 
+                catch (MalformedObjectNameException e)
+                {
+                    throw new DeploymentException(e.getMessage(), e);
+                }
+            }
+        }
+        return deps;
+    }
+
+}

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/internal/soa/esb/webservice/ESBContractGenerator.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -20,6 +20,7 @@
 package org.jboss.internal.soa.esb.webservice;
 
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.security.AccessController;
@@ -89,8 +90,11 @@
 	private static final QName WSAW_USING_ADDRESSING_QN = new QName(WSAW_NAMESPACE, "UsingAddressing", WSAW_PREFIX) ;
 	private static WSDLFactory wsdlFactory ;
 	
-	public static String generateWSDL(final WebserviceInfo serviceConfig, final ESBServiceEndpointInfo serviceInfo)
-			throws ConfigurationException {
+	public static String generateWSDL(final WebserviceInfo serviceConfig, final ESBServiceEndpointInfo serviceInfo) throws ConfigurationException {
+	    return generateWSDL(serviceConfig, serviceInfo, null);
+	}
+	
+	public static String generateWSDL(final WebserviceInfo serviceConfig, final ESBServiceEndpointInfo serviceInfo, final ClassLoader classLoader) throws ConfigurationException {
 		final Definition def = getWSDLFactory().newDefinition() ;
 		final String namespace = serviceInfo.getNamespace() ;
 		def.setTargetNamespace(namespace);
@@ -119,9 +123,7 @@
 		int nsSuffixCounter = 0 ;
 		if (inXsd != null) {
 			try {
-				Document doc = YADOMUtil.parseStream(ClassUtil
-						.getResourceAsStream(inXsd, ESBContractGenerator.class),
-						false, false);
+				Document doc = YADOMUtil.parseStream(getResourceAsStream(inXsd, classLoader), false, false);
 				if (doc != null) {
 					reqMessage = addMessage(def, doc.getDocumentElement(),
 							serviceInfo.getRequestName(), "in", ++nsSuffixCounter, schemasAdded);
@@ -133,9 +135,7 @@
 
 		if (outXsd != null) {
 			try {
-				Document doc = YADOMUtil.parseStream(ClassUtil
-						.getResourceAsStream(outXsd, ESBContractGenerator.class),
-						false, false);
+				Document doc = YADOMUtil.parseStream(getResourceAsStream(outXsd, classLoader), false, false);
 				if (doc != null) {
 					resMessage = addMessage(def, doc.getDocumentElement(),
 						serviceInfo.getResponseName(), "out", ++nsSuffixCounter, schemasAdded);
@@ -151,9 +151,7 @@
 				final String[] xsds = faultXsd.split(",") ;
 				faultMessages = new ArrayList<Message>();
 				for(String xsd: xsds) {
-					Document doc = YADOMUtil.parseStream(ClassUtil
-						.getResourceAsStream(xsd, ESBContractGenerator.class),
-						false, false);
+					Document doc = YADOMUtil.parseStream(getResourceAsStream(xsd, classLoader), false, false);
 					if (doc != null) {
 						addFaultMessage(faultMessages, def, doc.getDocumentElement(),
 							serviceInfo.getFaultName(), "fault", ++nsSuffixCounter, schemasAdded);
@@ -188,6 +186,20 @@
     		types.addExtensibilityElement(schemaImpl);
 	    }
 	}
+	
+	private static InputStream getResourceAsStream(final String resource, final ClassLoader classLoader)
+	{
+	    if (classLoader != null)
+	    {
+	        final InputStream in = classLoader.getResourceAsStream(resource);
+	        if (in !=null )
+	        {
+	            return in;
+	        }
+	    }
+	    // Fallback to using the class's clasloader.
+		return ClassUtil.getResourceAsStream(resource, ESBContractGenerator.class);
+	}
 
 	private static boolean add(final Element schemaElement, final Set<String> schemasAdded) throws SAXException, IOException, TransformerException
     {

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -22,9 +22,12 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.InputStream;
+import java.net.InetAddress;
 import java.net.URL;
+import java.net.UnknownHostException;
 
 import javax.transaction.Status;
 import javax.transaction.Synchronization;
@@ -34,10 +37,10 @@
 
 import org.apache.log4j.Logger;
 import org.jboss.internal.soa.esb.util.XMLHelper;
+import org.jboss.mx.util.MBeanProxyExt;
 import org.jboss.system.ServiceMBeanSupport;
 import org.jboss.system.server.ServerConfig;
-import org.jboss.system.server.ServerConfigLocator;
-import org.jboss.system.server.ServerConfigUtil;
+import org.jboss.system.server.ServerConfigImplMBean;
 import org.jboss.tm.TransactionManagerLocator;
 
 /**
@@ -55,6 +58,8 @@
      * The current property file name.
      */
     private String propertyFile ;
+
+    private String propertiesFileDir;
     
     /**
      * Get the property file.
@@ -74,6 +79,20 @@
         this.propertyFile = propertyFile ;
     }
     
+    private static String fixRemoteAddress(final String address)
+    {
+        try
+        {
+            if (address == null || "0.0.0.0".equals(address))
+                return InetAddress.getLocalHost().getHostName();
+        }
+        catch (UnknownHostException ignored)
+        {
+        }
+
+        return address;
+    }
+    
     /**
      * Create the property service.
      */
@@ -85,7 +104,7 @@
         if (bindHost == null)
         {
             final String bindAddress = System.getProperty(ServerConfig.SERVER_BIND_ADDRESS) ;
-            final String esbBindAddress = ServerConfigUtil.fixRemoteAddress(bindAddress) ;
+            final String esbBindAddress = JBossESBPropertyService.fixRemoteAddress(bindAddress) ;
             System.setProperty(Environment.ESB_BIND_ADDRESS, esbBindAddress) ;
         }
         
@@ -101,9 +120,16 @@
             }
             
             try {
-                final ServerConfig serverConfig = ServerConfigLocator.locate() ;
-                final File dataDir = serverConfig.getServerDataDir() ;
-                final File esbPropertyFile = new File(dataDir, ESB_PROPERTY_FILE) ;
+                if (propertiesFileDir == null) {
+                    final String errorMsg = String.format("No property named '%s' was configured in jbossesb.sar/META-INF/jboss-service.xml for %s", "propertiesFileDir", getClass().getName());
+                    throw new IllegalArgumentException(errorMsg);
+                }
+                File dataDir = new File(propertiesFileDir);
+                if (!dataDir.exists()) {
+                    final String errorMsg = String.format("The directory configured for %s='%s' does not exist.", "warFilesDir", dataDir);
+                    throw new FileNotFoundException(errorMsg);
+                }
+                final File esbPropertyFile = new File(dataDir, ESB_PROPERTY_FILE);
                 
                 final FileOutputStream esbPropertyOS = new FileOutputStream(esbPropertyFile) ;
                 try {
@@ -331,4 +357,9 @@
         	return "JTATransactionStrategy";
         }
     }
+
+    public void setPropertiesFileDir(String directory)
+    {
+        this.propertiesFileDir = directory;
+    }
 }

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyServiceMBean.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyServiceMBean.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyServiceMBean.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -38,4 +38,6 @@
      * @param propertyFile The name of the property file being used.
      */
     public void setPropertyFile(final String propertyFile) ;
+    
+    public void setPropertiesFileDir(final String directory);
 }

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -27,12 +27,9 @@
 import java.io.FilenameFilter;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.StringReader;
 import java.io.StringWriter;
 import java.net.URL;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -46,7 +43,6 @@
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
-import java.util.zip.ZipInputStream;
 import java.util.zip.ZipOutputStream;
 
 import javax.management.MalformedObjectNameException;
@@ -57,9 +53,8 @@
 import org.jboss.deployment.SubDeployer;
 import org.jboss.deployment.SubDeployerSupport;
 import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
+import org.jboss.internal.soa.esb.util.JBossDeployerUtil;
 import org.jboss.internal.soa.esb.util.StreamUtils;
-import org.jboss.internal.soa.esb.util.XMLHelper;
-import org.jboss.internal.soa.esb.webservice.AddressingHandler;
 import org.jboss.internal.soa.esb.webservice.ESBContractGenerator;
 import org.jboss.internal.soa.esb.webservice.ESBResponseFilter;
 import org.jboss.internal.soa.esb.webservice.ESBServiceContractPublisher;
@@ -74,12 +69,8 @@
 import org.jboss.soa.esb.Service;
 import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
 import org.jboss.soa.esb.listeners.config.model.ModelAdapter;
-import org.jboss.soa.esb.listeners.config.model.ModelParser;
-import org.jboss.soa.esb.util.ClassUtil;
 import org.jboss.soa.esb.util.FileUtil;
 import org.jboss.system.ServiceControllerMBean;
-import org.jboss.system.server.ServerConfig;
-import org.jboss.system.server.ServerConfigLocator;
 import org.jboss.web.AbstractWebContainer;
 import org.w3c.dom.Element;
 
@@ -96,27 +87,18 @@
 
    private ServiceControllerMBean serviceController;
    private Properties actionArtifactProperties;
-   private final File esbWarFiles ;
+   private File esbWarFiles ;
    private final Set<String> esbNames = new HashSet<String>() ;
    
    private static final String PREFIX_CANONICAL_NAME = "jboss.esb:deployment=" ;
    private static final String ESB_ARTIFACT_NAME = "jbossesb.esb" ;
    
-   private final String HANDLER_CHAIN_PREFIX = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
-       "<handler-chains xmlns=\"http://java.sun.com/xml/ns/javaee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" +
-       " xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd\">" +
-           "<handler-chain><protocol-bindings>##SOAP11_HTTP</protocol-bindings>" ;
-   private final String HANDLER_CHAIN_POSTFIX = "</handler-chain></handler-chains>" ;
-   private final String HANDLER_PREFIX = "<handler><handler-name>" ;
-   private final String HANDLER_MIDDLE = "</handler-name><handler-class>" ;
-   private final String HANDLER_POSTFIX = "</handler-class></handler>" ;
+   /**
+    * The path the the directory that will be used to generate the war file
+    * for EBWS deployments.
+    */
+   private String warFilesDir;
    
-   private final String WSADDR_NAME = "WSAddressing Handler" ;
-   private final String WSADDR_HANDLER = "org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler" ;
-   
-   private final String WSADDR_CONTEXT_NAME = "WSAddressing Context Handler" ;
-   private final String WSADDR_CONTEXT_HANDLER = AddressingHandler.class.getName() ;
-   
    /**
     * Default CTOR used to set default values to the Suffixes and RelativeOrder
     * attributes. Those are read at subdeployer registration time by the MainDeployer
@@ -126,9 +108,6 @@
    {
       setSuffixes(new String[]{".esb"});
       setRelativeOrder(1000); // before old EJB 2.1 deployer
-      final ServerConfig config = ServerConfigLocator.locate();
-      esbWarFiles = new File(config.getServerTempDeployDir(), "esbwarfiles") ;
-      esbWarFiles.mkdirs() ;
    }
    
    public static boolean hasFile(DeploymentInfo di, String filePath)
@@ -179,18 +158,7 @@
     */
    protected void startService() throws Exception
    {
-      final InputStream actionArtifactIS = ClassUtil.getResourceAsStream("/actionArtifactMap.properties", getClass()) ;
-      if (actionArtifactIS == null)
-      {
-         log.debug("No action artifact mapping") ;
-      }
-      else
-      {
-         log.debug("Loading action artifact mapping") ;
-         final Properties properties = new Properties() ;
-         properties.load(actionArtifactIS) ;
-         actionArtifactProperties = properties ;
-      }
+      actionArtifactProperties = JBossDeployerUtil.getArtifactProperties("/actionArtifactMap.properties");
       
       serviceController = (ServiceControllerMBean)
               MBeanProxyExt.create(ServiceControllerMBean.class,
@@ -207,7 +175,6 @@
       super.stopService();
    }
 
-
    protected URL getDocumentUrl(DeploymentInfo di)
    {
       String urlStr = di.url.toString();
@@ -220,6 +187,21 @@
 
    public void init(DeploymentInfo di) throws DeploymentException
    {
+      if (warFilesDir == null)
+      {
+          final String errorMsg = String.format("No property named '%s' was configured in jbossesb.sar/META-INF/jboss-service.xml for %s", "warFilesDir", getClass().getName());
+          throw new DeploymentException(errorMsg);
+      }
+          
+      final File tmpDir = new File(warFilesDir);
+      if (!tmpDir.exists())
+      {
+          final String errorMsg = String.format("The directory configured for %s='%s' does not exist.", "warFilesDir", tmpDir);
+          throw new DeploymentException(errorMsg);
+      }
+      
+      esbWarFiles = JBossDeployerUtil.createDir(tmpDir, "esbwarfiles");
+      
       try
       {
          if (di.url.getProtocol().equalsIgnoreCase("file"))
@@ -273,22 +255,10 @@
             throw new DeploymentException("Unable to find document url of META-INF/jboss-esb.xml in: "
                     + di.url);
          }
-         final InputStream inputStream = document.openStream();
-         final String jbossEsbXml ;
-         try
-         {
-             final StringWriter sw = new StringWriter() ;
-             XMLHelper.replaceSystemProperties(XMLHelper.getXMLStreamReader(inputStream),
-                 XMLHelper.getXMLStreamWriter(sw)) ;
-             jbossEsbXml = sw.toString();
-         }
-         finally
-         {
-             inputStream.close();
-         }
+         final String jbossEsbXml = JBossDeployerUtil.readEsbConfig(document.openStream()); ;
          
          final Set<ObjectName> deps = new HashSet<ObjectName>();
-         final ModelAdapter model = getJbossEsbModel(jbossEsbXml) ;
+         final ModelAdapter model = JBossDeployerUtil.getJbossEsbModel(jbossEsbXml) ;
          addActionDependencies(di.shortName, model, deps) ;
          
          JBoss4ESBDeployment deployment = new JBoss4ESBDeployment(jbossEsbXml, di.shortName);
@@ -297,6 +267,7 @@
          di.context.put(JBoss4ESBDeploymentMetaData.class, new JBoss4ESBDeploymentMetaData(deployment, deploymentName, deps)) ;
          // invoke super-class initialization
          super.init(di);
+         
          // create webservice WAR
          final ClassLoader origCL = Thread.currentThread().getContextClassLoader() ;
          final List<ContractReferencePublisher> publishers = new ArrayList<ContractReferencePublisher>() ;
@@ -304,7 +275,7 @@
          try
          {
              Thread.currentThread().setContextClassLoader(di.localCl) ;
-             warFile = createWebserviceWars(di, model, deploymentName, publishers) ;
+             warFile = createWebserviceWars(di, model, deploymentName, publishers);
          }
          finally
          {
@@ -425,20 +396,6 @@
       super.create(di);
    }
 
-   private ModelAdapter getJbossEsbModel(final String configuration)
-       throws DeploymentException
-   {
-       try
-       {
-           final StringReader sr = new StringReader(configuration) ;
-           return ModelParser.getParser().parse(sr) ;
-       }
-       catch (final Exception ex)
-       {
-           throw new DeploymentException("Failed to parse jboss-esb.xml", ex) ;
-       }
-   }
-   
    private void addActionDependencies(final String deploymentName,
       final ModelAdapter model, final Set<ObjectName> deps)
       throws MalformedObjectNameException
@@ -501,7 +458,7 @@
                        // Copy all schemas to the wsdl directory to support imports.
                        final File esbArchive = new File(di.watch.getFile());
                        final Map<String, String> schemasMap = JBoss4ESBDeployer.getSchemas(esbArchive);
-                	   final String wsdlDir = "WEB-INF/wsdl/" + service.getCategory().replace('/', '_') + "/";
+                       final String wsdlDir = "WEB-INF/wsdl/" + service.getCategory().replace('/', '_') + "/";
                        for (Entry<String, String> schemaEntry : schemasMap.entrySet())
                        {
                            try 
@@ -519,7 +476,7 @@
                        final String wsdl = ESBContractGenerator.generateWSDL(webserviceInfo, serviceInfo) ;
                        addFile(zos, serviceInfo.getWSDLFileName(), wsdl) ;
                        
-                       final String handlers = getHandlers(serviceInfo) ;
+                       final String handlers = JBossDeployerUtil.getHandlers(serviceInfo) ;
                        final boolean includeHandlers = (handlers != null) ;
                        if (includeHandlers)
                        {
@@ -598,6 +555,24 @@
        }
        return null ;
    }
+   
+   private File getESBWarFile(final String deploymentName, final String esbName, final boolean createDir)
+    {
+        final File esbDir = new File(esbWarFiles, deploymentName) ;
+        if (!esbDir.exists())
+        {
+            if (!createDir)
+            {
+                return null ;
+            }
+            esbDir.mkdir() ;
+        }
+        
+        final int lastSeparator = esbName.lastIndexOf('.') ;
+        final String warFileName = ((lastSeparator >= 0) ? esbName.substring(0, lastSeparator) : esbName) + ".war" ;
+        
+        return new File(esbDir, warFileName) ;
+    }
 
    private void addFile(final ZipOutputStream zos, final String filename, final String contents)
        throws IOException
@@ -663,7 +638,7 @@
       if (metaData != null)
       {
           final String deploymentName = metaData.getDeploymentName() ;
-          final File warFile = getESBWarFile(deploymentName, di.shortName, false) ;
+          final File warFile = JBossDeployerUtil.getESBWarFile(deploymentName, di.shortName, false, esbWarFiles) ;
           if (warFile != null)
           {
              warFile.delete();
@@ -687,24 +662,6 @@
       super.destroy(di);
    }
    
-    private File getESBWarFile(final String deploymentName, final String esbName, final boolean createDir)
-    {
-        final File esbDir = new File(esbWarFiles, deploymentName) ;
-        if (!esbDir.exists())
-        {
-            if (!createDir)
-            {
-                return null ;
-            }
-            esbDir.mkdir() ;
-        }
-        
-        final int lastSeparator = esbName.lastIndexOf('.') ;
-        final String warFileName = ((lastSeparator >= 0) ? esbName.substring(0, lastSeparator) : esbName) + ".war" ;
-        
-        return new File(esbDir, warFileName) ;
-    }
-    
     private synchronized void initialiseDeploymentName(final JBoss4ESBDeployment deployment)
     {
         final String deploymentName = deployment.getDeploymentName() ;
@@ -719,26 +676,13 @@
         esbNames.remove(deploymentName) ;
     }
     
-    private String getHandlers(final ESBServiceEndpointInfo serviceInfo)
+    /**
+     * Sets the directory that will be used for generating ESWS wars.
+     * @param String the directory to be used.
+     */
+    public void setWarFilesDir(final String dir)
     {
-        final String result ;
-        
-        if (!serviceInfo.isAddressing())
-        {
-            result = null ;
-        }
-        else
-        {
-            final StringBuilder sb = new StringBuilder(HANDLER_CHAIN_PREFIX) ;
-            if (serviceInfo.isAddressing())
-            {
-                sb.append(HANDLER_PREFIX).append(WSADDR_CONTEXT_NAME).append(HANDLER_MIDDLE).append(WSADDR_CONTEXT_HANDLER).append(HANDLER_POSTFIX) ;
-                sb.append(HANDLER_PREFIX).append(WSADDR_NAME).append(HANDLER_MIDDLE).append(WSADDR_HANDLER).append(HANDLER_POSTFIX) ;
-            }
-            sb.append(HANDLER_CHAIN_POSTFIX) ;
-            result = sb.toString() ;
-        }
-        return result ;
+        this.warFilesDir = dir;
     }
 
     static Map<String, String> getSchemas(final File file) throws DeploymentException
@@ -794,7 +738,7 @@
 
     private static boolean isXsd(final String fileName)
     {
-        return fileName.endsWith(".xsd");
+        return fileName.endsWith(".xsd");
     }
 
     static Map<String, String> getSchemasFromArchive(final File archive) throws DeploymentException

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployerMBean.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployerMBean.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployerMBean.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -31,4 +31,5 @@
  */
 public interface JBoss4ESBDeployerMBean extends SubDeployerMBean
 {
+    public void setWarFilesDir(final String dir);
 }

Copied: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers)

Copied: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc)

Deleted: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,368 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- * 
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- * 
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.listeners.deployers.mc;
-
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import org.apache.log4j.Logger;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.deployment.DeploymentException;
-import org.jboss.internal.soa.esb.util.JBossDeployerUtil;
-import org.jboss.metadata.MetaData;
-import org.jboss.metadata.XmlFileLoader;
-import org.jboss.mx.util.ObjectNameConverter;
-import org.jboss.soa.esb.listeners.config.model.ModelAdapter;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.w3c.dom.Element;
-
-/**
- * EsbConfigParser is a Microcontainer deployer that picks up jboss-esb.xml files, parses the content
- * and produces an {@link EsbMetaData} instance.
- * <p/>
- * Other implementations could read/parse a configuration form another source, for example store
- * the configurations in a database. As long as they produce the EsbMetaData they will be able to
- * be deployed.
- * 
- * Sample configuration:
- * <pre>{@code
- *  <bean name="EsbConfigParser" class="org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser">
- *   <property name="esbDeploymentPrefix">jboss.esb:deployment=</property>
- *   <property name="warDeploymentPrefix">jboss.web.deployment:war=</property>
- *   <property name="actionArtifactsFile">/actionArtifactMap.properties</property>
- * </bean>
- * }</pre>
- * 
- * <lu>
- *  <li><i>esbDeploymentPrefix</i> This is the prefix that a ESB archive deployments will have in JBoss AS. Defaults to 'jboss.esb:deployment='.</li>
- *  <li><i>warDeploymentPrefix</i> This is the prefix that a war archive deployments will have in JBoss AS. These  
- *      are used for .war archives specified in the 'esb-depends' section of a deployment.xml file. Defaults to 'jboss.web.deployment:war='
- *  </li>
- *  <li><i>actionArtifactsFile</i> Properties file containing an action name to .esb archive mapping. Defaults to '/actionArtifactMap.properties'.  
- *  <br>
- *  For example, and entry in the file could look like this: <br>
- *  org.jboss.soa.esb.smooks.SmooksAction=smooks.esb
- *  <br>
- *  This says that the SmooksAction exists in the smooks.esb archive. Adding these mappings means that commonly 
- *  used actions don't need to be explicetely added to the deployment.xml of all deployments. These will be implicit
- *  instead.
- *  </li>
- * </lu>
- * 
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- */
-public class EsbConfigParser extends AbstractVFSParsingDeployer<EsbMetaData>
-{
-    /**
-     * The default suffix of JBossESB configuration files that should be picked up.
-     */
-    private static final String ESB_FILE_SUFFIX = "-esb.xml";
-
-    /**
-     * The default suffix of JBossESB archives that should be accepted.
-     */
-    private static final String ESB_ARCHIVE_SUFFIX = ".esb";
-    
-    /**
-     * Name and path of the esb deployment.xml file.
-     */
-    private static final String ESB_DEPLOYMENT_XML = "META-INF/deployment.xml";
-    
-    /**
-     * File filter for esb config files.
-     */
-    private static EsbConfigFileFilter configFileFilter = new EsbConfigFileFilter();
-    
-    /**
-     * Default actions file name.
-     */
-    private String actionArtifactsFile = "/actionArtifactMap.properties";
-    
-    /**
-     * The actions to .esb archive mappings file.
-     */
-    private Properties actionArtifactProperties;
-    
-    /**
-     * Deployment prefix for esb deployments.
-     */
-    private String esbDeploymentPrefix = "jboss.esb:deployment=";
-    
-    /**
-     * Deployment prefix for war deployments. The are for the war declared in the 'esb-depends' section
-     * of deployment.xml.
-     */
-    private String warDeploymentPrefix = "jboss.web.deployment:war=";
-
-    /**
-     * Logger.
-     */
-    private Logger log = Logger.getLogger(EsbConfigParser.class);
-
-    /**
-     * Sole constructor that performas the following steps:
-     * <lu>
-     *  <li>Sets the output of this deployer to be {@link EsbMetaData}.</li>
-     *  <li>Sets the suffix to {@link EsbConfigParser#ESB_FILE_SUFFIX}.</li>
-     *  <li>Sets the jar extension to {@link EsbConfigParser#ESB_ARCHIVE_SUFFIX}.</li>
-     *  <li>Sets this deployers deployment stage to {@link DeploymentStages#PARSE}./li>
-     * </lu>
-     */
-    public EsbConfigParser()
-    {
-        super(EsbMetaData.class);
-        setSuffix(ESB_FILE_SUFFIX);
-        setJarExtension(ESB_ARCHIVE_SUFFIX);
-        setStage(DeploymentStages.PARSE);
-    }
-
-    /**
-     * Create will load the action artifacts file configured.
-     * 
-     * @throws Exception If the action artifacts files cannot be loaded.
-     */
-    public void create() throws Exception
-    {
-        log.info("Created");
-        actionArtifactProperties = JBossDeployerUtil.getArtifactProperties(actionArtifactsFile);
-    }
-
-    /**
-     * Will parse the VirtualFile representing the deployment and parse the esb configuration xml and extract information from 
-     * the archive to create an {@link EsbMetaData} instance that will be returned.
-     */
-    @Override
-    protected EsbMetaData parse(final VFSDeploymentUnit deploymentUnit, final VirtualFile file, final EsbMetaData metadata) throws Exception
-    {
-        final String esbConfigXml = readEsbConfigFile(file);
-        final String archiveName = deploymentUnit.getSimpleName();
-        final String deploymentName = getDeploymentName(deploymentUnit);
-        final ModelAdapter model = JBossDeployerUtil.getJbossEsbModel(esbConfigXml);
-        
-        // Get dependencies from deployment.xml.
-        final Set<ObjectName> dependencies = getDependenciesFromDeploymentXml(deploymentUnit);
-        // Get implicit action dependencies.
-        final Set<ObjectName> actionDependencies = getActionDependencies(deploymentName, model, actionArtifactProperties);
-        // Add all dependencies to set.
-        dependencies.addAll(actionDependencies);
-        
-        final EsbMetaData esbMetaData = new EsbMetaData(esbConfigXml, archiveName, deploymentName, dependencies, model);
-        log.debug("Parsed ESB configuration'" + esbMetaData + "'");
-        return esbMetaData;
-    }
-    
-    /**
-     * Tries to rescursively find a file that ends with "-esb.xml".
-     *
-     * @param file          The virtual file. Can point to a file or a directory which will be searched.
-     * @return VirtualFile  VirtualFile representing a found configuration file.
-     * @throws DeploymentException If not configuration file could be found, or more than one was found.
-     * @throws IOException 
-     */
-    private String readEsbConfigFile(final VirtualFile file) throws DeploymentException, IOException
-    {
-        if (file.getName().endsWith(ESB_FILE_SUFFIX))
-        {
-            return JBossDeployerUtil.readEsbConfig(file.openStream());
-        }
-
-        List<VirtualFile> esbConfigFiles;
-        try
-        {
-            esbConfigFiles = file.getChildrenRecursively(configFileFilter);
-        }
-        catch (final IOException e)
-        {
-            throw new DeploymentException(e.getMessage(), e);
-        }
-
-        final int esbConfigFilesFound = esbConfigFiles.size();
-
-        if (esbConfigFilesFound == 0)
-        {
-            throw new DeploymentException("No JBossESB configuration could be located the archive '" + file + "'");
-        }
-        else if (esbConfigFilesFound > 1)
-        {
-            throw new DeploymentException("Only one JBossESB configuration can exist in an archive. Please check '" + file + "'");
-        }
-        else
-        {
-            return JBossDeployerUtil.readEsbConfig(esbConfigFiles.get(0).openStream());
-        }
-    }
-    
-    private Set<ObjectName> getDependenciesFromDeploymentXml(final VFSDeploymentUnit deploymentUnit) throws DeploymentException
-    {
-        final Set<ObjectName> dependencies = new HashSet<ObjectName>();
-        final VirtualFile deploymentFile = deploymentUnit.getFile(ESB_DEPLOYMENT_XML);
-        try
-        {
-            if (deploymentFile != null && deploymentFile.exists())
-            {
-                try
-                {
-                    XmlFileLoader xfl = new XmlFileLoader();
-                    Element jboss = xfl.getDocument(deploymentFile.openStream(), ESB_DEPLOYMENT_XML).getDocumentElement();
-                    // Check for a ejb level class loading config
-                    @SuppressWarnings("unchecked")
-                    Iterator depends = MetaData.getChildrenByTagName(jboss, "depends");
-                    if (depends != null)
-                    {
-                        while (depends.hasNext())
-                        {
-                            Element depend = (Element) depends.next();
-                            dependencies.add(new ObjectName(MetaData.getElementContent(depend)));
-                        }
-                    }
-                    @SuppressWarnings("unchecked")
-                    Iterator esbDepends = MetaData.getChildrenByTagName(jboss, "esb-depends");
-                    if ((esbDepends != null) && esbDepends.hasNext())
-                    {
-                        Element depend = (Element) esbDepends.next();
-                        final String deployable = MetaData.getElementContent(depend);
-                        if (deployable.endsWith(".war"))
-                        {
-                            String objectName = warDeploymentPrefix + "/" + deployable.substring(0, deployable.indexOf('.'));
-                            dependencies.add(new ObjectName(objectName));
-                        }
-                    }
-                }
-                catch (final MalformedObjectNameException e)
-                {
-                    throw new org.jboss.deployment.DeploymentException(e.getMessage(), e);
-                } 
-            }
-        } 
-        catch (final IOException e)
-        {
-            throw new DeploymentException(e.getMessage(), e);
-        }
-        return dependencies;
-    }
-    
-    
-    /**
-     * Will go through the actions defined in the model (model of the esb configuration) and for every
-     * action that is defined in action artifacts properties adds that action as a dependency.
-     * This way there is no need to explicetely define dependencies in a separate deployment.xml file.
-     * 
-     * @param deploymentName The name of the deployment
-     * @param model The {@link ModelAdapter} representing the esb configuration.
-     * @param actionArtifactProperties The predefined actions that are to be automatically included as dependencies.
-     * @return Set<ObjectName> A set of {@link ObjectName}s that this esb deployment depends on.
-     * @throws DeploymentException
-     */
-    private Set<ObjectName> getActionDependencies(final String deploymentName, final ModelAdapter model, final Properties actionArtifactProperties) throws DeploymentException
-    {
-        final Set<ObjectName> deps = new HashSet<ObjectName>();
-        if (actionArtifactProperties == null)
-        {
-            // Return empty dependencies.
-            return deps;
-        }
-        
-        final Set<String> artifacts = new HashSet<String>() ;
-    
-        final Set<String> actionClasses = model.getActions() ;
-          
-        final int numActionClasses = (actionClasses == null ? 0 : actionClasses.size()) ;
-        if (numActionClasses > 0)
-        {
-            for(final String actionClass: actionClasses)
-            {
-                final String artifact = (String) actionArtifactProperties.get(actionClass) ;
-                if (artifact != null)
-                {
-                    artifacts.add(artifact) ;
-                }
-            }
-        }
-          
-        for(final String artifact: artifacts)
-        {
-            if (!deploymentName.equals(artifact))
-            {
-                final String canonicalName = esbDeploymentPrefix + artifact ;
-                try
-                {
-                    ObjectName on = ObjectNameConverter.convert(canonicalName);
-                    deps.add(on) ;
-                } 
-                catch (MalformedObjectNameException e)
-                {
-                    throw new DeploymentException(e.getMessage(), e);
-                }
-            }
-        }
-        return deps;
-    }
-    
-    private String getDeploymentName(final VFSDeploymentUnit deploymentUnit)
-    {
-        final String simpleName = deploymentUnit.getSimpleName();
-        return simpleName.substring(0, simpleName.indexOf(ESB_ARCHIVE_SUFFIX));
-    }
-
-    public void setActionArtifactsFile(final String actionArtifactsFile)
-    {
-        this.actionArtifactsFile = actionArtifactsFile;
-    }
-    
-    public void setEsbDeploymentPrefix(final String deploymentPrefix)
-    {
-        this.esbDeploymentPrefix = deploymentPrefix;
-    }
-    
-    public void setWarDeploymentPrefix(final String deploymentPrefix)
-    {
-        this.warDeploymentPrefix = deploymentPrefix;
-    }
-
-    /**
-     * Filter for filtering out ESB configuration files.
-     *
-     */
-    private static class EsbConfigFileFilter implements VirtualFileFilter
-    {
-        /**
-         * Accepts only files ending with the ESB_FILE_SUFFIX.
-         * 
-         * @param file  The file to filter.
-         * @return true If the file name ends with "-esb.xml".
-         */
-        public boolean accepts(final VirtualFile file)
-        {
-            return file.getName().endsWith(ESB_FILE_SUFFIX);
-        }
-    }
-
-}

Copied: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,374 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+import org.apache.log4j.Logger;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.deployment.DeploymentException;
+import org.jboss.internal.soa.esb.util.JBossDeployerUtil;
+import org.jboss.metadata.MetaData;
+import org.jboss.metadata.XmlFileLoader;
+import org.jboss.mx.util.ObjectNameConverter;
+import org.jboss.soa.esb.listeners.config.model.ModelAdapter;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VirtualFileFilter;
+import org.w3c.dom.Element;
+
+/**
+ * EsbConfigParser is a Microcontainer deployer that picks up jboss-esb.xml files, parses the content
+ * and produces an {@link EsbMetaData} instance.
+ * <p/>
+ * Other implementations could read/parse a configuration form another source, for example store
+ * the configurations in a database. As long as they produce the EsbMetaData they will be able to
+ * be deployed.
+ * 
+ * Sample configuration:
+ * <pre>{@code
+ *  <bean name="EsbConfigParser" class="org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser">
+ *   <property name="esbDeploymentPrefix">jboss.esb:deployment=</property>
+ *   <property name="warDeploymentPrefix">jboss.web.deployment:war=</property>
+ *   <property name="actionArtifactsFile">/actionArtifactMap.properties</property>
+ * </bean>
+ * }</pre>
+ * 
+ * <lu>
+ *  <li><i>esbDeploymentPrefix</i> This is the prefix that a ESB archive deployments will have in JBoss AS. Defaults to 'jboss.esb:deployment='.</li>
+ *  <li><i>warDeploymentPrefix</i> This is the prefix that a war archive deployments will have in JBoss AS. These  
+ *      are used for .war archives specified in the 'esb-depends' section of a deployment.xml file. Defaults to 'jboss.web.deployment:war='
+ *  </li>
+ *  <li><i>actionArtifactsFile</i> Properties file containing an action name to .esb archive mapping. Defaults to '/actionArtifactMap.properties'.  
+ *  <br>
+ *  For example, and entry in the file could look like this: <br>
+ *  org.jboss.soa.esb.smooks.SmooksAction=smooks.esb
+ *  <br>
+ *  This says that the SmooksAction exists in the smooks.esb archive. Adding these mappings means that commonly 
+ *  used actions don't need to be explicetely added to the deployment.xml of all deployments. These will be implicit
+ *  instead.
+ *  </li>
+ * </lu>
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ */
+public class EsbConfigParser extends AbstractVFSParsingDeployer<EsbMetaData>
+{
+    /**
+     * The default suffix of JBossESB configuration files that should be picked up.
+     */
+    private static final String ESB_FILE_SUFFIX = "-esb.xml";
+
+    /**
+     * The default suffix of JBossESB archives that should be accepted.
+     */
+    private static final String ESB_ARCHIVE_SUFFIX = ".esb";
+    
+    /**
+     * Name and path of the esb deployment.xml file.
+     */
+    private static final String ESB_DEPLOYMENT_XML = "META-INF/deployment.xml";
+    
+    /**
+     * File filter for esb config files.
+     */
+    private static EsbConfigFileFilter configFileFilter = new EsbConfigFileFilter();
+    
+    /**
+     * Default actions file name.
+     */
+    private String actionArtifactsFile = "/actionArtifactMap.properties";
+    
+    /**
+     * The actions to .esb archive mappings file.
+     */
+    private Properties actionArtifactProperties;
+    
+    /**
+     * Deployment prefix for esb deployments.
+     */
+    private String esbDeploymentPrefix = "jboss.esb:deployment=";
+    
+    /**
+     * Deployment prefix for war deployments. The are for the war declared in the 'esb-depends' section
+     * of deployment.xml.
+     */
+    private String warDeploymentPrefix = "jboss.web.deployment:war=";
+
+    /**
+     * Logger.
+     */
+    private Logger log = Logger.getLogger(EsbConfigParser.class);
+
+    /**
+     * Sole constructor that performas the following steps:
+     * <lu>
+     *  <li>Sets the output of this deployer to be {@link EsbMetaData}.</li>
+     *  <li>Sets the suffix to {@link EsbConfigParser#ESB_FILE_SUFFIX}.</li>
+     *  <li>Sets the jar extension to {@link EsbConfigParser#ESB_ARCHIVE_SUFFIX}.</li>
+     *  <li>Sets this deployers deployment stage to {@link DeploymentStages#PARSE}./li>
+     * </lu>
+     */
+    public EsbConfigParser()
+    {
+        super(EsbMetaData.class);
+        setSuffix(ESB_FILE_SUFFIX);
+        setJarExtension(ESB_ARCHIVE_SUFFIX);
+        setStage(DeploymentStages.PARSE);
+    }
+
+    /**
+     * Create will load the action artifacts file configured.
+     * 
+     * @throws Exception If the action artifacts files cannot be loaded.
+     */
+    public void create() throws Exception
+    {
+        log.info("Created");
+        actionArtifactProperties = JBossDeployerUtil.getArtifactProperties(actionArtifactsFile);
+    }
+
+    /**
+     * Will parse the VirtualFile representing the deployment and parse the esb configuration xml and extract information from 
+     * the archive to create an {@link EsbMetaData} instance that will be returned.
+     */
+    @Override
+    protected EsbMetaData parse(final VFSDeploymentUnit deploymentUnit, final VirtualFile file, final EsbMetaData metadata) throws Exception
+    {
+        final String esbConfigXml = readEsbConfigFile(file);
+        final String archiveName = deploymentUnit.getSimpleName();
+        final String deploymentName = getDeploymentName(deploymentUnit);
+        final ModelAdapter model = JBossDeployerUtil.getJbossEsbModel(esbConfigXml);
+        
+        // Get dependencies from deployment.xml.
+        final Set<ObjectName> dependencies = getDependenciesFromDeploymentXml(deploymentUnit);
+        
+        // Get implicit action dependencies.
+        final Set<ObjectName> actionDependencies = getActionDependencies(deploymentName, model, actionArtifactProperties);
+        
+        // Add all dependencies to set.
+        dependencies.addAll(actionDependencies);
+        
+        final EsbMetaData esbMetaData = new EsbMetaData(esbConfigXml, archiveName, deploymentName, dependencies, model);
+        log.debug("Parsed ESB configuration'" + esbMetaData + "'");
+        return esbMetaData;
+    }
+    
+    /**
+     * Tries to rescursively find a file that ends with "-esb.xml".
+     *
+     * @param file          The virtual file. Can point to a file or a directory which will be searched.
+     * @return VirtualFile  VirtualFile representing a found configuration file.
+     * @throws DeploymentException If not configuration file could be found, or more than one was found.
+     * @throws IOException 
+     */
+    private String readEsbConfigFile(final VirtualFile file) throws DeploymentException, IOException
+    {
+        if (file.getName().endsWith(ESB_FILE_SUFFIX))
+        {
+            return JBossDeployerUtil.readEsbConfig(file.openStream());
+        }
+
+        List<VirtualFile> esbConfigFiles;
+        try
+        {
+            esbConfigFiles = file.getChildrenRecursively(configFileFilter);
+        }
+        catch (final IOException e)
+        {
+            throw new DeploymentException(e.getMessage(), e);
+        }
+
+        if (esbConfigFiles.size() == 0)
+        {
+            throw new DeploymentException("No JBossESB configuration could be located the archive '" + file + "'");
+        }
+        else if (esbConfigFiles.size() > 1)
+        {
+            throw new DeploymentException("Only one JBossESB configuration can exist in an archive. Please check '" + file + "'");
+        }
+        else
+        {
+            return JBossDeployerUtil.readEsbConfig(esbConfigFiles.get(0).openStream());
+        }
+    }
+    
+    Set<ObjectName> getDependenciesFromDeploymentXml(final VFSDeploymentUnit unit) throws DeploymentException
+    {
+        final Set<ObjectName> dependencies = new HashSet<ObjectName>();
+        final VirtualFile deploymentXml = unit.getFile(ESB_DEPLOYMENT_XML);
+        
+        try
+        {
+            if (deploymentXml != null && deploymentXml.exists())
+            {
+                try
+                {
+                    XmlFileLoader xfl = new XmlFileLoader();
+                    Element jboss = xfl.getDocument(deploymentXml.openStream(), ESB_DEPLOYMENT_XML).getDocumentElement();
+                    // Check for a ejb level class loading config
+                    @SuppressWarnings("unchecked")
+                    Iterator depends = MetaData.getChildrenByTagName(jboss, "depends");
+                    if (depends != null)
+                    {
+                        while (depends.hasNext())
+                        {
+                            Element depend = (Element) depends.next();
+                            dependencies.add(new ObjectName(MetaData.getElementContent(depend)));
+                        }
+                    }
+                    @SuppressWarnings("unchecked")
+                    Iterator esbDepends = MetaData.getChildrenByTagName(jboss, "esb-depends");
+                    if ((esbDepends != null) && esbDepends.hasNext())
+                    {
+                        Element depend = (Element) esbDepends.next();
+                        final String deployable = MetaData.getElementContent(depend);
+                        if (deployable.endsWith(".war"))
+                        {
+                            String objectName = warDeploymentPrefix + "/" + deployable.substring(0, deployable.indexOf('.'));
+                            dependencies.add(new ObjectName(objectName));
+                        }
+                    }
+                }
+                catch (final MalformedObjectNameException e)
+                {
+                    throw new org.jboss.deployment.DeploymentException(e.getMessage(), e);
+                } 
+            }
+        } 
+        catch (final IOException e)
+        {
+            throw new DeploymentException(e.getMessage(), e);
+        }
+        return dependencies;
+    }
+    
+    
+    /**
+     * Will go through the actions defined in the model (model of the esb configuration) and for every
+     * action that is defined in action artifacts properties adds that action as a dependency.
+     * This way there is no need to explicetely define dependencies in a separate deployment.xml file.
+     * 
+     * @param deploymentName The name of the deployment
+     * @param model The {@link ModelAdapter} representing the esb configuration.
+     * @param actionArtifactProperties The predefined actions that are to be automatically included as dependencies.
+     * @return Set<ObjectName> A set of {@link ObjectName}s that this esb deployment depends on.
+     * @throws DeploymentException
+     */
+    private Set<ObjectName> getActionDependencies(final String deploymentName, final ModelAdapter model, final Properties actionArtifactProperties) throws DeploymentException
+    {
+        final Set<ObjectName> deps = new HashSet<ObjectName>();
+        if (actionArtifactProperties == null)
+        {
+            // Return empty dependencies.
+            return deps;
+        }
+        
+        final Set<String> artifacts = new HashSet<String>() ;
+    
+        final Set<String> actionClasses = model.getActions() ;
+          
+        final int numActionClasses = (actionClasses == null ? 0 : actionClasses.size()) ;
+        if (numActionClasses > 0)
+        {
+            for(final String actionClass: actionClasses)
+            {
+                final String artifact = (String) actionArtifactProperties.get(actionClass) ;
+                if (artifact != null)
+                {
+                    artifacts.add(artifact) ;
+                }
+            }
+        }
+          
+        for(final String artifact: artifacts)
+        {
+            if (!deploymentName.equals(artifact))
+            {
+                final String canonicalName = esbDeploymentPrefix + artifact ;
+                try
+                {
+                    ObjectName on = ObjectNameConverter.convert(canonicalName);
+                    deps.add(on) ;
+                } 
+                catch (MalformedObjectNameException e)
+                {
+                    throw new DeploymentException(e.getMessage(), e);
+                }
+            }
+        }
+        return deps;
+    }
+    
+    String getDeploymentName(final VFSDeploymentUnit deploymentUnit)
+    {
+        final String simpleName = deploymentUnit.getSimpleName();
+        int idx = simpleName.indexOf(ESB_ARCHIVE_SUFFIX);
+        if (idx == -1)
+        {
+            return simpleName;
+        }
+        return simpleName.substring(0, simpleName.indexOf(ESB_ARCHIVE_SUFFIX));
+    }
+
+    public void setActionArtifactsFile(final String actionArtifactsFile)
+    {
+        this.actionArtifactsFile = actionArtifactsFile;
+    }
+    
+    public void setEsbDeploymentPrefix(final String deploymentPrefix)
+    {
+        this.esbDeploymentPrefix = deploymentPrefix;
+    }
+    
+    public void setWarDeploymentPrefix(final String deploymentPrefix)
+    {
+        this.warDeploymentPrefix = deploymentPrefix;
+    }
+
+    /**
+     * Filter for filtering out ESB configuration files.
+     *
+     */
+    private static class EsbConfigFileFilter implements VirtualFileFilter
+    {
+        /**
+         * Accepts only files ending with the ESB_FILE_SUFFIX.
+         * 
+         * @param file  The file to filter.
+         * @return true If the file name ends with "-esb.xml".
+         */
+        public boolean accepts(final VirtualFile file)
+        {
+            return file.getName().endsWith(ESB_FILE_SUFFIX);
+        }
+    }
+
+}

Deleted: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployer.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployer.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployer.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,165 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.listeners.deployers.mc;
-
-import java.io.IOException;
-import java.util.Set;
-
-import javax.management.ObjectName;
-
-import org.apache.log4j.Logger;
-import org.jboss.aop.standalone.SystemClassLoader;
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.ClassLoaderMetaData;
-import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
-import org.jboss.classloader.spi.ClassLoaderSystem;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.deployment.DeploymentException;
-
-/**
- * EsbDeployer takes care of the deployment of an {@link BeanMetaData}
- * instance.
- * <p/>
- * 
- * This deployer actually only creates a BeanMetaData object describing a
- * {@link EsbDeployment}. The MicroContainer will take care of the actual
- * creation and starting of the deployment using it's lifecycle callbacks. <p/>
- * 
- * Example configuration:
- * 
- * <pre>{@code
- * <bean name="EsbDeployer" class="org.jboss.soa.esb.listeners.deployers.mc.EsbDeployer"/>
- * }</pre>
- * 
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- */
-public class EsbDeployer extends AbstractSimpleVFSRealDeployer<EsbMetaData>
-{
-    /**
-     * Logger.
-     */
-    private Logger log = Logger.getLogger(EsbDeployer.class);
-
-    /**
-     * Prefix used for the BeanMetaData and for the managenment bean name.
-     */
-    private static final String BEAN_PREFIX = "jboss.esb";
-    
-    /**
-     * No args constructor.
-     */
-    public EsbDeployer()
-    {
-        super(EsbMetaData.class);
-        // Tell the MicroContainer that we are producing BeanMetaData.
-        setOutput(BeanMetaData.class);
-        // Need access to classloaders
-        setStage(DeploymentStages.POST_CLASSLOADER);
-    }
-
-    public void create() throws Exception
-    {
-        log.info("Created");
-    }
-
-    /**
-     * Creates an {@link BeanMetaData} instance that describes the JBossESB
-     * deployment. The BeanMetaData is created using the information from the
-     * EsbMetaData object, such as the contents of jboss-esb.xml, archive name etc.
-     * 
-     * The BeanMeatData is then attached to the Microcontainers deployment unit
-     * and will be picked up by the BeanMetaDataDeployer.
-     * 
-     * @param deploymentUnit The deployment unit to deploy.
-     * @param esbMetaData The ESB MetaData that is associated with the deployment unit.
-     */
-    @Override
-    public final void deploy(final VFSDeploymentUnit deploymentUnit, final EsbMetaData esbMetaData) throws org.jboss.deployers.spi.DeploymentException
-    {
-        try
-        {
-            final BeanMetaData beanMetaData = createBeanMetaData(deploymentUnit, esbMetaData);
-            deploymentUnit.addAttachment(BeanMetaData.class.getName() + "_ESB", beanMetaData);
-            
-            log.debug("Created beanMetaData : " + beanMetaData);
-        } 
-        catch (final DeploymentException e)
-        {
-            throw new org.jboss.deployers.spi.DeploymentException(e.getMessage(), e);
-        } 
-        catch (final IOException e)
-        {
-            throw new org.jboss.deployers.spi.DeploymentException(e.getMessage(), e);
-        }
-    }
-    
-    /**
-     * Creates a {@link BeanMetaData} that describes the
-     * 
-     * @param deploymentUnit The deployment unit to deploy.
-     * @param esbMetaData The ESB MetaData that is associated with the deployment unit.
-     * @return BeanMetaData The {@link BeanMetaData} describing the EsbDeployment.
-     * 
-     * @throws IOException
-     * @throws DeploymentException
-     */
-    private BeanMetaData createBeanMetaData(final VFSDeploymentUnit deploymentUnit, final EsbMetaData esbMetaData) throws DeploymentException, IOException
-    {
-        log.info(esbMetaData);
-        BeanMetaDataBuilder bmdBuilder = BeanMetaDataBuilder.createBuilder(BEAN_PREFIX + "." + deploymentUnit.getName(), EsbDeployment.class.getName());
-        // Setup the first constructor argument (esb config xml).
-        bmdBuilder.addConstructorParameter(String.class.getName(), esbMetaData.getEsbConfigXml());
-        // Setup the second constructor argument (esb archive name).
-        bmdBuilder.addConstructorParameter(String.class.getName(), esbMetaData.getArchiveName());
-        // Setup the third constructor argument (the name of the mbean).
-        final String mbeanName = BEAN_PREFIX + ":deployment=" + deploymentUnit.getSimpleName();
-        bmdBuilder.addConstructorParameter(String.class.getName(), mbeanName);
-        // Add management annotation.
-        bmdBuilder.addAnnotation("@org.jboss.aop.microcontainer.aspects.jmx.JMX(registerDirectly=true, exposedInterface=void.class, name=\"" + mbeanName + "\")");
-
-        // Add dependencies to the Registry and Juddi
-        bmdBuilder.addDependency(BEAN_PREFIX + ":service=ESBRegistry");
-        bmdBuilder.addDependency(BEAN_PREFIX + ":service=JuddiRMI");
-
-        // Add the dependencies for this deployment.
-        Set<ObjectName> dependencies = esbMetaData.getDependencies();
-        for (ObjectName objectName : dependencies)
-        {
-            // The dependencies are added as demands. If we add them as dependencies
-            // they will get undeployed when this unit is undeployed.
-            log.debug("Adding depend " + objectName.toString() + " for " + esbMetaData.getDeploymentName());
-            bmdBuilder.addDemand(objectName.toString(), ControllerState.PRE_INSTALL, ControllerState.INSTALLED, null);
-        }
-
-        if (esbMetaData.getPublishers().size() > 0)
-        {
-            // set publishers on the deployment instance, or rather tell MC to do this for us.
-            log.debug("Adding publishers : " + esbMetaData.getPublishers());
-            bmdBuilder.addPropertyMetaData("publishers", esbMetaData.getPublishers());
-        }
-        
-        return bmdBuilder.getBeanMetaData();
-    }
-}
-        
\ No newline at end of file

Copied: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployer.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployer.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployer.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployer.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,196 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.apache.log4j.Logger;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.deployment.DeploymentException;
+
+/**
+ * EsbDeployer takes care of the deployment of an {@link EsbDeployment}.
+ * <p/>
+ * 
+ * This deployer actually only creates a BeanMetaData object describing a
+ * {@link EsbDeployment}. The MicroContainer will take care of the actual
+ * creation and starting of the deployment using it's lifecycle callbacks. <p/>
+ * 
+ * Example configuration:
+ * 
+ * <pre>{@code
+ *     <bean name="EsbDeployer" class="org.jboss.soa.esb.listeners.deployers.mc.EsbDeployer">
+ *        <property name="esbBeanPrefix">jboss.esb</property>
+ *        <property name="defaultDependencies">
+ *           <list elementClass="java.lang.String">
+ *              <value>jboss.esb:service=ESBRegistry</value>
+ *              <value>jboss.esb:service=JuddiRMI</value>
+ *            </list>
+ *        </property>
+ *     </bean>
+ * }</pre>
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ */
+public class EsbDeployer extends AbstractSimpleVFSRealDeployer<EsbMetaData>
+{
+    /**
+     * Logger.
+     */
+    private Logger log = Logger.getLogger(EsbDeployer.class);
+    
+    /**
+     * Prefix used for the BeanMetaData and for the managenment bean name.
+     */
+    private String esbBeanPrefix = "jboss.esb";
+    
+    /**
+     * Default dependencies that will be added to all {@link EsbDeployment}s.
+     */
+    private List<String> defaultDeps = new ArrayList<String>();
+    
+    /**
+     * No args constructor.
+     */
+    public EsbDeployer()
+    {
+        super(EsbMetaData.class);
+        // Tell the MicroContainer that we are producing BeanMetaData.
+        setOutput(BeanMetaData.class);
+        // Need access to classloaders
+        setStage(DeploymentStages.POST_CLASSLOADER);
+    }
+
+    /**
+     * Creates an {@link BeanMetaData} instance that describes the JBossESB
+     * deployment. The BeanMetaData is created using the information from the
+     * EsbMetaData object, such as the contents of jboss-esb.xml, archive name etc.
+     * 
+     * The BeanMeatData is then attached to the Microcontainers deployment unit
+     * and will be picked up by the BeanMetaDataDeployer.
+     * 
+     * @param deploymentUnit The deployment unit to deploy.
+     * @param esbMetaData The ESB MetaData that is associated with the deployment unit.
+     */
+    @Override
+    public final void deploy(final VFSDeploymentUnit deploymentUnit, final EsbMetaData esbMetaData) throws org.jboss.deployers.spi.DeploymentException
+    {
+        try
+        {
+            final BeanMetaData beanMetaData = createBeanMetaData(deploymentUnit, esbMetaData);
+            deploymentUnit.addAttachment(BeanMetaData.class.getName() + "_ESB", beanMetaData);
+            log.debug("Created beanMetaData : " + beanMetaData);
+        } 
+        catch (final DeploymentException e)
+        {
+            throw new org.jboss.deployers.spi.DeploymentException(e.getMessage(), e);
+        } 
+        catch (final IOException e)
+        {
+            throw new org.jboss.deployers.spi.DeploymentException(e.getMessage(), e);
+        }
+    }
+    
+    /**
+     * Creates a {@link BeanMetaData} that describes the
+     * 
+     * @param deploymentUnit The deployment unit to deploy.
+     * @param esbMetaData The ESB MetaData that is associated with the deployment unit.
+     * @return BeanMetaData The {@link BeanMetaData} describing the EsbDeployment.
+     * 
+     * @throws IOException
+     * @throws DeploymentException
+     */
+    private BeanMetaData createBeanMetaData(final VFSDeploymentUnit deploymentUnit, final EsbMetaData esbMetaData) throws DeploymentException, IOException
+    {
+        log.info(esbMetaData);
+        BeanMetaDataBuilder bmdBuilder = BeanMetaDataBuilder.createBuilder(esbBeanPrefix + "." + deploymentUnit.getName(), EsbDeployment.class.getName());
+        // Setup the first constructor argument (esb config xml).
+        bmdBuilder.addConstructorParameter(String.class.getName(), esbMetaData.getEsbConfigXml());
+        // Setup the second constructor argument (esb archive name).
+        bmdBuilder.addConstructorParameter(String.class.getName(), esbMetaData.getArchiveName());
+        // Setup the third constructor argument (the name of the mbean).
+        final String mbeanName = esbBeanPrefix + ":deployment=" + deploymentUnit.getSimpleName();
+        bmdBuilder.addConstructorParameter(String.class.getName(), mbeanName);
+        // Add management annotation.
+        bmdBuilder.addAnnotation("@org.jboss.aop.microcontainer.aspects.jmx.JMX(registerDirectly=true, exposedInterface=void.class, name=\"" + mbeanName + "\")");
+
+        // Add default dependencies.
+        for (String dependency : defaultDeps)
+        {
+            bmdBuilder.addDependency(dependency);
+        }
+
+        // Add the dependencies for this deployment.
+        Set<ObjectName> dependencies = esbMetaData.getDependencies();
+        for (ObjectName objectName : dependencies)
+        {
+            // The dependencies are added as demands. If we add them as dependencies
+            // they will get undeployed when this unit is undeployed.
+            log.debug("Adding depend " + objectName.toString() + " for " + esbMetaData.getDeploymentName());
+            bmdBuilder.addDemand(objectName.toString(), ControllerState.PRE_INSTALL, ControllerState.INSTALLED, null);
+        }
+
+        if (esbMetaData.getPublishers().size() > 0)
+        {
+            // set publishers on the deployment instance, or rather tell MC to do this for us.
+            log.debug("Adding publishers : " + esbMetaData.getPublishers());
+            bmdBuilder.addPropertyMetaData("publishers", esbMetaData.getPublishers());
+        }
+        
+        return bmdBuilder.getBeanMetaData();
+    }
+    
+    public void setEsbBeanPrefix(final String prefix)
+    {
+        this.esbBeanPrefix = prefix;
+    }
+    
+    public String getEsbBeanPrefix()
+    {
+        return esbBeanPrefix;
+    }
+    
+    public void setDefaultDependencies(final List<String> deps)
+    {
+        if (deps != null)
+        {
+            defaultDeps.addAll(deps);
+        }
+    }
+    
+    public List<String> getDefaultDependencies()
+    {
+        return Collections.unmodifiableList(defaultDeps);
+    }
+}
+        
\ No newline at end of file

Deleted: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployment.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployment.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployment.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,132 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.listeners.deployers.mc;
-
-import java.util.List;
-
-import javax.management.ObjectName;
-
-import org.apache.log4j.Logger;
-import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
-import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
-import org.jboss.soa.esb.listeners.config.Configuration;
-import org.jboss.soa.esb.listeners.config.ServicePublisher;
-import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController;
-
-/**
- * EsbDeployment for Microcontainer. 
- * <p/> 
- * 
- * Microcontainer will call the lifecycle methods:
- * <lu>
- *  <li><i>create</i> will create the ESB deployment.</i>
- *  <li><i>start</i> will start the ESB deployment.</i>
- *  <li><i>stop</i> will stop the ESB deployment.</i>
- *  <li><i>destroy</i> will destroy the ESB deployment.</i>
- * </lu>
- * 
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- */
-public class EsbDeployment implements EsbDeploymentMBean
-{
-    private Logger log = Logger.getLogger(EsbDeployment.class);
-    
-    private final String jbossEsbXml;
-    private String deploymentName;
-    private List<ContractReferencePublisher> publishers;
-    private ManagedLifecycleController controller;
-    private final String mbeanName;
-    
-    public EsbDeployment(final String config, final String deploymentName, final String mbeanName) throws Exception
-    {
-        this.jbossEsbXml = config;
-        this.deploymentName = deploymentName;
-        this.mbeanName = mbeanName;
-    }
-    
-    public String getJbossEsbXml()
-    {
-        return jbossEsbXml;
-    }
-
-    public String getJbossEsbXmlAsHtml()
-    {
-        return jbossEsbXml.replace("<", "&lt;").replace(">", "&gt;");
-    }
-
-    public void setPublishers(final List<ContractReferencePublisher> publishers)
-    {
-        this.publishers = publishers;
-    }
-
-    public ManagedLifecycleController getController()
-    {
-        return controller;
-    }
-
-    public String getDeploymentName()
-    {
-        return deploymentName;
-    }
-
-    public void setDeploymentName(final String deploymentName)
-    {
-        this.deploymentName = deploymentName;
-    }
-
-    public List<ContractReferencePublisher> getPublishers()
-    {
-        return publishers;
-    }
-
-    public void create()
-    {
-        LifecycleResourceManager.getSingleton().associateDeployment(deploymentName) ;
-    }
-
-    public void start() throws Exception
-    {
-        log.info("Starting EBS Deployment '" + deploymentName + "'");
-        
-        if (controller == null)
-        {
-            controller = Configuration.create(jbossEsbXml, new ObjectName(mbeanName), publishers);
-            controller.start();
-        }
-    }
-
-    public void stop() throws Exception
-    {
-        log.info("Stopping EBS Deployment '" + deploymentName + "'");
-        
-        ServicePublisher.removeServicePublishers(controller);
-        controller.stop();
-    }
-
-    public void destroy() throws Exception
-    {
-        log.info("Destroying ESB Deployment '" + deploymentName + "'");
-        
-        LifecycleResourceManager.getSingleton().disassociateDeployment(deploymentName);
-        LifecycleResourceManager.getSingleton().destroyResources();
-    }
-}

Copied: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployment.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployment.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployment.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployment.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,133 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
+import org.jboss.soa.esb.listeners.config.Configuration;
+import org.jboss.soa.esb.listeners.config.ServicePublisher;
+import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController;
+
+/**
+ * EsbDeployment for Microcontainer. 
+ * <p/> 
+ * 
+ * Microcontainer will call the lifecycle methods:
+ * <lu>
+ *  <li><i>create</i> will create the ESB deployment.</i>
+ *  <li><i>start</i> will start the ESB deployment.</i>
+ *  <li><i>stop</i> will stop the ESB deployment.</i>
+ *  <li><i>destroy</i> will destroy the ESB deployment.</i>
+ * </lu>
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ */
+public class EsbDeployment implements EsbDeploymentMBean
+{
+    private Logger log = Logger.getLogger(EsbDeployment.class);
+    
+    private final String jbossEsbXml;
+    private String deploymentName;
+    private List<ContractReferencePublisher> publishers;
+    private ManagedLifecycleController controller;
+    private final String mbeanName;
+    
+    public EsbDeployment(final String config, final String deploymentName, final String mbeanName) throws Exception
+    {
+        this.jbossEsbXml = config;
+        this.deploymentName = deploymentName;
+        this.mbeanName = mbeanName;
+    }
+    
+    public String getJbossEsbXml()
+    {
+        return jbossEsbXml;
+    }
+
+    public String getJbossEsbXmlAsHtml()
+    {
+        return jbossEsbXml.replace("<", "&lt;").replace(">", "&gt;");
+    }
+
+    public void setPublishers(final List<ContractReferencePublisher> publishers)
+    {
+        this.publishers = publishers;
+    }
+
+    public ManagedLifecycleController getController()
+    {
+        return controller;
+    }
+
+    public String getDeploymentName()
+    {
+        return deploymentName;
+    }
+
+    public void setDeploymentName(final String deploymentName)
+    {
+        this.deploymentName = deploymentName;
+    }
+
+    public List<ContractReferencePublisher> getPublishers()
+    {
+        return publishers;
+    }
+
+    public void create()
+    {
+        LifecycleResourceManager.getSingleton().associateDeployment(deploymentName) ;
+        LifecycleResourceManager.deactivateHook() ;
+    }
+
+    public void start() throws Exception
+    {
+        log.info("Starting EBS Deployment '" + deploymentName + "'");
+        
+        if (controller == null)
+        {
+            controller = Configuration.create(jbossEsbXml, new ObjectName(mbeanName), publishers);
+            controller.start();
+        }
+    }
+
+    public void stop() throws Exception
+    {
+        log.info("Stopping '" + deploymentName + "'");
+        
+        ServicePublisher.removeServicePublishers(controller);
+        controller.stop();
+    }
+
+    public void destroy() throws Exception
+    {
+        log.info("Destroying '" + deploymentName + "'");
+        
+        LifecycleResourceManager.getSingleton().disassociateDeployment(deploymentName);
+        LifecycleResourceManager.getSingleton().destroyResources();
+    }
+}

Deleted: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeploymentMBean.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeploymentMBean.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeploymentMBean.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.listeners.deployers.mc;
-
-/**
- * Interface for exposing JMX operations.
- * 
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- */
-public interface EsbDeploymentMBean
-{
-    /**
-     * Start a deployment.
-     * 
-     * @throws Exception  If an exception occurs while starting.
-     */
-    void start() throws Exception;
-
-    /**
-     * Stop a deployment.
-     * 
-     * @throws Exception  If an exeption occurs while stoping.
-     */
-    void stop() throws Exception;
-
-    /**
-     * Gets the jboss-esb.xml configuration.
-     * 
-     * @return String   The jboss-esb.xml files content.
-     */
-    String getJbossEsbXml();
-
-    /**
-     * Gets the jboss-esb.xml configuration as html.
-     * 
-     * @return String   The jboss-esb.xml files content as html.
-     */
-    String getJbossEsbXmlAsHtml();
-}

Copied: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeploymentMBean.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeploymentMBean.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeploymentMBean.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeploymentMBean.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+/**
+ * Interface for exposing JMX operations.
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ */
+public interface EsbDeploymentMBean
+{
+    /**
+     * Start a deployment.
+     * 
+     * @throws Exception  If an exception occurs while starting.
+     */
+    void start() throws Exception;
+
+    /**
+     * Stop a deployment.
+     * 
+     * @throws Exception  If an exeption occurs while stoping.
+     */
+    void stop() throws Exception;
+
+    /**
+     * Gets the jboss-esb.xml configuration.
+     * 
+     * @return String   The jboss-esb.xml files content.
+     */
+    String getJbossEsbXml();
+
+    /**
+     * Gets the jboss-esb.xml configuration as html.
+     * 
+     * @return String   The jboss-esb.xml files content as html.
+     */
+    String getJbossEsbXmlAsHtml();
+}

Deleted: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbMetaData.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbMetaData.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbMetaData.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,163 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.listeners.deployers.mc;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-
-import javax.management.ObjectName;
-
-import org.jboss.internal.soa.esb.assertion.AssertArgument;
-import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
-import org.jboss.soa.esb.listeners.config.model.ModelAdapter;
-
-/**
- * Metadata for an ESB deployment.
- * <p/>
- *
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- */
-public class EsbMetaData implements Serializable
-{
-    /** Serial version unique identifier. */
-    private static final long serialVersionUID = 0L;
-
-    /** The name of the .esb archive. */
-    private String archiveName;
-
-    /** The ESB configuration xml. */
-    private final String esbConfigXml;
-    
-    /** The deployments dependencies */
-    private final Set<ObjectName> dependencies ;
-    
-    /** The deployment name. The .esb archive name without the .esb suffix */
-    private final String deploymentName;
-    
-    /** The adapter for querying the model */
-    private ModelAdapter model;
-    
-    /** The publishers for this deployment */
-    private List<ContractReferencePublisher> publishers = new ArrayList<ContractReferencePublisher>();
-    
-    /**
-     * Sole constructor.
-     *
-     * @param esbConfigXml      The xml configuration for the ESB.
-     * @param archiveName       The name of the .esb archive from which this deployment comes from.
-     * @param dependencies      Dependencies of this deployment. This might be object names or simply bean names.
-     * @param model             The ModelAdapter for the deployment.
-     */
-    public EsbMetaData(final String esbConfigXml, final String archiveName, final String deploymentName, final Set<ObjectName> dependencies, final ModelAdapter model)
-    {
-        AssertArgument.isNotNullAndNotEmpty(esbConfigXml, "esbConfigXml");
-        AssertArgument.isNotNullAndNotEmpty(archiveName, "archiveName");
-        AssertArgument.isNotNullAndNotEmpty(deploymentName, "deploymentName");
-        
-        this.esbConfigXml = esbConfigXml;
-        this.archiveName = archiveName;
-        this.deploymentName = deploymentName;
-        this.dependencies = dependencies;
-        this.model = model;
-    }
-
-    /**
-     * Gets the name of the archive that this metadata came from.
-     *
-     * @return String   The name of the archive that this metadata came from.
-     */
-    public final String getArchiveName()
-    {
-        return archiveName;
-    }
-
-    /**
-     * Gets the esb xml configuration. This is the actual xml
-     * and not a file path or anything else.
-     * @return String The esb xml configuration.
-     */
-    public String getEsbConfigXml()
-    {
-        return esbConfigXml;
-    }
-    
-    /**
-     * Gets a set of dependencies of this deployment.
-     * 
-     * @return Set<ObjectName> A set of object names that the deployment represented by this instance depends on.
-     */
-    public Set<ObjectName> getDependencies()
-    {
-        return Collections.unmodifiableSet(dependencies);
-    }
-    
-    /**
-     * The deployment name is the name of the .esb archive without the .esb suffix.
-     * 
-     * @return String The name of the deployment. This is the archive name without the .esb suffix.
-     */
-    public String getDeploymentName()
-    {
-        return deploymentName;
-    }
-    
-    /**
-     * The model adapter for the configuration.
-     * 
-     * @return ModelAdapter The model adapter for the configuration.
-     */
-    public ModelAdapter getModel()
-    { 
-        return model;
-    }
-    
-    /**
-     * Sets the publishers for this deployment.
-     * 
-     * @param publishers The publishers for this deployment.
-     */
-    public void setPublishers(final List<ContractReferencePublisher> publishers)
-    {
-        this.publishers = publishers;
-    }
-    
-    /**
-     * Gets the publishers for this deployment.
-     * 
-     * @return List<ContractReferencePublishers> List of publishers for this deployment.
-     */
-    public List<ContractReferencePublisher> getPublishers()
-    {
-        return Collections.unmodifiableList(publishers);
-    }
-
-    /**
-     * @return String   String representation of this metadata.
-     */
-    @Override
-    public final String toString()
-    {
-        return String.format("EsbMetaData [archiveName='%s', deploymentName='%s', dependencies='%s']", archiveName, deploymentName, dependencies);
-    }
-}

Copied: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbMetaData.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbMetaData.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbMetaData.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbMetaData.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,163 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.jboss.internal.soa.esb.assertion.AssertArgument;
+import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
+import org.jboss.soa.esb.listeners.config.model.ModelAdapter;
+
+/**
+ * Metadata for an ESB deployment.
+ * <p/>
+ *
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ */
+public class EsbMetaData implements Serializable
+{
+    /** Serial version unique identifier. */
+    private static final long serialVersionUID = 0L;
+
+    /** The name of the .esb archive. */
+    private String archiveName;
+
+    /** The ESB configuration xml. */
+    private final String esbConfigXml;
+    
+    /** The deployments dependencies */
+    private final Set<ObjectName> dependencies ;
+    
+    /** The deployment name. The .esb archive name without the .esb suffix */
+    private final String deploymentName;
+    
+    /** The adapter for querying the model */
+    private ModelAdapter model;
+    
+    /** The publishers for this deployment */
+    private List<ContractReferencePublisher> publishers = new ArrayList<ContractReferencePublisher>();
+    
+    /**
+     * Sole constructor.
+     *
+     * @param esbConfigXml      The xml configuration for the ESB.
+     * @param archiveName       The name of the .esb archive from which this deployment comes from.
+     * @param dependencies      Dependencies of this deployment. This might be object names or simply bean names.
+     * @param model             The ModelAdapter for the deployment.
+     */
+    public EsbMetaData(final String esbConfigXml, final String archiveName, final String deploymentName, final Set<ObjectName> dependencies, final ModelAdapter model)
+    {
+        AssertArgument.isNotNullAndNotEmpty(esbConfigXml, "esbConfigXml");
+        AssertArgument.isNotNullAndNotEmpty(archiveName, "archiveName");
+        AssertArgument.isNotNullAndNotEmpty(deploymentName, "deploymentName");
+        
+        this.esbConfigXml = esbConfigXml;
+        this.archiveName = archiveName;
+        this.deploymentName = deploymentName;
+        this.dependencies = dependencies;
+        this.model = model;
+    }
+
+    /**
+     * Gets the name of the archive that this metadata came from.
+     *
+     * @return String   The name of the archive that this metadata came from.
+     */
+    public final String getArchiveName()
+    {
+        return archiveName;
+    }
+
+    /**
+     * Gets the esb xml configuration. This is the actual xml
+     * and not a file path or anything else.
+     * @return String The esb xml configuration.
+     */
+    public String getEsbConfigXml()
+    {
+        return esbConfigXml;
+    }
+    
+    /**
+     * Gets a set of dependencies of this deployment.
+     * 
+     * @return Set<ObjectName> A set of object names that the deployment represented by this instance depends on.
+     */
+    public Set<ObjectName> getDependencies()
+    {
+        return Collections.unmodifiableSet(dependencies);
+    }
+    
+    /**
+     * The deployment name is the name of the .esb archive without the .esb suffix.
+     * 
+     * @return String The name of the deployment. This is the archive name without the .esb suffix.
+     */
+    public String getDeploymentName()
+    {
+        return deploymentName;
+    }
+    
+    /**
+     * The model adapter for the configuration.
+     * 
+     * @return ModelAdapter The model adapter for the configuration.
+     */
+    public ModelAdapter getModel()
+    { 
+        return model;
+    }
+    
+    /**
+     * Sets the publishers for this deployment.
+     * 
+     * @param publishers The publishers for this deployment.
+     */
+    public void setPublishers(final List<ContractReferencePublisher> publishers)
+    {
+        this.publishers = publishers;
+    }
+    
+    /**
+     * Gets the publishers for this deployment.
+     * 
+     * @return List<ContractReferencePublishers> List of publishers for this deployment.
+     */
+    public List<ContractReferencePublisher> getPublishers()
+    {
+        return Collections.unmodifiableList(publishers);
+    }
+
+    /**
+     * @return String   String representation of this metadata.
+     */
+    @Override
+    public final String toString()
+    {
+        return String.format("EsbMetaData [archiveName='%s', deploymentName='%s', dependencies='%s']", archiveName, deploymentName, dependencies);
+    }
+}

Deleted: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployer.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployer.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployer.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,269 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- * 
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- * 
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.listeners.deployers.mc;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
-import org.jboss.internal.soa.esb.util.JBossDeployerUtil;
-import org.jboss.internal.soa.esb.webservice.ESBResponseFilter;
-import org.jboss.internal.soa.esb.webservice.ESBServiceContractPublisher;
-import org.jboss.internal.soa.esb.webservice.ESBServiceEndpointInfo;
-import org.jboss.internal.soa.esb.webservice.JAXWSProviderClassGenerator;
-import org.jboss.internal.soa.esb.webservice.WebServicePublishException;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
-import org.jboss.metadata.javaee.spec.ParamValueMetaData;
-import org.jboss.metadata.web.jboss.JBossServletMetaData;
-import org.jboss.metadata.web.jboss.JBossServletsMetaData;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.metadata.web.spec.FilterMetaData;
-import org.jboss.metadata.web.spec.FiltersMetaData;
-import org.jboss.metadata.web.spec.ServletMappingMetaData;
-import org.jboss.soa.esb.Service;
-import org.jboss.soa.esb.listeners.config.WebserviceInfo;
-import org.jboss.virtual.MemoryFileFactory;
-import org.jboss.virtual.VirtualFile;
-
-/**
- * EsbWebServiceDeployer is responsible for deploying the web service that will
- * expose the underlying ESB service as a web service.
- * <p/>
- * 
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- *
- */
-public class EsbWebServiceDeployer extends AbstractSimpleVFSRealDeployer<EsbMetaData>
-{
-    /** Logger */
-    private Logger log = Logger.getLogger(EsbWebServiceDeployer.class);
-    
-    /**
-     * Key used for attaching a VirtualFile representing a ref to 
-     * a dynamically created virtual file system.
-     */
-    private static final String DYNAMIC_CL_DIR_KEY = "WS-DYNAMIC-CL-DIR";
-    
-    /**
-     * Key used for attaching a URL representing a ref to 
-     * a dynamically created virtual file system.
-     */
-    private static final String DYNAMIC_CL_URL_KEY = "WS-DYNAMIC-CL-URL";
-    
-    /**
-     * Sole constructor that performas the following steps:
-     * <lu>
-     *  <li>Sets the output of this deployer to be {@link EsbMetaData}.</li>
-     *  <li>Sets this deployers deployment stage to {@link DeploymentStages#POST_PARSE}./li>
-     *  <li>Specifies that this deployer produces JBossWebMetaData and EsbMetaData./li>
-     * </lu>
-     */
-    public EsbWebServiceDeployer()
-    {
-        super(EsbMetaData.class);
-        setStage(DeploymentStages.POST_PARSE);
-        setOutput(JBossWebMetaData.class);
-        setOutput(EsbMetaData.class);
-    }
-    
-    /**
-     * Create only logs that this deployer has been created.
-     */
-    public void create()
-    {
-        log.info("Created");
-    }
-    
-    @Override
-    public void deploy(final VFSDeploymentUnit deploymentUnit, final EsbMetaData esbMetaData) throws DeploymentException
-    {
-        final List<WebserviceInfo> endpointServices = esbMetaData.getModel().getWebserviceServices();
-        if (hasWebServices(endpointServices))
-        {
-            log.debug("Deploying webservices for : " + esbMetaData.getDeploymentName());
-            
-            final JBossWebMetaData webMetaData = new JBossWebMetaData();
-            final JBossServletsMetaData servlets = new JBossServletsMetaData();
-            final List<ServletMappingMetaData> servletMappings = new ArrayList<ServletMappingMetaData>();
-            final FiltersMetaData filters = new FiltersMetaData();
-            final List<ContractReferencePublisher> publishers = new ArrayList<ContractReferencePublisher>() ;
-            final WebserviceDescriptionsMetaData descriptions = new WebserviceDescriptionsMetaData();
-                
-            try
-            {
-                // Used to dynamically add in-memory files to the deployment.
-                final URL dynamicClasspathUrl = createDynamicVFS(deploymentUnit, esbMetaData);
-                
-                // Create WEB-INF/classes
-                final URL webInfUrl = new URL(dynamicClasspathUrl.toExternalForm() + "/WEB-INF");
-                final URL classesUrl = new URL(webInfUrl + "/classes/");
-                final VirtualFile classesDir = MemoryFileFactory.createDirectory(classesUrl);
-                deploymentUnit.addClassPath(classesDir);
-                    
-                final JAXWSProviderClassGenerator generator = new JAXWSProviderClassGenerator();
-                for (WebserviceInfo webserviceInfo : endpointServices)
-                {
-                    final ESBServiceEndpointInfo serviceInfo = new ESBServiceEndpointInfo(webserviceInfo);
-                    final String handlers = JBossDeployerUtil.getHandlers(serviceInfo);
-                    final boolean includeHandlers = (handlers != null);
-                    if (includeHandlers)
-                    {
-                        deploymentUnit.appendMetaDataLocation(classesDir);
-                        final String wsHandlerName = serviceInfo.getPackageName().replace('.', '/') + "/esb-jaxws-handlers.xml";
-                        MemoryFileFactory.putFile(new URL(classesUrl + wsHandlerName), handlers.getBytes());
-                    }
-                        
-                    if (serviceInfo.isOneWay())
-                    {
-                        filters.add(createFilter(serviceInfo));
-                    }
-                    
-                    final Service service = webserviceInfo.getService();
-                        
-                    // Generate the servlet class bytes
-                    final byte[] servletClass = generator.generate(service.getCategory(), service.getName(), serviceInfo, includeHandlers);
-                    final String servletClassName = serviceInfo.getClassName().replace('.', '/') + ".class";
-                    final URL servletClassUrl = new URL(classesUrl + "/" + servletClassName);
-                    // Add the servlet to the virtual file system.
-                    MemoryFileFactory.putFile(servletClassUrl, servletClass);
-                    log.debug("Generated ws impl: " + servletClassUrl);
-                        
-                    servlets.add(createServlets(service, serviceInfo, generator, includeHandlers));
-                    servletMappings.add(createServletMapping(serviceInfo));
-                    
-                    WebserviceDescriptionMetaData description = new WebserviceDescriptionMetaData();
-                    description.setName(esbMetaData.getDeploymentName());
-                    description.setWebserviceDescriptionName(esbMetaData.getDeploymentName());
-                    description.setWsdlPublishLocation(serviceInfo.getWSDLFileName());
-                    descriptions.add(description);
-                    
-                    final ContractReferencePublisher publisher = new ESBServiceContractPublisher(service, webserviceInfo.getDescription(), serviceInfo.getServletName());
-                    publishers.add(publisher);
-                }
-            }
-            catch (final Exception e)
-            {
-                throw new DeploymentException("Failed to create webservice artifact", e);
-            }
-                
-            webMetaData.setContextRoot(esbMetaData.getDeploymentName());
-            webMetaData.setServlets(servlets);
-            webMetaData.setServletMappings(servletMappings);
-            webMetaData.setFilters(filters);
-            webMetaData.setWebserviceDescriptions(descriptions);
-            esbMetaData.setPublishers(publishers);
-            
-            deploymentUnit.addAttachment(JBossWebMetaData.class, webMetaData);
-        }
-    }
-    
-    private URL createDynamicVFS(final VFSDeploymentUnit deploymentUnit, final EsbMetaData esbMetaData) throws IOException
-    {
-        // Used to dynamically add in-memory files to the deployment.
-        final URL dynamicClasspathUrl = new URL("vfsmemory", esbMetaData.getDeploymentName(), "");
-        final VirtualFile dynamicClasspathDir = MemoryFileFactory.createRoot(dynamicClasspathUrl).getRoot();
-                
-        // Attach the dynamic classpath URL and virtual file to this deployment unit so we can 
-        // remove then upon undeploy.
-        deploymentUnit.addAttachment(DYNAMIC_CL_DIR_KEY, dynamicClasspathDir);
-        deploymentUnit.addAttachment(DYNAMIC_CL_URL_KEY, dynamicClasspathUrl);
-                
-        // Add the dynamic classpath to this deployment unit.
-        deploymentUnit.addClassPath(dynamicClasspathDir);
-        return dynamicClasspathUrl;
-        
-    }
-    
-    private boolean hasWebServices(final List<WebserviceInfo> endpointServices)
-    {
-        return endpointServices != null && endpointServices.size() > 0;
-    }
-
-    @Override
-    public void undeploy(final VFSDeploymentUnit deploymentUnit, final EsbMetaData esbMetaData) 
-    {
-        log.debug("Removing dynamic class root for " + deploymentUnit.getName());
-        try
-        {
-            final VirtualFile classes = deploymentUnit.removeAttachment(DYNAMIC_CL_DIR_KEY, VirtualFile.class);
-            if (classes != null)
-            {
-                deploymentUnit.removeClassPath(classes);
-            }
-        }
-        finally
-        {
-            try
-            {
-                final URL root = deploymentUnit.removeAttachment(DYNAMIC_CL_URL_KEY, URL.class);
-                if (root != null)
-                {
-                    MemoryFileFactory.deleteRoot(root);
-                }
-            }
-            catch (final Exception e)
-            {
-                log.warn("Error deleting dynamic class root for " + deploymentUnit.getName(), e);
-            }
-        }
-    }
-    
-    private ServletMappingMetaData createServletMapping(final ESBServiceEndpointInfo serviceInfo)
-    {
-        final ServletMappingMetaData servletMapping = new ServletMappingMetaData();
-        servletMapping.setServletName(serviceInfo.getServletName());
-        servletMapping.setUrlPatterns(Arrays.asList(new String[] { serviceInfo.getServletPath()}));
-        return servletMapping;
-    }
-
-    private JBossServletMetaData createServlets(final Service service, final ESBServiceEndpointInfo serviceInfo, final JAXWSProviderClassGenerator generator, final boolean includeHandlers) throws WebServicePublishException
-    {
-        final JBossServletMetaData servlet = new JBossServletMetaData();
-        servlet.setServletName(serviceInfo.getServletName());
-        servlet.setServletClass(serviceInfo.getClassName());
-        servlet.setLoadOnStartup(1);
-        return servlet;
-    }
-
-    private FilterMetaData createFilter(final ESBServiceEndpointInfo serviceInfo)
-    {
-        // Filter
-        final FilterMetaData filter = new FilterMetaData();
-        filter.setFilterName(serviceInfo.getServletName() + "_Filter");
-        filter.setFilterClass(ESBResponseFilter.class.getName());
-                            
-        // Set up the initparam 'OneWay'
-        final ParamValueMetaData oneWayInitParam = new ParamValueMetaData();
-        oneWayInitParam.setParamName("OneWay");
-        oneWayInitParam.setParamValue("true");
-        filter.setInitParam(Arrays.asList(new ParamValueMetaData[] {oneWayInitParam}));
-        return filter;
-    }
-}

Copied: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployer.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployer.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployer.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployer.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,283 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
+import org.jboss.internal.soa.esb.util.JBossDeployerUtil;
+import org.jboss.internal.soa.esb.webservice.ESBResponseFilter;
+import org.jboss.internal.soa.esb.webservice.ESBServiceContractPublisher;
+import org.jboss.internal.soa.esb.webservice.ESBServiceEndpointInfo;
+import org.jboss.internal.soa.esb.webservice.JAXWSProviderClassGenerator;
+import org.jboss.internal.soa.esb.webservice.WebServicePublishException;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
+import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.metadata.web.jboss.JBossServletMetaData;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.FilterMetaData;
+import org.jboss.metadata.web.spec.FiltersMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.soa.esb.Service;
+import org.jboss.soa.esb.listeners.config.WebserviceInfo;
+import org.jboss.soa.esb.listeners.deployers.mc.util.VfsUtil;
+import org.jboss.virtual.MemoryFileFactory;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * EsbWebServiceDeployer is responsible for deploying the web service that will
+ * expose the underlying ESB service as a web service.
+ * <p/>
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ *
+ */
+public class EsbWebServiceDeployer extends AbstractSimpleVFSRealDeployer<EsbMetaData>
+{
+    /** Logger */
+    private Logger log = Logger.getLogger(EsbWebServiceDeployer.class);
+    
+    /**
+     * Key used for attaching a VirtualFile representing a ref to 
+     * a dynamically created root virtual file system.
+     */
+    static final String DYNAMIC_CL_DIR_KEY = "WS-DYNAMIC-CL-DIR";
+    
+    /**
+     * Key used for attaching a URL representing a ref to 
+     * a dynamically created root virtual file system.
+     */
+    static final String DYNAMIC_CL_URL_KEY = "WS-DYNAMIC-CL-URL";
+    
+    /**
+     * Key used for attaching a VirtualFile representing a ref to 
+     * a dynamically created WEB-INF/classes virtual file system.
+     */
+    static final String DYNAMIC_WEBINF_CL_DIR_KEY = "WS-WEBINF-DYNAMIC-CL-DIR";
+    
+    /**
+     * Key used for attaching a URL representing a ref to 
+     * a dynamically created WEB-INF/classes virtual file system.
+     */
+    static final String DYNAMIC_WEBINF_CL_URL_KEY = "WS-WEBINF-DYNAMIC-CL-URL";
+    
+    /**
+     * Sole constructor that performas the following steps:
+     * <lu>
+     *  <li>Sets the output of this deployer to be {@link EsbMetaData}.</li>
+     *  <li>Sets this deployers deployment stage to {@link DeploymentStages#POST_PARSE}./li>
+     *  <li>Specifies that this deployer produces JBossWebMetaData and EsbMetaData./li>
+     * </lu>
+     */
+    public EsbWebServiceDeployer()
+    {
+        super(EsbMetaData.class);
+        // Set the deployment stage to after parse.
+        setStage(DeploymentStages.POST_PARSE);
+        // Tell the MicroContainer that we are producing JBossWebMetaData.
+        setOutput(JBossWebMetaData.class);
+        // Tell the MicroContainer that we are producing EsbMetaData.
+        setOutput(EsbMetaData.class);
+    }
+    
+    @Override
+    public void deploy(final VFSDeploymentUnit unit, final EsbMetaData esbMetaData) throws DeploymentException
+    {
+        final List<WebserviceInfo> webServices = esbMetaData.getModel().getWebserviceServices();
+        if (hasWebServices(webServices))
+        {
+            log.debug("Deploying webservices for : " + esbMetaData.getDeploymentName());
+            
+            final JBossWebMetaData webMetaData = new JBossWebMetaData();
+            final JBossServletsMetaData servlets = new JBossServletsMetaData();
+            final List<ServletMappingMetaData> servletMappings = new ArrayList<ServletMappingMetaData>();
+            final FiltersMetaData filters = new FiltersMetaData();
+            final List<ContractReferencePublisher> publishers = new ArrayList<ContractReferencePublisher>() ;
+            final WebserviceDescriptionsMetaData descriptions = new WebserviceDescriptionsMetaData();
+                
+            try
+            {
+                // Create an in-memory file system.
+                final URL inMemRootUrl = VfsUtil.createInMemUrl(esbMetaData.getDeploymentName());
+                final VirtualFile inMemRootDir = VfsUtil.createInMemoryFs(inMemRootUrl);
+                
+                // Attach the in-memory classpath URL and virtual file to this deployment unit so we can remove then upon undeploy.
+                //attachToDeploymentUnit(unit, inMemRootUrl, inMemRootDir);
+                unit.addAttachment(DYNAMIC_CL_DIR_KEY, inMemRootDir);
+                unit.addAttachment(DYNAMIC_CL_URL_KEY, inMemRootUrl);
+                
+                // Add the in-memory classpath to this deployment unit.
+                unit.addClassPath(inMemRootDir);
+                
+                // Create WEB-INF/classes relative to the in-memory vfs root.
+                final URL classesUrl = VfsUtil.createInMemUrl(inMemRootUrl, "WEB-INF/classes");
+                final VirtualFile classesDir = MemoryFileFactory.createDirectory(classesUrl);
+                unit.addAttachment(DYNAMIC_WEBINF_CL_DIR_KEY, classesDir);
+                unit.addAttachment(DYNAMIC_WEBINF_CL_URL_KEY, classesUrl);
+                
+                // Add the in-memory classes dir to this deployment unit.
+                unit.addClassPath(classesDir);
+                    
+                final JAXWSProviderClassGenerator generator = new JAXWSProviderClassGenerator();
+                for (WebserviceInfo wsInfo : webServices)
+                {
+                    final ESBServiceEndpointInfo serviceInfo = new ESBServiceEndpointInfo(wsInfo);
+                    final String handlers = JBossDeployerUtil.getHandlers(serviceInfo);
+                    final boolean includeHandlers = handlers != null;
+                    if (includeHandlers)
+                    {
+                        unit.appendMetaDataLocation(classesDir);
+                        final String wsHandlerName = serviceInfo.getPackageName().replace('.', '/') + "/esb-jaxws-handlers.xml";
+                        VfsUtil.addFile(classesUrl, wsHandlerName, handlers.getBytes());
+                    }
+                        
+                    if (serviceInfo.isOneWay())
+                    {
+                        filters.add(createFilter(serviceInfo));
+                    }
+                    
+                    final Service service = wsInfo.getService();
+                        
+                    // Generate the servlet class bytes
+                    final byte[] servletClass = generator.generate(service.getCategory(), service.getName(), serviceInfo, includeHandlers);
+                    final String servletClassName = serviceInfo.getClassName().replace('.', '/') + ".class";
+                    final URL servletClassUrl = VfsUtil.createInMemUrl(classesUrl, servletClassName);
+                    
+                    // Add the servlet to the virtual file system.
+                    VfsUtil.addFile(classesUrl, servletClassName, servletClass);
+                    log.debug("Generated ServletImpl '" + servletClassUrl + "'");
+                        
+                    servlets.add(createServlets(service, serviceInfo, generator, includeHandlers));
+                    servletMappings.add(createServletMapping(serviceInfo));
+                    
+                    final WebserviceDescriptionMetaData description = new WebserviceDescriptionMetaData();
+                    description.setName(esbMetaData.getDeploymentName());
+                    description.setWebserviceDescriptionName(esbMetaData.getDeploymentName());
+                    description.setWsdlPublishLocation(serviceInfo.getWSDLFileName());
+                    descriptions.add(description);
+                    
+                    final ContractReferencePublisher publisher = new ESBServiceContractPublisher(service, wsInfo.getDescription(), serviceInfo.getServletName());
+                    publishers.add(publisher);
+                }
+            }
+            catch (final Exception e)
+            {
+                throw new DeploymentException("Failed to create webservice artifact", e);
+            }
+                
+            webMetaData.setContextRoot(esbMetaData.getDeploymentName());
+            webMetaData.setServlets(servlets);
+            webMetaData.setServletMappings(servletMappings);
+            webMetaData.setFilters(filters);
+            webMetaData.setWebserviceDescriptions(descriptions);
+            esbMetaData.setPublishers(publishers);
+            
+            unit.addAttachment(JBossWebMetaData.class, webMetaData);
+        }
+    }
+    
+    @Override
+    public void undeploy(final VFSDeploymentUnit unit, final EsbMetaData esbMetaData) 
+    {
+        try
+        {
+            removeVirtualFile(unit, DYNAMIC_CL_DIR_KEY);
+            removeVirtualFile(unit, DYNAMIC_WEBINF_CL_DIR_KEY);
+        } 
+        finally
+        {
+            try
+            {
+                removeFromClassPath(unit, DYNAMIC_WEBINF_CL_URL_KEY);
+                removeFromClassPath(unit, DYNAMIC_CL_URL_KEY);
+            }
+            catch (final Exception e)
+            {
+                log.warn("Error deleting dynamic class root for " + unit.getName(), e);
+            }
+        }
+    }
+    
+    private void removeVirtualFile(final VFSDeploymentUnit unit, final String attachmenKey)
+    {
+        final VirtualFile file = unit.removeAttachment(attachmenKey, VirtualFile.class);
+        if (file != null)
+        {
+            unit.removeClassPath(file);
+        }
+    }
+    
+    private void removeFromClassPath(final VFSDeploymentUnit unit, final String attachmentKey)
+    {
+        final URL url = unit.removeAttachment(attachmentKey, URL.class);
+        if (url != null)
+        {
+            MemoryFileFactory.delete(url);
+        }
+    }
+    
+    private boolean hasWebServices(final List<WebserviceInfo> endpointServices)
+    {
+        return endpointServices != null && endpointServices.size() > 0;
+    }
+
+    private ServletMappingMetaData createServletMapping(final ESBServiceEndpointInfo serviceInfo)
+    {
+        final ServletMappingMetaData mapping = new ServletMappingMetaData();
+        mapping.setServletName(serviceInfo.getServletName());
+        mapping.setUrlPatterns(Arrays.asList(new String[] { serviceInfo.getServletPath()}));
+        return mapping;
+    }
+
+    private JBossServletMetaData createServlets(final Service service, final ESBServiceEndpointInfo serviceInfo, final JAXWSProviderClassGenerator generator, final boolean includeHandlers) throws WebServicePublishException
+    {
+        final JBossServletMetaData servlet = new JBossServletMetaData();
+        servlet.setServletName(serviceInfo.getServletName());
+        servlet.setServletClass(serviceInfo.getClassName());
+        servlet.setLoadOnStartup(1);
+        return servlet;
+    }
+
+    private FilterMetaData createFilter(final ESBServiceEndpointInfo serviceInfo)
+    {
+        // Filter
+        final FilterMetaData filter = new FilterMetaData();
+        filter.setFilterName(serviceInfo.getServletName() + "_Filter");
+        filter.setFilterClass(ESBResponseFilter.class.getName());
+                            
+        // Set up the initparam 'OneWay'
+        final ParamValueMetaData oneWayInitParam = new ParamValueMetaData();
+        oneWayInitParam.setParamName("OneWay");
+        oneWayInitParam.setParamValue("true");
+        filter.setInitParam(Arrays.asList(new ParamValueMetaData[] {oneWayInitParam}));
+        return filter;
+    }
+}

Deleted: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWsdlDeployer.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWsdlDeployer.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWsdlDeployer.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,146 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- * 
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- * 
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.listeners.deployers.mc;
-
-import java.net.URL;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.internal.soa.esb.webservice.ESBContractGenerator;
-import org.jboss.internal.soa.esb.webservice.ESBServiceEndpointInfo;
-import org.jboss.soa.esb.listeners.config.WebserviceInfo;
-import org.jboss.virtual.MemoryFileFactory;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * MC deployer that generates a wsdl and then adds this wsdl to 
- * a virtual memory file system.
- * <p/>
- * This deployer accepts an EsbMetaData instance and looks for the existence of any WebService (WS) 
- * information. If WS information is found a wsdl will be generated and it will be added
- * to the deployment unit as a metadata location. The wsdl file is added as a VirtualFile 
- * to an in-memory virtual file system.
- * <p/>
- * 
- * This deployer is set at the POST_CLASSLOADER deployment stage as it requries
- * access to classloaders for generating the wsdl.
- * 
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- */
-public class EsbWsdlDeployer extends AbstractSimpleVFSRealDeployer<EsbMetaData>
-{
-    /** Logger */
-    private Logger log = Logger.getLogger(EsbWsdlDeployer.class);
-    
-    /**
-     * Key used for attaching a VirtualFile representing a ref to 
-     * a dynamically created virtual file system.
-     */
-    private static final String DYNAMIC_CL_DIR_KEY = "WSDL-DYNAMIC-CL-DIR";
-    
-    
-    /**
-     * Key used for attaching a VirtualFile representing a ref to 
-     * a dynamically created virtual file system.
-     */
-    private static final String DYNAMIC_CL_URL_KEY = "WSDL-DYNAMIC-CL-URL";
-    
-    /**
-     * No-args constructor.
-     */
-    public EsbWsdlDeployer()
-    {
-        super(EsbMetaData.class);
-        setStage(DeploymentStages.POST_CLASSLOADER);
-        setOutput(UnifiedMetaData.class);
-    }
-    
-    public void create()
-    {
-        log.info("Created");
-    }
-    
-    @Override
-    public void deploy(final VFSDeploymentUnit deploymentUnit, final EsbMetaData esbMetaData) throws DeploymentException
-    {
-        final List<WebserviceInfo> endpointServices = esbMetaData.getModel().getWebserviceServices();
-        if (endpointServices != null && endpointServices.size() > 0)
-        {
-            try
-            {
-                final URL dynamicClassRoot = new URL("vfsmemory", esbMetaData.getDeploymentName() + "_WSDL", "");
-                final VirtualFile dynamicClasspathDir = MemoryFileFactory.createRoot(dynamicClassRoot).getRoot();
-                
-                for (WebserviceInfo webserviceInfo : endpointServices)
-                {
-                    final ESBServiceEndpointInfo serviceInfo = new ESBServiceEndpointInfo(webserviceInfo);
-                    final String wsdl = ESBContractGenerator.generateWSDL(webserviceInfo, serviceInfo, deploymentUnit.getClassLoader());
-                    final URL wsdlUrl = new URL(dynamicClassRoot + "/" + serviceInfo.getWSDLFileName());
-                    log.info("Generating wsdl : " + wsdlUrl);
-                    
-                    // Add the wsdl in the virtual file system
-                    MemoryFileFactory.putFile(wsdlUrl, wsdl.getBytes());
-                    
-                    // Add the root of the virtual file system as a meta data location.
-                    deploymentUnit.appendMetaDataLocation(dynamicClasspathDir);
-                }
-            }
-            catch (final Exception e)
-            {
-                throw new DeploymentException("Failed to create webservice artifact", e);
-            }
-        }
-    }
-    
-    @Override
-    public void undeploy(final VFSDeploymentUnit deploymentUnit, final EsbMetaData esbMetaData) 
-    {
-        log.debug("Removing dynamic class root for " + deploymentUnit.getName());
-        try
-        {
-            final VirtualFile classes = deploymentUnit.removeAttachment(DYNAMIC_CL_DIR_KEY, VirtualFile.class);
-            if (classes != null)
-            {
-                deploymentUnit.removeClassPath(classes);
-            }
-        }
-        finally
-        {
-            try
-            {
-                final URL root = deploymentUnit.removeAttachment(DYNAMIC_CL_URL_KEY, URL.class);
-                if (root != null)
-                {
-                    MemoryFileFactory.deleteRoot(root);
-                }
-            }
-            catch (final Exception e)
-            {
-                log.warn("Error deleting dynamic class root for " + deploymentUnit.getName(), e);
-            }
-        }
-    }
-}

Copied: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWsdlDeployer.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWsdlDeployer.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWsdlDeployer.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWsdlDeployer.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,247 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.internal.soa.esb.webservice.ESBContractGenerator;
+import org.jboss.internal.soa.esb.webservice.ESBServiceEndpointInfo;
+import org.jboss.soa.esb.listeners.config.WebserviceInfo;
+import org.jboss.soa.esb.listeners.deployers.mc.util.VfsUtil;
+import org.jboss.virtual.MemoryFileFactory;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * MC deployer that generates a wsdl and then adds this wsdl to 
+ * a virtual memory file system.
+ * <p/>
+ * This deployer accepts an EsbMetaData instance and looks for the existence of any WebService (WS) 
+ * information. If WS information is found a wsdl will be generated and it will be added
+ * to the deployment unit as a metadata location. The wsdl file is added as a VirtualFile 
+ * to an in-memory virtual file system.
+ * <p/>
+ * 
+ * This deployer is set at the POST_CLASSLOADER deployment stage as it requries
+ * access to classloaders for generating the wsdl.
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ */
+public class EsbWsdlDeployer extends AbstractSimpleVFSRealDeployer<EsbMetaData>
+{
+    private Logger log = Logger.getLogger(EsbWsdlDeployer.class);
+    
+    /**
+     * Key used for attaching a list of VirtualFile representing generated wsdl files.
+     */
+    static final String WSDL_LOCATIONS_KEY = "WSDL-LOCATIONS-KEY";
+    
+    /**
+     * Key used for attaching a URL representing a ref to 
+     * a dynamically created in-memory virtual file system.
+     */
+    static final String DYNAMIC_ROOT_URL_KEY = "WSDL-DYNAMIC-ROOT-URL";
+    
+    /**
+     * Key used for attaching a URL representing a ref to 
+     * a dynamically created in-memory virtual file system.
+     */
+    static final String DYNAMIC_ROOT_DIR_KEY = "WSDL-DYNAMIC-ROOT-DIR";
+    
+    /**
+     * {@link VirtualFileFilter} that selects '.xsd'.
+     */
+    private static final VirtualFileFilter schemaFileFilter = new SchemaFileFilter();
+    
+    /**
+     * No-args constructor.
+     */
+    public EsbWsdlDeployer()
+    {
+        super(EsbMetaData.class);
+        // Need access to classloaders.
+        setStage(DeploymentStages.POST_CLASSLOADER);
+        // Tell the MicroContainer that we are producing UnifiedMetaData.
+        setOutput(UnifiedMetaData.class);
+    }
+    
+    /**
+     * Generates a wsdl for all web services specified in the {@link EsbMetaData}s model and makes it available
+     * as deployment unit metadata.
+     * <p/>
+     * Deploy will inspect the {@link EsbMetaData} and see if its model contains web services information and 
+     * if so generates the wsdl for them, and will add any additional schemas in the deployment unit to an in-memory
+     * virtual file system.
+     * <p/>
+     * 
+     * @param unit The {@link VFSDeploymentUnit} for this deploment.
+     * @param esbMetaData The {@link EsbMetaData} for this deployment.
+     */
+    @Override
+    public void deploy(final VFSDeploymentUnit unit, final EsbMetaData esbMetaData) throws DeploymentException
+    {
+        final List<WebserviceInfo> webServices = esbMetaData.getModel().getWebserviceServices();
+        if (webServices != null && webServices.size() > 0)
+        {
+            try
+            {
+                final String inMemRootName = esbMetaData.getDeploymentName() + "_WSDL";
+                final URL inMemRootUrl = VfsUtil.createInMemUrl(inMemRootName);
+                final VirtualFile inMemRootDir = VfsUtil.createInMemoryFs(inMemRootUrl);
+                // Attach the in-memory root url so we can remove it in undeploy.
+                unit.addAttachment(DYNAMIC_ROOT_URL_KEY, inMemRootUrl);
+                // Attach the in-memory root dir so we can remove it in undeploy.
+                unit.addAttachment(DYNAMIC_ROOT_DIR_KEY, inMemRootDir);
+                
+                final List<URL> wsdls = new ArrayList<URL>();
+                
+                for (WebserviceInfo wsInfo : webServices)
+                {
+                    // Generate the wsdl for the web service.
+                    final ESBServiceEndpointInfo serviceInfo = new ESBServiceEndpointInfo(wsInfo);
+                    final String wsdl = ESBContractGenerator.generateWSDL(wsInfo, serviceInfo, unit.getClassLoader());
+                    final URL wsdlUrl = VfsUtil.createInMemUrl(inMemRootUrl, serviceInfo.getWSDLFileName());
+                    log.info("Generating wsdl url : " + wsdlUrl);
+                    
+                    // Add the wsdl in the virtual file system
+                    VirtualFile wsdlFile = VfsUtil.addFile(inMemRootUrl, serviceInfo.getWSDLFileName(), wsdl.getBytes());
+                    wsdls.add(wsdlUrl);
+                    
+                    // Add any additional schemas in the deployment unit to the in-memory vfs.
+                    addSchemasToVfs(getSchemas(unit.getRoot()), wsdlFile.getParent(), esbMetaData.getArchiveName());
+                    
+                    // Add the root of the virtual file system as a meta data location.
+                    unit.appendMetaDataLocation(inMemRootDir);
+                }
+                
+                // Attach all the wsdl locations so that we can remove them in undeploy.
+                unit.addAttachment(WSDL_LOCATIONS_KEY, wsdls);
+            }
+            catch (final Exception e)
+            {
+                throw new DeploymentException("Failed to create webservice artifact", e);
+            }
+        }
+    }
+    
+    /**
+     * Retrieves all the schemas (.xsd) from the virtual file root passed in.
+     * 
+     * @param root The virtual file that should be searched recursively for schemas.
+     * @return List<VirtualFile> List of virtual files that are schemas.
+     * @throws IOException If an exception in the search occurs.
+     */
+    List<VirtualFile> getSchemas(final VirtualFile root) throws IOException
+    {
+        return root.getChildrenRecursively(schemaFileFilter);
+    }
+
+    /**
+     * Will add all the schemas to the virtual file system specified by toVfs.
+     * <p/>
+     * For example, the following vfs file:
+     * "Quickstart_publish_as_webservice.esb/request.xsd"
+     * will be added to the virtual toVfs with the following url:
+     * "vfsmemory://Quickstart_publish_as_webservice_WSDL/WEB-INF/wsdl/ESBServiceSample/request.xsd"
+     * <p/>
+     * 
+     * @param schemas The schemas to add.
+     * @param toVfs The destination vfs to which the schemas should be added.
+     * @param archiveName Is the name of this archive deployment. 
+     *          
+     * @throws MalformedURLException
+     * @throws IOException
+     * @throws URISyntaxException
+     */
+    void addSchemasToVfs(final List<VirtualFile> schemas, VirtualFile toVfs, String archiveName) throws MalformedURLException, IOException, URISyntaxException
+    {
+        VfsUtil.addFiles(schemas, toVfs.toURL(), archiveName, "WEB-INF/wsdl/" + toVfs.getName());
+    }
+
+    /**
+     * Undeploy will inspect the deployment unit to see if the deploy method attached a
+     * {@link VirtualFile} representing an in-memory file system. If one exists it will
+     * be removed.
+     * <p/>
+     * 
+     * @param unit The {@link VFSDeploymentUnit} for this deploment.
+     * @param esbMetaData The {@link EsbMetaData} for this deployment.
+     */
+    @Override
+    public void undeploy(final VFSDeploymentUnit unit, final EsbMetaData esbMetaData) 
+    {
+        try
+        {
+            final List<URL> locations = unit.removeAttachment(WSDL_LOCATIONS_KEY, List.class);
+            if (locations != null)
+            {
+                for (URL url : locations)
+                {
+                    MemoryFileFactory.delete(url);
+                }
+            }
+        }
+        finally
+        {
+            try
+            {
+                final URL rootUrl = unit.removeAttachment(DYNAMIC_ROOT_URL_KEY, URL.class);
+                if (rootUrl != null)
+                {
+                    MemoryFileFactory.deleteRoot(rootUrl);
+                    // Also need remove the root from the metadata locations.
+                    unit.removeMetaDataLocation(VFS.getVFS(rootUrl).getRoot());
+                }
+                
+            }
+            catch (final Exception e)
+            {
+                log.warn("Error deleting dynamic class root for " + unit.getName(), e);
+            }
+        }
+    }
+    
+    /**
+     * A {@link VirtualFileFilter} that selects all files ending with '.xsd'.
+     * 
+     * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+     *
+     */
+    private static class SchemaFileFilter implements VirtualFileFilter
+    {
+        public boolean accepts(final VirtualFile file)
+        {
+            return file.getName().endsWith(".xsd");
+        }
+    }
+}

Deleted: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/overview.html
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/overview.html	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/overview.html	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,23 +0,0 @@
-<html>
-    <head></head>
-    <body>
-    	JBossAS 5.x deployers for JBossESB 4.x
-
-		<h1>Overview</h1>
-		This package contains a number of JBoss AS deployers and supporting classes to deployer .esb (4.x) archives on JBoss AS 5.x.
-		<p/>
-
-		<h2>Overview of the deployers</h2>
-		The deployers come into play at different stages of the deployment. This is set in thier respective constructors.
-		The deployers don't really deploy anything but only create metadata describing an EsbDeployment. The MicroContainer 
-		will take care of creating the real instance and calling its lifecycle metods for us.
-		<ul>
-		<li>EsbConfigParser -> Is active a the PARSE deployment stage. It is responsible for parsing the .esb configuration and creating an EsbMetaData instance representing the deployment.</li>
-		<li>EsbWebServiceDeployer -> Is active a the POST_PARSE deployment stage. It is responsible for examining the EsbMetaData and generating web service metadata that will be picked up by WS deployers</li>
-		<li>EsbWsdlDeployer -> Is active a the POST_CLASSLOADER deployment stage. It is responsible for examining the EsbMetaData and generating the wsdl and also adding the wsdl file to an inmemory virtual filesystem</li>
-		<li>EsbDeployer -> Is also active a the POST_CLASSLOADER deployment stage. This is where the actual bean meta data that represents an esb deployment is created, EsbDeployment</li>
-		</ul>
-		For details about specific deployers please refer to the javadocs for the deployer in question. Hopefully this will give you an overview and more importantly give you the order in which the deployers 
-		are applied.
-    </body>
-</html>
\ No newline at end of file

Copied: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/overview.html (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/overview.html)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/overview.html	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/overview.html	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,26 @@
+<html>
+    <head></head>
+    <body>
+    	JBossAS 5.x deployers for JBossESB 4.x
+
+		<h1>Overview</h1>
+		This package contains a number of JBoss AS deployers and supporting classes to deploy .esb (4.x) archives on JBoss AS 5.x.
+		<p/>
+
+		<h2>Overview of the deployers</h2>
+		The different deployers come into play at different stages of the deployment. This is set in thier respective constructors.
+		The deployers don't really deploy anything but only create/adding metadata describing an EsbDeployment. The MicroContainer 
+		will take care of creating the real EsbDeployment instance and take care of calling its lifecycle metods for us. <br><br>
+		<table border="1">
+		  <tr><td><b>DeploymentStage</b></td><td><b>Deployer</b></td><td><b>Description</b></td></tr>
+		  <tr><td><i>PARSE</i></td><td><i>EsbConfigParser</i></td><td>Is responsible for parsing the .esb configuration and creating an EsbMetaData instance representing the deployment.</td></tr>
+		  <tr><td><i>POST_PARSE</i></td><td><i>EsbWebServiceDeployer</i></td><td>Is responsible for examining the EsbMetaData and generating web service metadata that will be picked up by WS deployers.</td></tr>
+		  <tr><td><i>POST_CLASSLOADER</i></td><td><i>EsbWsdlDeployer</i></td><td>Is responsible for examining the EsbMetaData and generating the wsdl, which requries usage of classloaders, and also adding the wsdl file to an inmemory virtual filesystem.</td></tr>
+		  <tr><td><i>POST_CLASSLOADER</td><td><i>EsbDeployer</i></td><td>This is where the actual bean meta data that represents an esb deployment is created, EsbDeployment.</td></tr>
+	   </table>
+	   <br>
+		
+		For details about specific deployers please refer to the javadocs for the deployer in question. Hopefully this will give you an overview and more importantly give you the order in which the deployers 
+		are applied.
+    </body>
+</html>
\ No newline at end of file

Added: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/util/VfsUtil.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/util/VfsUtil.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/util/VfsUtil.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,152 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.List;
+
+import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.jboss.virtual.MemoryFileFactory;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * Util methods for interacting with JBoss VFS
+ * <p/>
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ *
+ */
+public final class VfsUtil
+{
+    /**
+     * Protocol for VFS in-memory URLs.
+     */
+    private static final String IN_MEMORY_PROTOCOL = "vfsmemory";
+    
+    private VfsUtil() {}
+    
+    /**
+     * Creates a new in-memory virtual file system or returns an already existing one..
+     * 
+     * @param url The url which of which this host property will be the root of the fs.
+     * @return VirtualFile The {@link VirtualFile} that represents the root of the fs.
+     * @throws IOException
+     */
+    public static VirtualFile createInMemoryFs(final URL rootUrl) throws IOException
+    {
+        return MemoryFileFactory.createRoot(rootUrl).getRoot();
+    }
+    
+    /**
+     * Will add the fileContent to the in-memory rootUrl a the location specified by filePath. 
+     * </p>
+     * 
+     * @param rootUrl The root of the in-memory fs.
+     * @param filePath The path relative to the rootUrl.
+     * @param fileContent The contents of the file to add.
+     * @return {@link VirtualFile} A reference to the newly created file in the in-memory file system.
+     * @throws MalformedURLException
+     */
+    public static VirtualFile addFile(final URL rootUrl, final String filePath, final byte[] fileContent) throws MalformedURLException
+    {
+        final URL fileUrl = new URL(rootUrl + "/" + filePath);
+        return MemoryFileFactory.putFile(fileUrl, fileContent);
+    }
+
+    /**
+     * A simple method that creates a new url with a protocol of 'vfsmemory'.
+     * 
+     * @param root Will be the name (hostname) of the root in-memory file system. 
+     * @return {@link URL} An url that represents a root of an in-memory file system.
+     * @throws MalformedURLException
+     */
+    public static URL createInMemUrl(final String root) throws MalformedURLException
+    {
+        return new URL(IN_MEMORY_PROTOCOL, root, "");
+    }
+    
+    public static URL createInMemUrl(final String root, final String path) throws MalformedURLException
+    {
+        return new URL(IN_MEMORY_PROTOCOL, root, "/" + path);
+    }
+    
+    public static URL createInMemUrl(final URL root, final String path) throws MalformedURLException
+    {
+        return new URL(IN_MEMORY_PROTOCOL, root.getHost(), root.getPath() + "/" + path);
+    }
+    
+    public static void addFiles(final List<VirtualFile> files, final URL destUrl, final String subPath) throws IOException, URISyntaxException
+    {
+        addFiles(files, destUrl, subPath, null);
+    }
+    
+    public static void addFiles(final List<VirtualFile> files, final URL destUrl, final String subPath, final String pathPrefix) throws IOException, URISyntaxException
+    {
+        for (final VirtualFile file : files)
+        {
+            InputStream in = null;
+            try
+            {
+                in = file.openStream();
+                final URL newUrl = createInMemUrl(destUrl.getHost(), subpath(file.getPathName(), subPath, pathPrefix));
+                MemoryFileFactory.putFile(newUrl, StreamUtils.readStream(in));
+            }
+            finally
+            {
+                in.close();
+            }
+        }
+    }
+    
+    static String subpath(final String path, final String pathName, final String pathPrefix)
+    {
+        if (path == null || pathName == null)
+        {
+            return path;
+        }
+        
+        final int idx = path.indexOf(pathName);
+        if (idx != -1)
+        {
+            String filePath = path.substring(idx + pathName.length());
+            if (pathPrefix == null)
+            {
+                return filePath;
+            }
+            else 
+            {
+                return pathPrefix + filePath;
+            }
+        }
+        return path;
+        
+    }
+    
+    static String subpath(final String path, final String pathName)
+    {
+        return subpath(path, pathName, null);
+    }
+
+}

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/jca/JBoss42ActivationBridge.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/jca/JBoss42ActivationBridge.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/jca/JBoss42ActivationBridge.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -21,6 +21,9 @@
 */
 package org.jboss.soa.esb.listeners.jca;
 
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Map;
@@ -35,6 +38,7 @@
 import org.jboss.metadata.ActivationConfigPropertyMetaData;
 import org.jboss.mx.util.JMXExceptionDecoder;
 import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.soa.esb.util.ClassUtil;
 
 /**
  * interfaces with JCA to activate an endpoint
@@ -111,7 +115,8 @@
       for (String key : activationProperties.keySet())
       {
          String value = activationProperties.get(key);
-         metaData.add(new ActivationConfigPropertyMetaData(key, value));
+         metaData.add(createActivationConfigPropertyMetaData(key, value));
+         //metaData.add(new ActivationConfigPropertyMetaData(key, value));
       }
 
       Object[] params = new Object[]
@@ -141,9 +146,56 @@
          throw new RuntimeException("Endpoint activation failed ra=" + resourceAdapterObjectName +
                  " activationSpec=" + activationSpec, t);
       }
-
-
    }
+   
+   private ActivationConfigPropertyMetaData createActivationConfigPropertyMetaData(final String key, final String value) 
+    {
+        try
+        {
+            Class<?> c = ClassUtil.forName("org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData" , getClass());
+            Object instance = c.newInstance();
+            // Call setActivationConfigPropertyName with the key.
+            Method setName = c.getMethod("setActivationConfigPropertyName", new Class[] { String.class});
+            setName.invoke(instance, key);
+            // Call setValue with the value.
+            Method setValue = c.getMethod("setValue", String.class);
+            setValue.invoke(instance, value);
+            
+            // Now create the AS 5 version of ActivationConfigPropertyMetaData.
+            Class<?> returnClass = ClassUtil.forName("org.jboss.metadata.ActivationConfigPropertyMetaData" , getClass());
+            // Call the constructor using the above created instance as the argument.
+            Constructor<?> constructor = returnClass.getConstructor(c);
+            return (ActivationConfigPropertyMetaData) constructor.newInstance(instance);
+        } 
+        catch (final ClassNotFoundException e)
+        {
+            return new ActivationConfigPropertyMetaData(key, value);
+        } 
+        catch (final InstantiationException e)
+        {
+            throw new RuntimeException("Could not instantiate an instance of org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData", e);
+        } 
+        catch (final IllegalAccessException e)
+        {
+            throw new RuntimeException("IllegalAccessException while trying to create an instance of org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData", e);
+        } 
+        catch (SecurityException e)
+        {
+            throw new RuntimeException(e.getMessage(), e);
+        } 
+        catch (NoSuchMethodException e)
+        {
+            throw new RuntimeException(e.getMessage(), e);
+        } 
+        catch (IllegalArgumentException e)
+        {
+            throw new RuntimeException(e.getMessage(), e);
+        } 
+        catch (InvocationTargetException e)
+        {
+            throw new RuntimeException(e.getMessage(), e);
+        } 
+   }
 
    /**
     * Deactivate

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/ManagedLifecycleController.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/ManagedLifecycleController.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/lifecycle/ManagedLifecycleController.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -23,6 +23,8 @@
 
 import java.util.Collection;
 
+import org.apache.log4j.Logger;
+
 /**
  * Controller class to manage the lifecycles of a set of managed instances.
  *
@@ -30,6 +32,8 @@
  */
 public class ManagedLifecycleController
 {
+    private Logger log = Logger.getLogger(ManagedLifecycleController.class);
+    
    /**
     * The managed lifecycle instances.
     */
@@ -214,6 +218,7 @@
          }
          catch (final ManagedLifecycleException mle)
          {
+            log.error(mle.getMessage(), mle);
          } // Ignore exception
       }
    }

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageAwareListener.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -292,7 +292,7 @@
 		Message message = null ;
 		boolean problem = false;
 		
-                PickUpOnlyCourier pickUpCourier = null ;
+        PickUpOnlyCourier pickUpCourier = null ;
 		try
 		{
 			transactionStrategy.begin();
@@ -311,16 +311,14 @@
 			
 			return;
 		}
-                catch (MalformedEPRException e)
-                {
-                        problem = true;
-                        
-                        return;
-                }
+        catch (MalformedEPRException e)
+        {
+            problem = true;
+            return;
+        }
 		catch (CourierTimeoutException e)
 		{
 			problem = true;
-			
 			return;
 		}
 		catch (FaultMessageException fme)
@@ -329,20 +327,19 @@
 		}
 		catch (CourierException e)
 		{
-                        _logger.debug("Courier Exception", e);
-                        if (errorDelay == 0)
-                        {
-                            errorDelay = MIN_ERROR_DELAY ;
-                        }
-                        else if (errorDelay < MAX_ERROR_DELAY)
-                        {
-                            errorDelay <<= 1 ;
-                        }
-                        _logger.warn("Error processing courier, backing off for " + errorDelay + " milliseconds") ;
-                        waitForRunningStateChange(ManagedLifecycleThreadState.STOPPING, errorDelay) ;
-
+            _logger.debug("Courier Exception", e);
+            if (errorDelay == 0)
+            {
+                errorDelay = MIN_ERROR_DELAY ;
+            }
+            else if (errorDelay < MAX_ERROR_DELAY)
+            {
+                errorDelay <<= 1 ;
+            }
+            _logger.warn("Error processing courier, backing off for " + errorDelay + " milliseconds") ;
+            boolean waitForRunningStateChange = waitForRunningStateChange(ManagedLifecycleThreadState.STOPPING, errorDelay) ;
+            _logger.info("State reached : " + waitForRunningStateChange);
 			problem = true;
-			
 			return;
 		}
 		finally

Modified: labs/jbossesb/trunk/product/rosetta/tests/build.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/tests/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -29,6 +29,7 @@
     	<!-- added these first two jar explicetly to get the security features working -->
     	<fileset dir="${org.jboss.esb.lib.dir}" includes="jaxr-api*.jar"/>
         <fileset dir="${org.jboss.esb.lib.dir}" includes="jbossall-client-*.jar"/>
+        <fileset dir="${org.jboss.esb.lib.dir}" includes="jbossxb-2.0.0.GA.jar"/>
         <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
         <fileset dir="${org.jboss.esb.lib.dir}" includes="*.jar"/>
         <fileset dir="${org.jboss.esb.root.dir}/../testlib" includes="*.jar"/>
@@ -119,9 +120,14 @@
             <fileset dir="${org.jboss.esb.module.tests.src.dir}" includes="**/*.xml" />
         </copy>
 		<copy file="${org.jboss.esb.root.dir}/etc/schemas/xml/jbossesb-1.0.1.xsd" todir="${org.jboss.esb.tests.classes.dir}"/>
-    	
 
+		<copy todir="${org.jboss.esb.tests.classes.dir}" >
+            <fileset dir="${org.jboss.esb.module.tests.src.dir}" includes="/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives"/>
+        </copy>
+		<copy file="${org.jboss.esb.module.tests.src.dir}/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/esb-archive.esb" 
+			todir="${org.jboss.esb.tests.classes.dir}/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/esb-archive.esb"/>
 
+
     	<junit printsummary="yes" haltonerror="${org.jboss.esb.build.haltonerror}" haltonfailure="${org.jboss.esb.build.haltonfailure}" showoutput="no" fork="true">
             <formatter type="plain" usefile="false"/>
             <formatter type="xml"/>

Modified: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JMSRouterUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JMSRouterUnitTest.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JMSRouterUnitTest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -22,11 +22,17 @@
 package org.jboss.soa.esb.actions.routing;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import java.io.Serializable;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
+import java.net.URI;
+import java.net.URISyntaxException;
 
 import javax.jms.Destination;
 import javax.jms.ExceptionListener;
@@ -36,20 +42,33 @@
 import javax.jms.QueueConnection;
 import javax.jms.QueueSession;
 import javax.jms.Session;
+import javax.jms.TextMessage;
 import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
 
 import junit.framework.JUnit4TestAdapter;
 
+import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
+import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
 import org.jboss.soa.esb.common.Environment;
 import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.helpers.NamingContextException;
 import org.jboss.soa.esb.helpers.NamingContextPool;
+import org.jboss.soa.esb.listeners.gateway.DefaultESBPropertiesSetter;
 import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.notification.jms.JMSPropertiesSetter;
+import org.jboss.soa.esb.testutils.SerializableMockQueue;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockejb.jms.MockQueue;
+import org.mockejb.jms.ObjectMessageImpl;
 import org.mockejb.jms.QueueConnectionFactoryImpl;
+import org.mockejb.jms.TextMessageImpl;
 import org.mockejb.jndi.MockContextFactory;
 
 /**
@@ -61,6 +80,11 @@
 {
     private static final String CONNECTION_FACTORY = "ConnectionFactory" ;
     private static final String QUEUE_NAME = "failQueue" ;
+    private static final String PROPERTY_SETTER_TEST_NAME = "MockJMSPropertiesSetter" ;
+    private final String messageID = "1234-junittest";
+    private final String bodyContent = "hello";
+    private org.jboss.soa.esb.message.Message msg;
+    private ConfigTree tree;
     
     @Before
     public void setUp()
@@ -88,6 +112,13 @@
         MockContextFactory.revertSetAsInitial();
     }
     
+    @Before
+    public void setup() throws URISyntaxException
+    {
+        msg = createESBMessageObject( messageID, bodyContent );
+        tree = createConfigTree();
+    }
+    
     @Test
     public void testRetry()
         throws Exception
@@ -116,6 +147,209 @@
         assertEquals("Original producer count", 3, MockQueueSessionInvocationHandler.producerCount) ;
     }
     
+    @Test
+    public void processWithUnwrapFalse() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
+    {
+        MockJMSRouter router = new MockJMSRouter(tree);
+        router.route( msg );
+
+        assertProcessContract( messageID, msg, router );
+    }
+    
+    @Test
+    public void processWithUnwrapTrue() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
+    {
+        tree.setAttribute( "unwrap", "true" );
+        MockJMSRouter router = new MockJMSRouter( tree );
+
+        router.route( msg );
+
+        assertProcessContract( messageID, msg, router );
+        final javax.jms.Message jmsMessage = ((MockJMSRouter) router).getJmsMessage();
+
+        assertTrue ( jmsMessage instanceof TextMessage );
+        final javax.jms.TextMessage textMessage = (TextMessage) jmsMessage;
+
+        assertEquals ( textMessage.getJMSCorrelationID(), messageID );
+        assertEquals ( textMessage.getText(), bodyContent );
+    }
+    
+    @Test
+    public void constructorWithSecurity() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
+    {
+        final String principal = "guest";
+        final String credential = "guest";
+        tree.setAttribute( "unwrap", "true" );
+        tree.setAttribute( JMSRouter.SECURITY_PRINCIPAL, principal );
+        tree.setAttribute( JMSRouter.SECURITY_CREDITIAL, credential );
+        MockJMSRouter router = new MockJMSRouter( tree );
+        
+        assertEquals (  principal, router.getSecurityPrincipal() );
+        assertEquals (  credential, router.getSecurityCredential() );
+    }
+    
+    @Test ( expected = ConfigurationException.class )
+    public void shouldThrowIfPrincipalIsNull() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
+    {
+        tree.setAttribute( JMSRouter.SECURITY_CREDITIAL, "testpassword" );
+        new MockJMSRouter( tree );
+    }
+    
+    @Test ( expected = ConfigurationException.class )
+    public void shouldThrowIfCredentialIsNull() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
+    {
+        tree.setAttribute( JMSRouter.SECURITY_PRINCIPAL, "testuser" );
+        new MockJMSRouter( tree );
+    }
+
+    @Test ( expected = ActionProcessingException.class )
+    public void shouldThrowIfObjectIsNotAMessageObject() throws ConfigurationException, NamingException, JMSException, ActionProcessingException
+    {
+        ConfigTree tree = createConfigTree();
+        JMSRouter router = new MockJMSRouter(tree);
+        router.route( "test" );
+    }
+
+    @Test
+    public void setJMSReplyToQueue() throws JMSException, URISyntaxException, ConfigurationException, NamingException, ConnectionException, NamingContextException
+    {
+        try
+        {
+            MockContextFactory.setAsInitial();
+            Context context = new InitialContext();
+            MockContextFactory.setDelegateContext( context );
+        
+            final MockQueue queue = new SerializableMockQueue( QUEUE_NAME );
+        
+            context.rebind( QUEUE_NAME, queue );
+
+            // inbound is to simulate a jms message arriving at a gateway endpoint.
+            TextMessageImpl inBoundJmsMessage = new TextMessageImpl();
+            inBoundJmsMessage.setJMSReplyTo( queue );
+            new DefaultESBPropertiesSetter().setPropertiesFromJMSMessage( inBoundJmsMessage, msg );
+        
+            JMSRouter router = new JMSRouter( createConfigTree() );
+            
+            // outbound is to simulate a new jms message that is about to leave the ESB.
+            TextMessageImpl outBoundJmsMessage = new TextMessageImpl();
+            router.setJMSReplyTo( outBoundJmsMessage,  msg );
+        }
+        finally
+        {
+            MockContextFactory.revertSetAsInitial();
+        }
+    }
+    
+    @Test
+    public void constructWithDefaultPersitentAttribute() throws ConfigurationException, NamingException, JMSException
+    {
+        ConfigTree config = createConfigTree();
+        JMSRouter router = new JMSRouter( config );
+        assertTrue( router.isDeliveryModePersistent() );
+    }
+
+    @Test
+    public void constructWithPersitentAttribute() throws ConfigurationException, NamingException, JMSException
+    {
+        ConfigTree config = createConfigTree();
+        config.setAttribute( JMSRouter.PERSISTENT_ATTR, "false" );
+        JMSRouter router = new JMSRouter( config );
+
+        assertFalse ( router.isDeliveryModePersistent() );
+    }
+
+    @Test
+    public void constructWithDefaultPriorityAttribute() throws ConfigurationException, NamingException, JMSException
+    {
+        ConfigTree config = createConfigTree();
+        JMSRouter router = new JMSRouter( config );
+        assertEquals( javax.jms.Message.DEFAULT_PRIORITY, router.getPriority() );
+    }
+
+    @Test
+    public void constructWithPriorityAttribute() throws ConfigurationException, NamingException, JMSException
+    {
+        final int expectedPriority = 9;
+        ConfigTree config = createConfigTree();
+        config.setAttribute( JMSRouter.PRIORITY_ATTR, String.valueOf( expectedPriority ) );
+        JMSRouter router = new JMSRouter( config );
+
+        assertEquals ( expectedPriority, router.getPriority() );
+    }
+
+    @Test
+    public void constructWithDefaultTimeToLiveAttribute() throws ConfigurationException, NamingException, JMSException
+    {
+        ConfigTree config = createConfigTree();
+        JMSRouter router = new JMSRouter( config );
+        assertEquals( javax.jms.Message.DEFAULT_TIME_TO_LIVE, router.getTimeToLive() );
+    }
+
+    @Test
+    public void constructWithTimeToLiveAttribute() throws ConfigurationException, NamingException, JMSException
+    {
+        final long ttl = 6000l;
+        ConfigTree config = createConfigTree();
+        config.setAttribute( JMSRouter.TIME_TO_LIVE_ATTR, String.valueOf( ttl ) );
+        JMSRouter router = new JMSRouter( config );
+
+        assertEquals ( ttl, router.getTimeToLive() );
+    }
+
+    @Test
+    public void specifyJNDIPropertiesInConfig() throws JMSException, URISyntaxException, ConfigurationException, NamingException, ConnectionException
+    {
+        final String jndiContextFactoryName = "org.jnp.interfaces.NamingContextFactory";
+        final String jndiURL = "localhost:1099";
+        final String jndiPkgPrefix = "org.jboss.naming";
+        final String connectionFactory = "ConnectionFactory";
+
+        ConfigTree config = createConfigTree();
+        config.setAttribute( JMSEpr.JNDI_CONTEXT_FACTORY_TAG, jndiContextFactoryName );
+        config.setAttribute( JMSEpr.JNDI_URL_TAG, jndiURL );
+        config.setAttribute( JMSEpr.JNDI_PKG_PREFIX_TAG, jndiPkgPrefix );
+        config.setAttribute( JMSEpr.CONNECTION_FACTORY_TAG, connectionFactory );
+
+        MockJMSRouter router = new MockJMSRouter( config );
+        assertEquals( jndiContextFactoryName, router.getContextFactoryName() );
+        assertEquals( jndiURL, router.getJndiURL() );
+        assertEquals( jndiPkgPrefix, router.getJndiPkgPrefix() );
+        assertEquals( connectionFactory, router.getConnectionFactory() );
+    }
+
+    @Test
+    public void usePropertyStrategy() throws ConfigurationException, NamingException, JMSException, ActionProcessingException
+    {
+        final ConfigTree tree = createConfigTree() ;
+        tree.setAttribute(JMSRouter.PROPERTY_STRATEGY, MockJMSPropertiesSetter.class.getName()) ;
+        final MockJMSRouter router = new MockJMSRouter(tree) ;
+        router.route(msg) ;
+        assertEquals("Property setter value", PROPERTY_SETTER_TEST_NAME, router.getJmsMessage().getStringProperty(PROPERTY_SETTER_TEST_NAME)) ;
+    }
+    
+    private void assertProcessContract( final String messageID, final org.jboss.soa.esb.message.Message msg, JMSRouter router ) throws ActionProcessingException, JMSException
+    {
+        final org.jboss.soa.esb.message.Message message = router.process ( msg );
+        assertNull ( "Routers process should return null",  message );
+        final javax.jms.Message jmsMessage = ((MockJMSRouter) router).getJmsMessage();
+        assertEquals ( jmsMessage.getJMSCorrelationID(), messageID );
+    }
+    
+    private org.jboss.soa.esb.message.Message createESBMessageObject( final String messageID, final String body) throws URISyntaxException
+    {
+        msg = MessageFactory.getInstance().getMessage();
+        msg.getHeader().getCall().setMessageID( new URI ( "1234-junittest" ) );
+        msg.getBody().add(body.getBytes());
+        return msg;
+    }
+
+    private static ConfigTree createConfigTree()
+    {
+        ConfigTree tree = new ConfigTree("test");
+        tree.setAttribute("jndiName", QUEUE_NAME);
+        return tree;
+    }
+
     private static final class MockQueueConnectionFactory extends QueueConnectionFactoryImpl
     {
         static int queueConnectionCount ;
@@ -308,6 +542,83 @@
         public void setTimeToLive(long arg0) throws JMSException {}
     }
     
+    private static class MockJMSRouter extends JMSRouter
+    {
+        @SuppressWarnings ( "unused" )
+        private Logger log = Logger.getLogger( MockJMSRouter.class );
+
+        private javax.jms.Message jmsMessage;
+        
+        private String securityPrincipal;
+        private String securityCredential;
+
+        public MockJMSRouter(ConfigTree propertiesTree) throws ConfigurationException, NamingException, JMSException
+        {
+            super( propertiesTree );
+        }
+
+        @Override
+        protected void createQueueSetup( String queueName ) throws ConfigurationException { }
+
+        @Override
+        protected void createQueueSetup( String queueName,
+            String jndiContextFactory,
+            String jndiUrl,
+            String jndiPkgPrefix,
+            String connectionFactory,
+            String securityPrincipal,
+            String securityCredential) throws ConfigurationException
+        {
+            this.securityPrincipal = securityPrincipal;
+            this.securityCredential = securityCredential;
+        }
+        
+        @Override
+        protected void send( javax.jms.Message jmsMessage ) throws JMSException
+        {
+            this.jmsMessage = jmsMessage;
+        }
+
+        public javax.jms.Message getJmsMessage()
+        {
+            return jmsMessage;
+        }
+
+        @Override
+        protected javax.jms.Message createJMSMessageWithObjectType( Object objectFromBody ) throws JMSException
+        {
+            TextMessageImpl textMessage = new TextMessageImpl();
+            textMessage.setText( new String ((byte[])objectFromBody) );
+            return textMessage;
+        }
+
+        @Override
+        protected javax.jms.Message createObjectMessage( Object message ) throws JMSException
+        {
+            ObjectMessageImpl impl = new ObjectMessageImpl();
+            impl.setObject( (Serializable) message );
+            return impl;
+        }
+        
+        public String getSecurityPrincipal() 
+        {
+            return securityPrincipal;
+        }
+
+        public String getSecurityCredential() 
+        {
+            return securityCredential;
+        }
+    }
+    
+    static class MockJMSPropertiesSetter implements JMSPropertiesSetter
+    {
+        public void setJMSProperties(final org.jboss.soa.esb.message.Message esbMsg, final javax.jms.Message jmsMessage) throws JMSException
+        {
+            jmsMessage.setStringProperty(PROPERTY_SETTER_TEST_NAME, PROPERTY_SETTER_TEST_NAME) ;
+        }
+    }
+    
     public static junit.framework.Test suite()
     {
         return new JUnit4TestAdapter(JMSRouterUnitTest.class);

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JmsRouterIntegrationTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JmsRouterIntegrationTest.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/routing/JmsRouterIntegrationTest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,402 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.soa.esb.actions.routing;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.Serializable;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Properties;
-
-import javax.jms.JMSException;
-import javax.jms.TextMessage;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import junit.framework.JUnit4TestAdapter;
-
-import org.apache.log4j.Logger;
-import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.NamingContextException;
-import org.jboss.soa.esb.listeners.gateway.DefaultESBPropertiesSetter;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.notification.jms.JMSPropertiesSetter;
-import org.jboss.soa.esb.testutils.SerializableMockQueue;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockejb.jms.MockQueue;
-import org.mockejb.jms.ObjectMessageImpl;
-import org.mockejb.jms.TextMessageImpl;
-import org.mockejb.jndi.MockContextFactory;
-
-/**
- * Integration test for {@link JMSRouter}
- * <p/>
- * @author John Doe
- * @author <a href="daniel.bevenius at redhat.com">Daniel Bevenius</a>				
- *
- */
-public class JmsRouterIntegrationTest
-{
-	@SuppressWarnings ( "unused")
-	private Logger log = Logger.getLogger( JmsRouterIntegrationTest.class );
-
-	private final String messageID = "1234-junittest";
-	private final String bodyContent = "hello";
-	private Message msg;
-	private ConfigTree tree;
-	private static final String PROPERTY_SETTER_TEST_NAME = "MockJMSPropertiesSetter" ;
-
-
-	@Test
-	public void processWithUnwrapFalse() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
-	{
-		MockJMSRouter router = new MockJMSRouter(tree);
-		router.route( msg );
-
-		assertProcessContract( messageID, msg, router );
-	}
-
-	@Test
-	public void processWithUnwrapTrue() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
-	{
-		tree.setAttribute( "unwrap", "true" );
-		MockJMSRouter router = new MockJMSRouter( tree );
-
-		router.route( msg );
-
-		assertProcessContract( messageID, msg, router );
-		final javax.jms.Message jmsMessage = ((MockJMSRouter) router).getJmsMessage();
-
-		assertTrue ( jmsMessage instanceof TextMessage );
-		final javax.jms.TextMessage textMessage = (TextMessage) jmsMessage;
-
-		assertEquals ( textMessage.getJMSCorrelationID(), messageID );
-		assertEquals ( textMessage.getText(), bodyContent );
-	}
-	
-	@Test
-	public void constructorWithSecurity() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
-	{
-		final String principal = "guest";
-		final String credential = "guest";
-		tree.setAttribute( "unwrap", "true" );
-		tree.setAttribute( JMSRouter.SECURITY_PRINCIPAL, principal );
-		tree.setAttribute( JMSRouter.SECURITY_CREDITIAL, credential );
-		MockJMSRouter router = new MockJMSRouter( tree );
-		
-		assertEquals (  principal, router.getSecurityPrincipal() );
-		assertEquals (  credential, router.getSecurityCredential() );
-	}
-	
-	@Test ( expected = ConfigurationException.class )
-	public void shouldThrowIfPrincipalIsNull() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
-	{
-		tree.setAttribute( JMSRouter.SECURITY_CREDITIAL, "testpassword" );
-		new MockJMSRouter( tree );
-	}
-	
-	@Test ( expected = ConfigurationException.class )
-	public void shouldThrowIfCredentialIsNull() throws ConfigurationException, NamingException, JMSException, ActionProcessingException, URISyntaxException
-	{
-		tree.setAttribute( JMSRouter.SECURITY_PRINCIPAL, "testuser" );
-		new MockJMSRouter( tree );
-	}
-
-	@Test ( expected = ActionProcessingException.class )
-	public void shouldThrowIfObjectIsNotAMessageObject() throws ConfigurationException, NamingException, JMSException, ActionProcessingException
-	{
-		ConfigTree tree = createConfigTree();
-		JMSRouter router = new MockJMSRouter(tree);
-		router.route( "test" );
-	}
-
-	@Test
-	public void setJMSReplyToQueue() throws JMSException, URISyntaxException, ConfigurationException, NamingException, ConnectionException, NamingContextException
-	{
-		try
-		{
-    		MockContextFactory.setAsInitial();
-    		Context context = new InitialContext();
-    		MockContextFactory.setDelegateContext( context );
-		
-    		final String destName = "/queue/A";
-    		final MockQueue queue = new SerializableMockQueue( destName );
-		
-    		context.rebind( destName, queue );
-
-    		// inbound is to simulate a jms message arriving at a gateway endpoint.
-    		TextMessageImpl inBoundJmsMessage = new TextMessageImpl();
-    		inBoundJmsMessage.setJMSReplyTo( queue );
-    		new DefaultESBPropertiesSetter().setPropertiesFromJMSMessage( inBoundJmsMessage, msg );
-		
-    		JMSRouter router = new JMSRouter( createConfigTree() );
-    		
-    		// outbound is to simulate a new jms message that is about to leave the ESB.
-    		TextMessageImpl outBoundJmsMessage = new TextMessageImpl();
-    		router.setJMSReplyTo( outBoundJmsMessage,  msg );
-		}
-		finally
-		{
-    		MockContextFactory.revertSetAsInitial();
-		}
-	}
-	
-	@Test
-	public void constructWithDefaultPersitentAttribute() throws ConfigurationException, NamingException, JMSException
-	{
-		ConfigTree config = createConfigTree();
-		JMSRouter router = new JMSRouter( config );
-		assertTrue( router.isDeliveryModePersistent() );
-	}
-
-	@Test
-	public void constructWithPersitentAttribute() throws ConfigurationException, NamingException, JMSException
-	{
-		ConfigTree config = createConfigTree();
-		config.setAttribute( JMSRouter.PERSISTENT_ATTR, "false" );
-		JMSRouter router = new JMSRouter( config );
-
-		assertFalse ( router.isDeliveryModePersistent() );
-	}
-
-	@Test
-	public void constructWithDefaultPriorityAttribute() throws ConfigurationException, NamingException, JMSException
-	{
-		ConfigTree config = createConfigTree();
-		JMSRouter router = new JMSRouter( config );
-		assertEquals( javax.jms.Message.DEFAULT_PRIORITY, router.getPriority() );
-	}
-
-	@Test
-	public void constructWithPriorityAttribute() throws ConfigurationException, NamingException, JMSException
-	{
-		final int expectedPriority = 9;
-		ConfigTree config = createConfigTree();
-		config.setAttribute( JMSRouter.PRIORITY_ATTR, String.valueOf( expectedPriority ) );
-		JMSRouter router = new JMSRouter( config );
-
-		assertEquals ( expectedPriority, router.getPriority() );
-	}
-
-	@Test
-	public void constructWithDefaultTimeToLiveAttribute() throws ConfigurationException, NamingException, JMSException
-	{
-		ConfigTree config = createConfigTree();
-		JMSRouter router = new JMSRouter( config );
-		assertEquals( javax.jms.Message.DEFAULT_TIME_TO_LIVE, router.getTimeToLive() );
-	}
-
-	@Test
-	public void constructWithTimeToLiveAttribute() throws ConfigurationException, NamingException, JMSException
-	{
-		final long ttl = 6000l;
-		ConfigTree config = createConfigTree();
-		config.setAttribute( JMSRouter.TIME_TO_LIVE_ATTR, String.valueOf( ttl ) );
-		JMSRouter router = new JMSRouter( config );
-
-		assertEquals ( ttl, router.getTimeToLive() );
-	}
-
-	@Test
-	public void specifyJNDIPropertiesInConfig() throws JMSException, URISyntaxException, ConfigurationException, NamingException, ConnectionException
-	{
-		final String jndiContextFactoryName = "org.jnp.interfaces.NamingContextFactory";
-		final String jndiURL = "localhost:1099";
-		final String jndiPkgPrefix = "org.jboss.naming";
-		final String connectionFactory = "ConnectionFactory";
-
-		ConfigTree config = createConfigTree();
-		config.setAttribute( JMSEpr.JNDI_CONTEXT_FACTORY_TAG, jndiContextFactoryName );
-		config.setAttribute( JMSEpr.JNDI_URL_TAG, jndiURL );
-		config.setAttribute( JMSEpr.JNDI_PKG_PREFIX_TAG, jndiPkgPrefix );
-		config.setAttribute( JMSEpr.CONNECTION_FACTORY_TAG, connectionFactory );
-
-		JMSRouter router = new JMSRouter( config );
-		assertEquals( jndiContextFactoryName, router.getContextFactoryName() );
-		assertEquals( jndiURL, router.getJndiURL() );
-		assertEquals( jndiPkgPrefix, router.getJndiPkgPrefix() );
-		assertEquals( connectionFactory, router.getConnectionFactory() );
-	}
-
-	@Test
-	public void usePropertyStrategy() throws ConfigurationException, NamingException, JMSException, ActionProcessingException
-	{
-		final ConfigTree tree = createConfigTree() ;
-		tree.setAttribute(JMSRouter.PROPERTY_STRATEGY, MockJMSPropertiesSetter.class.getName()) ;
-		final MockJMSRouter router = new MockJMSRouter(tree) ;
-		router.route(msg) ;
-		assertEquals("Property setter value", PROPERTY_SETTER_TEST_NAME, router.getJmsMessage().getStringProperty(PROPERTY_SETTER_TEST_NAME)) ;
-	}
-	
-	@Test
-    public void parseEnvironmentProperties() throws ConfigurationException, NamingException, JMSException
-    {
-        final String envPrefix = "test.prefix.";
-        final String propertyName = envPrefix + "test.propertyName";
-        final String propertyValue = "propertyValue";
-        final ConfigTree config = createConfigTree();
-        
-        // Add the jndi prefixes property.
-        config.setAttribute(JMSEpr.JNDI_PREFIXES, envPrefix);
-        
-        // Add the additional env property
-        config.setAttribute(propertyName, propertyValue);
-        
-        JMSRouter router = new JMSRouter(config);
-        Properties env = router.getEnvironment();
-        
-        assertEquals(4, env.size());
-        assertTrue(env.containsKey(propertyName));
-        assertEquals(propertyValue, env.get(propertyName));
-    }
-	
-	@Before
-	public void setup() throws URISyntaxException
-	{
-		msg = createESBMessageObject( messageID, bodyContent );
-		tree = createConfigTree();
-	}
-	
-	//	private
-
-	private void assertProcessContract( final String messageID, final Message msg, JMSRouter router ) throws ActionProcessingException, JMSException
-	{
-		final Message message = router.process ( msg );
-		assertNull ( "Routers process should return null",  message );
-		final javax.jms.Message jmsMessage = ((MockJMSRouter) router).getJmsMessage();
-		assertEquals ( jmsMessage.getJMSCorrelationID(), messageID );
-	}
-
-	private Message createESBMessageObject( final String messageID, final String body) throws URISyntaxException
-	{
-		Message msg = MessageFactory.getInstance().getMessage();
-		msg.getHeader().getCall().setMessageID( new URI ( "1234-junittest" ) );
-		msg.getBody().add(body.getBytes());
-		return msg;
-	}
-
-	private static ConfigTree createConfigTree()
-	{
-		ConfigTree tree = new ConfigTree("test");
-		tree.setAttribute("jndiName", "/queue/A");
-		return tree;
-	}
-	
-	private static class MockJMSRouter extends JMSRouter
-	{
-		@SuppressWarnings ( "unused" )
-		private Logger log = Logger.getLogger( MockJMSRouter.class );
-
-		private javax.jms.Message jmsMessage;
-		
-		private String securityPrincipal;
-		private String securityCredential;
-
-		public MockJMSRouter(ConfigTree propertiesTree) throws ConfigurationException, NamingException, JMSException
-		{
-			super( propertiesTree );
-        }
-
-		@Override
-		protected void createQueueSetup( String queueName ) throws ConfigurationException { }
-
-		@Override
-        protected void createQueueSetup( String queueName,
-    		String jndiContextFactory,
-    		String jndiUrl,
-    		String jndiPkgPrefix,
-    		String connectionFactory,
-    		String securityPrincipal,
-    		String securityCredential) throws ConfigurationException
-        {
-        	this.securityPrincipal = securityPrincipal;
-        	this.securityCredential = securityCredential;
-        }
-        
-		@Override
-		protected void send( javax.jms.Message jmsMessage ) throws JMSException
-		{
-			this.jmsMessage = jmsMessage;
-		}
-
-		public javax.jms.Message getJmsMessage()
-		{
-			return jmsMessage;
-		}
-
-		@Override
-		protected javax.jms.Message createJMSMessageWithObjectType( Object objectFromBody ) throws JMSException
-		{
-			TextMessageImpl textMessage = new TextMessageImpl();
-			textMessage.setText( new String ((byte[])objectFromBody) );
-			return textMessage;
-		}
-
-		@Override
-		protected javax.jms.Message createObjectMessage( Object message ) throws JMSException
-		{
-			ObjectMessageImpl impl = new ObjectMessageImpl();
-			impl.setObject( (Serializable) message );
-			return impl;
-		}
-		
-		public String getSecurityPrincipal() 
-		{
-			return securityPrincipal;
-		}
-
-		public String getSecurityCredential() 
-		{
-			return securityCredential;
-		}
-	}
-	
-	static class MockJMSPropertiesSetter implements JMSPropertiesSetter
-	{
-		public void setJMSProperties(final Message esbMsg, final javax.jms.Message jmsMessage)
-			throws JMSException
-		{
-			jmsMessage.setStringProperty(PROPERTY_SETTER_TEST_NAME, PROPERTY_SETTER_TEST_NAME) ;
-		}
-	}
-
-	/*
-	 * Just here to help Ant to find annotated test.
-	 */
-	public static junit.framework.Test suite()
-	{
-		return new JUnit4TestAdapter( JmsRouterIntegrationTest.class );
-	}
-
-}

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers)

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc)

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- * 
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- * 
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.listeners.deployers.mc;
-
-import java.net.URL;
-import java.util.Set;
-
-import javax.management.ObjectName;
-
-import org.jboss.test.kernel.junit.MicrocontainerTest;
-
-/**
- * Unit tests for {@link EsbConfigParser}.
- * <p/>
- * 
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- *
- */
-public class EsbConfigParserUnitTest extends MicrocontainerTest
-{
-    private URL dir = getClass().getResource("/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives");
-    
-    private EsbConfigParser parserDeployer = new EsbConfigParser();
-    
-    public EsbConfigParserUnitTest(String name)
-    {
-        super(name);
-    }
-    
-    public void testExplodedEsbArchiveDependencies() throws Throwable
-    {
-        EsbMetaData esbMetaData = TestUtil.getEsbMetaData(parserDeployer, dir, "exploded-esb-archive.esb");
-        assertEquals("exploded-esb-archive.esb", esbMetaData.getArchiveName());
-        assertEquals("exploded-esb-archive", esbMetaData.getDeploymentName());
-        
-        Set<ObjectName> deps = esbMetaData.getDependencies();
-        assertEquals(3, deps.size());
-        assertTrue(deps.contains(new ObjectName("jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_esb")));
-        assertTrue(deps.contains(new ObjectName("jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_gw")));
-        assertTrue(deps.contains(new ObjectName("jboss.web.deployment:war=/test2")));
-    }
-    
-}

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+import java.net.URL;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.soa.esb.listeners.deployers.mc.util.VfsUtil;
+import org.jboss.test.kernel.junit.MicrocontainerTest;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * Unit tests for {@link EsbConfigParser}.
+ * <p/>
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ *
+ */
+public class EsbConfigParserUnitTest extends MicrocontainerTest
+{
+    private URL dir = getClass().getResource("/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives");
+    
+    private EsbConfigParser parserDeployer = new EsbConfigParser();
+    
+    public EsbConfigParserUnitTest(String name)
+    {
+        super(name);
+    }
+    
+    public void testExplodedEsbArchiveDependencies() throws Throwable
+    {
+        EsbMetaData esbMetaData = TestUtil.getEsbMetaData(parserDeployer, dir, "exploded-esb-archive.esb");
+        assertEquals("exploded-esb-archive.esb", esbMetaData.getArchiveName());
+        assertEquals("exploded-esb-archive", esbMetaData.getDeploymentName());
+        
+        Set<ObjectName> deps = esbMetaData.getDependencies();
+        
+        assertEquals(3, deps.size());
+        assertTrue(deps.contains(new ObjectName("jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_esb")));
+        assertTrue(deps.contains(new ObjectName("jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_gw")));
+        assertTrue(deps.contains(new ObjectName("jboss.web.deployment:war=/test2")));
+    }
+    
+    public void testGetDependenciesFromDeploymentUnit() throws Exception
+    {
+        VFSDeploymentUnit unit = TestUtil.getDeploymentUnit(dir, "exploded-esb-archive.esb");
+        Set<ObjectName> deps = parserDeployer.getDependenciesFromDeploymentXml(unit);
+        
+        assertFalse(deps.isEmpty());
+        assertEquals(3, deps.size());
+        assertTrue(deps.contains(new ObjectName("jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_esb")));
+        assertTrue(deps.contains(new ObjectName("jboss.web.deployment:war=/test2")));
+        assertTrue(deps.contains(new ObjectName("jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_gw")));
+    }
+    
+    public void testGetDependenciesFromDeploymentUnitNoDeps() throws Exception
+    {
+        VirtualFile vfs = VfsUtil.createInMemoryFs(VfsUtil.createInMemUrl("confParser"));
+        VFSDeploymentUnit unit = TestUtil.getDeploymentUnit(vfs);
+        Set<ObjectName> deps = parserDeployer.getDependenciesFromDeploymentXml(unit);
+        
+        assertTrue(deps.isEmpty());
+    }
+    
+    public void testDeploymentName() throws Exception
+    {
+        VirtualFile vfs = VfsUtil.createInMemoryFs(VfsUtil.createInMemUrl("confParser"));
+        VFSDeploymentUnit unit = TestUtil.getDeploymentUnit(vfs);
+        
+        assertEquals("", parserDeployer.getDeploymentName(unit));
+    }
+    
+    public void testGetDeploymentName() throws Exception
+    {
+        VFSDeploymentUnit unit = TestUtil.getDeploymentUnit(dir, "exploded-esb-archive.esb");
+        
+        assertEquals("exploded-esb-archive", parserDeployer.getDeploymentName(unit));
+    }
+    
+}

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.xml	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
-            xmlns="urn:jboss:bean-deployer:2.0">
-
-   <bean name="EsbConfigParser" class="org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser">
-      <property name="esbDeploymentPrefix">jboss.esb:deployment=</property>
-      <property name="actionArtifactsFile">/org/jboss/soa/esb/listeners/deployers/mc/actionArtifactMap.properties</property>
-   </bean>
-   
-   <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
-      <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
-      <property name="deployers"><inject bean="Deployers"/></property>
-   </bean>
-
-   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
-      <property name="structureBuilder">
-         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
-      </property>
-      <incallback method="addDeployer"/>
-      <uncallback method="removeDeployer"/>
-   </bean>
-
-   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
-      <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
-      <incallback method="addDeployer"/>
-      <uncallback method="removeDeployer"/>
-   </bean>
-   
-   
-</deployment>

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.xml)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParserUnitTest.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+            xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="EsbConfigParser" class="org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser">
+      <property name="esbDeploymentPrefix">jboss.esb:deployment=</property>
+      <property name="actionArtifactsFile">/org/jboss/soa/esb/listeners/deployers/mc/actionArtifactMap.properties</property>
+   </bean>
+   
+   <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+      <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
+      <property name="deployers"><inject bean="Deployers"/></property>
+   </bean>
+
+   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
+      <property name="structureBuilder">
+         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
+      </property>
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+
+   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
+      <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+   
+   
+</deployment>

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- * 
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- * 
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.listeners.deployers.mc;
-
-import java.net.URL;
-
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.test.kernel.junit.MicrocontainerTest;
-
-/**
- * Unit tests for {@link EsbDeployer}.
- * <p/>
- * 
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- *
- */
-public class EsbDeployerUnitTest extends MicrocontainerTest
-{
-    private URL dir = getClass().getResource("/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives");
-    
-    private EsbDeployer esbDeployer = new EsbDeployer();
-    
-    public EsbDeployerUnitTest(String name)
-    {
-        super(name);
-    }
-    
-    public void testExplodedEsbArchive() throws Throwable
-    {
-        final String archiveName = "exploded-esb-archive.esb";
-        EsbMetaData esbMetaData = TestUtil.getEsbMetaData(new EsbConfigParser(), dir, archiveName);
-        VFSDeploymentUnit deploymentUnit = TestUtil.getDeploymentUnit(dir, archiveName);
-        
-        esbDeployer.deploy(deploymentUnit, esbMetaData);
-        Object attachment = deploymentUnit.getAttachment(BeanMetaData.class.getName() + "_ESB");
-        assertTrue(attachment instanceof BeanMetaData);
-    }
-    
-}

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+import java.net.URL;
+import java.util.List;
+
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.test.kernel.junit.MicrocontainerTest;
+
+/**
+ * Unit tests for {@link EsbDeployer}.
+ * <p/>
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ *
+ */
+public class EsbDeployerUnitTest extends MicrocontainerTest
+{
+    private URL dir = getClass().getResource("/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives");
+    
+    private EsbDeployer esbDeployer = new EsbDeployer();
+    
+    public EsbDeployerUnitTest(String name)
+    {
+        super(name);
+    }
+    
+    public void testExplodedEsbArchive() throws Throwable
+    {
+        final String archiveName = "exploded-esb-archive.esb";
+        EsbMetaData esbMetaData = TestUtil.getEsbMetaData(new EsbConfigParser(), dir, archiveName);
+        VFSDeploymentUnit deploymentUnit = TestUtil.getDeploymentUnit(dir, archiveName);
+        
+        esbDeployer.deploy(deploymentUnit, esbMetaData);
+        Object attachment = deploymentUnit.getAttachment(BeanMetaData.class.getName() + "_ESB");
+        assertTrue(attachment instanceof BeanMetaData);
+        
+        EsbDeployer esbDeployer = (EsbDeployer) getBean("EsbDeployer");
+        List<String> defaultDependencies = esbDeployer.getDefaultDependencies();
+        assertEquals(2, defaultDependencies.size());
+        assertEquals("jboss.esb", esbDeployer.getEsbBeanPrefix());
+    }
+    
+}

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.xml	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
-            xmlns="urn:jboss:bean-deployer:2.0">
-
-   <bean name="EsbConfigParser" class="org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser"/>
-   
-   <bean name="EsbDeployer" class="org.jboss.soa.esb.listeners.deployers.mc.EsbDeployer"/>
-   
-   <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
-      <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
-      <property name="deployers"><inject bean="Deployers"/></property>
-   </bean>
-
-   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
-      <property name="structureBuilder">
-         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
-      </property>
-      <incallback method="addDeployer"/>
-      <uncallback method="removeDeployer"/>
-   </bean>
-
-   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
-      <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
-      <incallback method="addDeployer"/>
-      <uncallback method="removeDeployer"/>
-   </bean>
-   
-   <bean name="EsbStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure">
-        <incallback method="addJarExtension">
-            <parameter><inject bean="EsbExtensionProvider"/></parameter>
-        </incallback>
-    </bean>
-    <bean name="EsbExtensionProvider" class="org.jboss.soa.esb.listeners.deployers.mc.EsbExtensionProvider"/>
-   
-   
-   
-</deployment>

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.xml)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployerUnitTest.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+            xmlns="urn:jboss:bean-deployer:2.0">
+            
+   <bean name="EsbConfigParser" class="org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser"/>
+   
+    <bean name="EsbDeployer" class="org.jboss.soa.esb.listeners.deployers.mc.EsbDeployer">
+        <property name="esbBeanPrefix">jboss.esb</property>
+        <property name="defaultDependencies">
+            <list elementClass="java.lang.String">
+                <value>jboss.esb:service=ESBRegistry</value>
+                <value>jboss.esb:service=JuddiRMI</value>
+            </list>
+        </property>
+   </bean>
+   
+   <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+      <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
+      <property name="deployers"><inject bean="Deployers"/></property>
+   </bean>
+
+   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
+      <property name="structureBuilder">
+         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
+      </property>
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+
+   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
+      <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+   
+   <bean name="EsbStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure">
+        <incallback method="addJarExtension">
+            <parameter><inject bean="EsbExtensionProvider"/></parameter>
+        </incallback>
+    </bean>
+    <bean name="EsbExtensionProvider" class="org.jboss.soa.esb.listeners.deployers.mc.EsbExtensionProvider"/>
+   
+   
+   
+</deployment>

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbExtensionProvider.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbExtensionProvider.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbExtensionProvider.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.listeners.deployers.mc;
-
-import org.jboss.deployers.spi.deployer.matchers.JarExtensionProvider;
-
-/**
- * Simply adds the '.esb' extension.
- *
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- *
- */
-public class EsbExtensionProvider implements JarExtensionProvider
-{
-    /**
-     * Returns '.esb'.
-     *
-     * @return String The '.esb' extension.
-     */
-    public final String getJarExtension()
-    {
-        return ".esb";
-    }
-
-}

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbExtensionProvider.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbExtensionProvider.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbExtensionProvider.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbExtensionProvider.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+import org.jboss.deployers.spi.deployer.matchers.JarExtensionProvider;
+
+/**
+ * Simply adds the '.esb' extension.
+ *
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ *
+ */
+public class EsbExtensionProvider implements JarExtensionProvider
+{
+    /**
+     * Returns '.esb'.
+     *
+     * @return String The '.esb' extension.
+     */
+    public final String getJarExtension()
+    {
+        return ".esb";
+    }
+
+}

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbStructure.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbStructure.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbStructure.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,78 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.listeners.deployers.mc;
-
-import java.util.HashSet;
-
-import org.apache.log4j.Logger;
-import org.jboss.deployers.vfs.plugins.structure.jar.JARStructure;
-
-/**
- * A StructureDeployer that can identify .esb archives.
- *
- * A StructureDeployer is a deployer that runs prior to normal deployers, and
- *
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- *
- */
-public class EsbStructure extends JARStructure
-{
-    /**
-     * Logger.
-     */
-    private Logger log = Logger.getLogger(EsbStructure.class);
-
-    /**
-     * Suffix used to identify a esb archive(file or directory).
-     */
-    private static final String ESB_JAR_SUFFIX = ".esb";
-
-    /**
-     * The suffixes that this structure handles.
-     */
-    private HashSet<String> suffixes;
-
-    /**
-     *
-     */
-    public EsbStructure()
-    {
-        setRelativeOrder(1000);
-        suffixes = new HashSet<String>();
-        suffixes.add(ESB_JAR_SUFFIX);
-        setSuffixes(suffixes);
-        addJarExtension(null);
-        log.info(this);
-    }
-
-    /**
-     * Returns a string representation of this instance.
-     * @return String The string representation of this instance.
-     *
-     */
-    @Override
-    public final String toString()
-    {
-        return "EsbStructure [suffixes='" + suffixes + "']";
-    }
-
-
-}

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbStructure.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbStructure.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbStructure.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbStructure.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+import java.util.HashSet;
+
+import org.apache.log4j.Logger;
+import org.jboss.deployers.vfs.plugins.structure.jar.JARStructure;
+
+/**
+ * A StructureDeployer that can identify .esb archives.
+ *
+ * A StructureDeployer is a deployer that runs prior to normal deployers, and
+ *
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ *
+ */
+public class EsbStructure extends JARStructure
+{
+    /**
+     * Logger.
+     */
+    private Logger log = Logger.getLogger(EsbStructure.class);
+
+    /**
+     * Suffix used to identify a esb archive(file or directory).
+     */
+    private static final String ESB_JAR_SUFFIX = ".esb";
+
+    /**
+     * The suffixes that this structure handles.
+     */
+    private HashSet<String> suffixes;
+
+    /**
+     *
+     */
+    public EsbStructure()
+    {
+        setRelativeOrder(1000);
+        suffixes = new HashSet<String>();
+        suffixes.add(ESB_JAR_SUFFIX);
+        setSuffixes(suffixes);
+        addJarExtension(null);
+        log.info(this);
+    }
+
+    /**
+     * Returns a string representation of this instance.
+     * @return String The string representation of this instance.
+     *
+     */
+    @Override
+    public final String toString()
+    {
+        return "EsbStructure [suffixes='" + suffixes + "']";
+    }
+
+
+}

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,107 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- * 
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- * 
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.listeners.deployers.mc;
-
-import java.net.URL;
-
-import org.jboss.classloader.spi.ClassLoaderDomain;
-import org.jboss.classloader.spi.ClassLoaderPolicy;
-import org.jboss.classloader.spi.ClassLoaderSystem;
-import org.jboss.deployers.client.spi.Deployment;
-import org.jboss.deployers.client.spi.main.MainDeployer;
-import org.jboss.deployers.plugins.main.MainDeployerImpl;
-import org.jboss.deployers.structure.spi.DeploymentContext;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.spi.client.VFSDeployment;
-import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
-import org.jboss.test.kernel.junit.MicrocontainerTest;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-
-/**
- * Unit tests for {@link EsbWebServiceDeployer}.
- * <p/>
- * 
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- *
- */
-public class EsbWebServiceDeployerUnitTest extends MicrocontainerTest
-{
-    private URL dir = getClass().getResource("/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives");
-    
-    private EsbWebServiceDeployer esbWebServiceDeployer = new EsbWebServiceDeployer();
-    
-    public EsbWebServiceDeployerUnitTest(String name)
-    {
-        super(name);
-    }
-    
-    public void testJBossWebMetaDataCreated() throws Throwable
-    {
-        //final String archiveName = "exploded-esb-archive.esb";
-        //EsbMetaData esbMetaData = TestUtil.getEsbMetaData(new EsbConfigParser(), dir, archiveName);
-        //VFSDeploymentUnit deploymentUnit = TestUtil.getDeploymentUnit(dir, archiveName);
-        //MainDeployer mainDeployer = deploymentUnit.getMainDeployer();
-        
-        final String archiveName = "exploded-esb-archive.esb";
-        VirtualFile virtualFile = VFS.getVirtualFile(dir, archiveName);
-        VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(virtualFile);
-        MainDeployerImpl mainDeployer = (MainDeployerImpl) getBean("MainDeployer");
-        mainDeployer.deploy(deployment);
-        
-        //URL r = deploymentUnit.getClassLoader().getResource("test.txt");
-        DeploymentUnit deploymentUnit = mainDeployer.getDeploymentUnit(deployment.getName());
-        
-        /*
-        
-        esbWebServiceDeployer.deploy(deploymentUnit, esbMetaData);
-        JBossWebMetaData webMetaData = deploymentUnit.getAttachment(JBossWebMetaData.class);
-        assertNotNull(webMetaData);
-        
-        //JBossServletsMetaData servlets = webMetaData.getServlets();
-        //assertEquals(1, servlets.size());
-        //final String servletClassName = servlets.iterator().next().getServletClass();
-        //assertEquals("esb.ws.FirstServiceESB.SimpleListener.Implementation", servletClassName);
-        
-        
-        URL r = deploymentUnit.getClassLoader().getResource("test.txt");
-        System.out.println(r);
-        
-        URL wsdl = deploymentUnit.getClassLoader().getResource("/WEB-INF/wsdl/FirstServiceESB/SimpleListener.wsdl");
-        assertNotNull("No wsdl file was added to the classpath.", wsdl);
-        
-        //URL servletClass = deploymentUnit.getClassLoader().getResource("/WEB-INF/classes/esb/ws/FirstServiceESB.SimpleListener.Implementation.class");
-        //assertNotNull("No servletclass(WS) was added to the classpath", servletClass);
-        
-        // Try loading the servlet class to verify that it is available to the deployment units classloader
-        try
-        {
-            deploymentUnit.getClassLoader().loadClass("Test");
-        }
-        catch (final Exception e)
-        {
-            e.printStackTrace();
-            fail(e.getMessage());
-        }
-        */
-    }
-    
-}

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,136 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.deployers.plugins.main.MainDeployerImpl;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.soa.esb.listeners.deployers.mc.util.VfsUtil;
+import org.jboss.test.kernel.junit.MicrocontainerTest;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * Unit tests for {@link EsbWebServiceDeployer}.
+ * <p/>
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ *
+ */
+public class EsbWebServiceDeployerUnitTest extends MicrocontainerTest
+{
+    private Deployment deployment;
+    private MainDeployerImpl mainDeployer;
+    
+    public EsbWebServiceDeployerUnitTest(String name)
+    {
+        super(name);
+    }
+    
+    @Override
+    public void afterSetUp() throws Exception
+    {
+        super.afterSetUp();
+        
+        final String archiveName = "exploded-esb-archive.esb";
+        final URL dir = getClass().getResource("/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives");
+        final VirtualFile archiveFile = VFS.getVirtualFile(dir, archiveName);
+        deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(archiveFile);
+        mainDeployer = (MainDeployerImpl) getBean("MainDeployer");
+        mainDeployer.deploy(deployment);
+    }
+    
+    public void testJBossWebMetaDataCreated() throws Throwable
+    {
+        final DeploymentUnit unit = mainDeployer.getDeploymentUnit(deployment.getName());
+        final JBossWebMetaData webMD = unit.getAttachment(JBossWebMetaData.class);
+        assertNotNull(webMD);
+        
+        final JBossServletsMetaData servlets = webMD.getServlets();
+        assertEquals(1, servlets.size());
+        
+        final String servletClassName = servlets.iterator().next().getServletClass();
+        assertEquals("esb.ws.FirstServiceESB.SimpleListener.Implementation", servletClassName);
+        
+        final List<ServletMappingMetaData> mappings = webMD.getServletMappings();
+        assertEquals(1, mappings.size());
+        assertEquals("FirstServiceESB_SimpleListener", mappings.get(0).getServletName());
+        assertEquals(1, mappings.get(0).getUrlPatterns().size());
+        assertEquals("/FirstServiceESB/SimpleListener", mappings.get(0).getUrlPatterns().get(0));
+    }
+    
+    public void testServletAddedToClassPath() throws Throwable
+    {
+        final VFSDeploymentUnit unit = (VFSDeploymentUnit) mainDeployer.getDeploymentUnit(deployment.getName());
+        final VirtualFile classesDir = getWebInfClassesDir(unit.getClassPath());
+        
+        assertNotNull(classesDir.getChild("esb/ws/FirstServiceESB/SimpleListener/Implementation.class"));
+    }
+    
+    public void testUndeployCleanup() throws DeploymentException, MalformedURLException, IOException
+    {
+        final EsbWebServiceDeployer wsDeployer = (EsbWebServiceDeployer) getBean("EsbWebServiceDeployer");
+        
+        final VFSDeploymentUnit unit = (VFSDeploymentUnit) mainDeployer.getDeploymentUnit(deployment.getName());
+        final URL inMemRootUrl = VfsUtil.createInMemUrl("exploded-esb-archive");
+        final VirtualFile inMemRootDir = VfsUtil.createInMemoryFs(inMemRootUrl);
+        unit.addAttachment(EsbWebServiceDeployer.DYNAMIC_CL_DIR_KEY, inMemRootDir);
+        unit.addAttachment(EsbWebServiceDeployer.DYNAMIC_CL_URL_KEY, inMemRootUrl);
+        
+        wsDeployer.undeploy(unit, null);
+        
+        assertNull(unit.getAttachment(EsbWebServiceDeployer.DYNAMIC_CL_DIR_KEY));
+        assertNull(unit.getAttachment(EsbWebServiceDeployer.DYNAMIC_CL_URL_KEY));
+        
+        final VirtualFile classesDir = getWebInfClassesDir(unit.getClassPath());
+        assertNull(classesDir);
+    }
+    
+    public void tearDown() throws Exception
+    {
+        mainDeployer.undeploy(deployment);
+        super.tearDown();
+    }
+
+    private VirtualFile getWebInfClassesDir(final List<VirtualFile> classpath)
+    {
+        for (VirtualFile file : classpath)
+        {
+            if (file.getPathName().equals("WEB-INF/classes"))
+            {
+                return file;
+            }
+        }
+        return null;
+    }
+    
+}

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.xml	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
-            xmlns="urn:jboss:bean-deployer:2.0">
-            
-   <bean name="EsbConfigParser" class="org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser"/>
-   
-   <!-- bean name="EsbClassPathSetup" class="org.jboss.soa.esb.listeners.deployers.mc.EsbWebServiceClassPathSetup"/-->
-   
-   <bean name="EsbWebServiceDeployer" class="org.jboss.soa.esb.listeners.deployers.mc.EsbWebServiceDeployer"/>
-   
-   <bean name="EsbDeployer" class="org.jboss.soa.esb.listeners.deployers.mc.EsbDeployer"/>
-   
-   
-   <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
-      <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
-      <property name="deployers"><inject bean="Deployers"/></property>
-   </bean>
-
-   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
-      <property name="structureBuilder">
-         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
-      </property>
-      <incallback method="addDeployer"/>
-      <uncallback method="removeDeployer"/>
-   </bean>
-
-   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
-      <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
-      <incallback method="addDeployer"/>
-      <uncallback method="removeDeployer"/>
-   </bean>
-   
-   <bean name="EsbStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure">
-        <incallback method="addJarExtension">
-            <parameter><inject bean="EsbExtensionProvider"/></parameter>
-        </incallback>
-    </bean>
-    <bean name="EsbExtensionProvider" class="org.jboss.soa.esb.listeners.deployers.mc.EsbExtensionProvider"/>
-   
-   
-</deployment>

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.xml)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/EsbWebServiceDeployerUnitTest.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+            xmlns="urn:jboss:bean-deployer:2.0">
+            
+    <bean name="EsbConfigParser" class="org.jboss.soa.esb.listeners.deployers.mc.EsbConfigParser"/>
+   
+    <bean name="EsbWebServiceDeployer" class="org.jboss.soa.esb.listeners.deployers.mc.EsbWebServiceDeployer"/>
+   
+    <!-- bean name="EsbWsdlDeployer" class="org.jboss.soa.esb.listeners.deployers.mc.EsbWsdlDeployer"/-->
+   
+    <bean name="EsbDeployer" class="org.jboss.soa.esb.listeners.deployers.mc.EsbDeployer"/>
+   
+    <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+        <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
+        <property name="deployers"><inject bean="Deployers"/></property>
+    </bean>
+
+    <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
+        <property name="structureBuilder">
+            <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
+        </property>
+        <incallback method="addDeployer"/>
+        <uncallback method="removeDeployer"/>
+    </bean>
+
+    <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
+        <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
+        <incallback method="addDeployer"/>
+        <uncallback method="removeDeployer"/>
+    </bean>
+   
+    <bean name="EsbStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure">
+        <incallback method="addJarExtension">
+            <parameter><inject bean="EsbExtensionProvider"/></parameter>
+        </incallback>
+    </bean>
+    
+    <bean name="EsbExtensionProvider" class="org.jboss.soa.esb.listeners.deployers.mc.EsbExtensionProvider"/>
+    
+</deployment>

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestClassLoaderDeployer.java (from rev 26763, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestClassLoaderDeployer.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestClassLoaderDeployer.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestClassLoaderDeployer.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+import org.jboss.deployers.spi.deployer.helpers.AbstractClassLoaderDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ *
+ */
+public class TestClassLoaderDeployer extends AbstractClassLoaderDeployer
+{
+    public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception
+    {
+        return unit.getClass().getClassLoader();
+    }
+
+}

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestUtil.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestUtil.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestUtil.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,239 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
- * LLC, and individual contributors by the @authors tag. See the copyright.txt
- * in the distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.listeners.deployers.mc;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.List;
-
-import org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentUnit;
-import org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl;
-import org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder;
-import org.jboss.deployers.vfs.plugins.structure.jar.JARStructure;
-import org.jboss.deployers.vfs.spi.client.VFSDeployment;
-import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
-import org.jboss.deployers.vfs.spi.structure.StructureDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.deployment.DeploymentException;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.spi.VFSContext;
-import org.jboss.virtual.spi.VirtualFileHandler;
-
-/**
- * Util methods used with Microcontainer tests.
- * </p>
- * 
- * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
- */
-public class TestUtil
-{
-    private TestUtil() { }
-
-    public static VFSDeploymentUnit getDeploymentUnit(final VirtualFile esbArchive) throws Exception
-    {
-        VFSDeploymentContext deploymentContext = getDeploymentContext(esbArchive);
-        deploymentContext.setClassLoader(TestUtil.class.getClassLoader());
-        return getDeploymentUnit(deploymentContext);
-    }
-
-    public static VFSDeploymentUnit getDeploymentUnit(final VFSDeploymentContext deploymentContext)
-    {
-        return new AbstractVFSDeploymentUnit(deploymentContext);
-    }
-
-    public static VFSDeploymentContext getDeploymentContext(final VirtualFile esbArchive) throws Exception
-    {
-        VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(esbArchive);
-        VFSStructuralDeployersImpl structuralDeployers = new VFSStructuralDeployersImpl();
-        VFSStructureBuilder builder = new VFSStructureBuilder();
-        structuralDeployers.setStructureBuilder(builder);
-        StructureDeployer[] deployers = new StructureDeployer[]{new JARStructure()};
-        for (StructureDeployer deployer : deployers)
-        {
-            structuralDeployers.addDeployer(deployer);
-        }
-        return (VFSDeploymentContext) structuralDeployers.determineStructure(deployment);
-    }
-
-    public static VirtualFile getVirtualFile(final URL directoryURL, final String fileName, final Class<?> clazz) throws Exception
-    {
-        return VFS.getVirtualFile(directoryURL, fileName);
-    }
-
-
-    public static VirtualFile getMockVF(final File esbFile)
-    {
-        VirtualFile file = new VirtualFile(new VirtualFileHandler()
-        {
-            private static final long serialVersionUID = 1L;
-
-            public void close()
-            {
-            }
-
-            public boolean exists() throws IOException
-            {
-                return false;
-            }
-
-            public VirtualFileHandler getChild(String arg0) throws IOException
-            {
-                return null;
-            }
-
-            public List<VirtualFileHandler> getChildren(boolean arg0) throws IOException
-            {
-                return null;
-            }
-
-            public long getLastModified() throws IOException
-            {
-                return 0;
-            }
-
-            public String getName()
-            {
-                return esbFile.getName();
-            }
-
-            public VirtualFileHandler getParent() throws IOException
-            {
-                return null;
-            }
-
-            public String getPathName()
-            {
-                return esbFile.getAbsolutePath();
-            }
-
-            public long getSize() throws IOException
-            {
-                return 0;
-            }
-
-            public VFSContext getVFSContext()
-            {
-                return null;
-            }
-
-            public VirtualFile getVirtualFile()
-            {
-                return null;
-            }
-
-            public boolean hasBeenModified() throws IOException
-            {
-                return false;
-            }
-
-            public boolean isHidden() throws IOException
-            {
-                return false;
-            }
-
-            public boolean isLeaf() throws IOException
-            {
-                return false;
-            }
-
-            public String getLocalPathName()
-            {
-                return null;
-            }
-
-            public boolean isNested() throws IOException
-            {
-                return false;
-            }
-
-            public InputStream openStream() throws IOException
-            {
-                return null;
-            }
-
-            public URI toURI() throws URISyntaxException
-            {
-                return null;
-            }
-
-            public URL toURL() throws MalformedURLException, URISyntaxException
-            {
-                return null;
-            }
-
-            public URL toVfsUrl() throws MalformedURLException, URISyntaxException
-            {
-                return null;
-            }
-
-            public void replaceChild(VirtualFileHandler original, VirtualFileHandler replacement)
-            {
-            }
-
-            public boolean removeChild(String name) throws IOException
-            {
-                return false;
-            }
-
-            public boolean delete(int gracePeriod) throws IOException
-            {
-                return false;
-            }
-
-            public void cleanup()
-            {
-            }
-
-            public URL getRealURL() throws IOException, URISyntaxException
-            {
-                
-                return null;
-            }
-
-            public boolean isArchive() throws IOException
-            {
-                
-                return false;
-            }
-        });
-        return file;
-    }
-    
-    public static VFSDeploymentUnit getDeploymentUnit(final URL dir, final String archiveName) throws Exception
-    {
-        VirtualFile virtualFile = TestUtil.getVirtualFile(dir, archiveName, TestUtil.class);
-        return TestUtil.getDeploymentUnit(virtualFile);
-    }
-    
-    public static EsbMetaData getEsbMetaData(final EsbConfigParser parserDeployer, final URL dir, final String archiveName) throws Exception, DeploymentException
-    {
-        VirtualFile virtualFile = TestUtil.getVirtualFile(dir, archiveName, TestUtil.class);
-        VFSDeploymentUnit deploymentUnit = getDeploymentUnit(dir, archiveName);
-        return parserDeployer.parse(deploymentUnit, virtualFile, (EsbMetaData)null);
-    }
-}

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestUtil.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestUtil.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestUtil.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/TestUtil.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,238 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.List;
+
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentUnit;
+import org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl;
+import org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder;
+import org.jboss.deployers.vfs.plugins.structure.jar.JARStructure;
+import org.jboss.deployers.vfs.spi.client.VFSDeployment;
+import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
+import org.jboss.deployers.vfs.spi.structure.StructureDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.deployment.DeploymentException;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.spi.VFSContext;
+import org.jboss.virtual.spi.VirtualFileHandler;
+
+/**
+ * Util methods used with Microcontainer tests.
+ * </p>
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ */
+public class TestUtil
+{
+    private TestUtil() { }
+
+    public static VFSDeploymentUnit getDeploymentUnit(final VirtualFile esbArchive) throws Exception
+    {
+        VFSDeploymentContext deploymentContext = getDeploymentContext(esbArchive);
+        deploymentContext.setClassLoader(TestUtil.class.getClassLoader());
+        return getDeploymentUnit(deploymentContext);
+    }
+
+    public static VFSDeploymentUnit getDeploymentUnit(final VFSDeploymentContext deploymentContext)
+    {
+        return new AbstractVFSDeploymentUnit(deploymentContext);
+    }
+
+    public static VFSDeploymentContext getDeploymentContext(final VirtualFile esbArchive) throws Exception
+    {
+        VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(esbArchive);
+        VFSStructuralDeployersImpl structuralDeployers = new VFSStructuralDeployersImpl();
+        VFSStructureBuilder builder = new VFSStructureBuilder();
+        structuralDeployers.setStructureBuilder(builder);
+        StructureDeployer[] deployers = new StructureDeployer[]{new JARStructure()};
+        for (StructureDeployer deployer : deployers)
+        {
+            structuralDeployers.addDeployer(deployer);
+        }
+        return (VFSDeploymentContext) structuralDeployers.determineStructure(deployment);
+    }
+
+    public static VirtualFile getVirtualFile(final URL directoryURL, final String fileName, final Class<?> clazz) throws Exception
+    {
+        return VFS.getVirtualFile(directoryURL, fileName);
+    }
+
+    public static VirtualFile getMockVF(final File esbFile)
+    {
+        VirtualFile file = new VirtualFile(new VirtualFileHandler()
+        {
+            private static final long serialVersionUID = 1L;
+
+            public void close()
+            {
+            }
+
+            public boolean exists() throws IOException
+            {
+                return false;
+            }
+
+            public VirtualFileHandler getChild(String arg0) throws IOException
+            {
+                return null;
+            }
+
+            public List<VirtualFileHandler> getChildren(boolean arg0) throws IOException
+            {
+                return null;
+            }
+
+            public long getLastModified() throws IOException
+            {
+                return 0;
+            }
+
+            public String getName()
+            {
+                return esbFile.getName();
+            }
+
+            public VirtualFileHandler getParent() throws IOException
+            {
+                return null;
+            }
+
+            public String getPathName()
+            {
+                return esbFile.getAbsolutePath();
+            }
+
+            public long getSize() throws IOException
+            {
+                return 0;
+            }
+
+            public VFSContext getVFSContext()
+            {
+                return null;
+            }
+
+            public VirtualFile getVirtualFile()
+            {
+                return null;
+            }
+
+            public boolean hasBeenModified() throws IOException
+            {
+                return false;
+            }
+
+            public boolean isHidden() throws IOException
+            {
+                return false;
+            }
+
+            public boolean isLeaf() throws IOException
+            {
+                return false;
+            }
+
+            public String getLocalPathName()
+            {
+                return null;
+            }
+
+            public boolean isNested() throws IOException
+            {
+                return false;
+            }
+
+            public InputStream openStream() throws IOException
+            {
+                return null;
+            }
+
+            public URI toURI() throws URISyntaxException
+            {
+                return null;
+            }
+
+            public URL toURL() throws MalformedURLException, URISyntaxException
+            {
+                return null;
+            }
+
+            public URL toVfsUrl() throws MalformedURLException, URISyntaxException
+            {
+                return null;
+            }
+
+            public void replaceChild(VirtualFileHandler original, VirtualFileHandler replacement)
+            {
+            }
+
+            public boolean removeChild(String name) throws IOException
+            {
+                return false;
+            }
+
+            public boolean delete(int gracePeriod) throws IOException
+            {
+                return false;
+            }
+
+            public void cleanup()
+            {
+            }
+
+            public URL getRealURL() throws IOException, URISyntaxException
+            {
+                
+                return null;
+            }
+
+            public boolean isArchive() throws IOException
+            {
+                
+                return false;
+            }
+        });
+        return file;
+    }
+    
+    public static VFSDeploymentUnit getDeploymentUnit(final URL dir, final String archiveName) throws Exception
+    {
+        VirtualFile virtualFile = TestUtil.getVirtualFile(dir, archiveName, TestUtil.class);
+        return TestUtil.getDeploymentUnit(virtualFile);
+    }
+    
+    public static EsbMetaData getEsbMetaData(final EsbConfigParser parserDeployer, final URL dir, final String archiveName) throws Exception, DeploymentException
+    {
+        VirtualFile virtualFile = TestUtil.getVirtualFile(dir, archiveName, TestUtil.class);
+        VFSDeploymentUnit deploymentUnit = getDeploymentUnit(dir, archiveName);
+        return parserDeployer.parse(deploymentUnit, virtualFile, (EsbMetaData)null);
+    }
+}

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/actionArtifactMap.properties
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/actionArtifactMap.properties	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/actionArtifactMap.properties	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,54 +0,0 @@
-#
-# The following actions are included in jbossesb.sar and require
-# no additional dependencies
-#
-# org.jboss.soa.esb.actions.converters.XStreamToObject
-# org.jboss.soa.esb.actions.routing.JMSRouter
-# org.jboss.soa.esb.actions.Aggregator
-# org.jboss.soa.esb.actions.converters.ByteArrayToString
-# org.jboss.soa.esb.actions.routing.EchoRouter
-# org.jboss.soa.esb.actions.naming.FileNameGeneratorAction
-# org.jboss.soa.esb.actions.routing.HttpRouter
-# org.jboss.soa.esb.actions.converters.ObjectInvoke
-# org.jboss.soa.esb.actions.converters.ObjectToCSVString
-# org.jboss.soa.esb.actions.converters.ObjectToXStream
-# org.jboss.soa.esb.actions.StaticWiretap
-# org.jboss.soa.esb.actions.StaticRouter
-# org.jboss.soa.esb.actions.StoreMessageToFile
-# org.jboss.soa.esb.actions.templating.StringTemplateProcessor
-# org.jboss.soa.esb.actions.SystemPrintln
-# org.jboss.soa.esb.actions.Notifier
-# org.jboss.soa.esb.listeners.message.BeanConfigActionProcessor
-# org.jboss.soa.esb.actions.scripting.GroovyActionProcessor
-#
-# The following actions are included in jbossesb.esb and require
-# no additional dependencies
-#
-# org.jboss.soa.esb.actions.MessagePersister
-# org.jboss.soa.esb.actions.MessageRedeliverer
-# org.jboss.soa.esb.monitoring.client.DataCollectorAction
-# org.jboss.soa.esb.monitoring.client.InvokerAction
-# org.jboss.soa.esb.monitoring.client.OperationsCollectorAction
-
-# jbrules.esb actions
-org.jboss.soa.esb.actions.ContentBasedWiretap=jbrules.esb
-org.jboss.soa.esb.actions.ContentBasedRouter=jbrules.esb
-org.jboss.soa.esb.actions.BusinessRulesProcessor=jbrules.esb
-org.jboss.soa.esb.actions.MessageFilter=jbrules.esb
-
-# soap.esb actions
-org.jboss.soa.esb.actions.soap.SOAPClient=soap.esb
-org.jboss.soa.esb.actions.soap.SOAPProcessor=soap.esb
-
-# jbpm.esb actions
-org.jboss.soa.esb.services.jbpm.actions.BpmProcessor=jbpm.esb
-org.jboss.soa.esb.services.jbpm.actions.CommandInterpreter=jbpm.esb
-
-# smooks.esb actions
-org.jboss.soa.esb.actions.converters.SmooksTransformer=smooks.esb
-org.jboss.soa.esb.actions.smooks.SmooksAction=smooks.esb
-org.jboss.soa.esb.smooks.SmooksAction=smooks.esb
-
-# management.esb actions
-org.jboss.soa.esb.monitoring.server.DataFilerAction=management.esb
-org.jboss.soa.esb.monitoring.server.FilerAction=management.esb

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/actionArtifactMap.properties (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/actionArtifactMap.properties)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/actionArtifactMap.properties	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/actionArtifactMap.properties	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,54 @@
+#
+# The following actions are included in jbossesb.sar and require
+# no additional dependencies
+#
+# org.jboss.soa.esb.actions.converters.XStreamToObject
+# org.jboss.soa.esb.actions.routing.JMSRouter
+# org.jboss.soa.esb.actions.Aggregator
+# org.jboss.soa.esb.actions.converters.ByteArrayToString
+# org.jboss.soa.esb.actions.routing.EchoRouter
+# org.jboss.soa.esb.actions.naming.FileNameGeneratorAction
+# org.jboss.soa.esb.actions.routing.HttpRouter
+# org.jboss.soa.esb.actions.converters.ObjectInvoke
+# org.jboss.soa.esb.actions.converters.ObjectToCSVString
+# org.jboss.soa.esb.actions.converters.ObjectToXStream
+# org.jboss.soa.esb.actions.StaticWiretap
+# org.jboss.soa.esb.actions.StaticRouter
+# org.jboss.soa.esb.actions.StoreMessageToFile
+# org.jboss.soa.esb.actions.templating.StringTemplateProcessor
+# org.jboss.soa.esb.actions.SystemPrintln
+# org.jboss.soa.esb.actions.Notifier
+# org.jboss.soa.esb.listeners.message.BeanConfigActionProcessor
+# org.jboss.soa.esb.actions.scripting.GroovyActionProcessor
+#
+# The following actions are included in jbossesb.esb and require
+# no additional dependencies
+#
+# org.jboss.soa.esb.actions.MessagePersister
+# org.jboss.soa.esb.actions.MessageRedeliverer
+# org.jboss.soa.esb.monitoring.client.DataCollectorAction
+# org.jboss.soa.esb.monitoring.client.InvokerAction
+# org.jboss.soa.esb.monitoring.client.OperationsCollectorAction
+
+# jbrules.esb actions
+org.jboss.soa.esb.actions.ContentBasedWiretap=jbrules.esb
+org.jboss.soa.esb.actions.ContentBasedRouter=jbrules.esb
+org.jboss.soa.esb.actions.BusinessRulesProcessor=jbrules.esb
+org.jboss.soa.esb.actions.MessageFilter=jbrules.esb
+
+# soap.esb actions
+org.jboss.soa.esb.actions.soap.SOAPClient=soap.esb
+org.jboss.soa.esb.actions.soap.SOAPProcessor=soap.esb
+
+# jbpm.esb actions
+org.jboss.soa.esb.services.jbpm.actions.BpmProcessor=jbpm.esb
+org.jboss.soa.esb.services.jbpm.actions.CommandInterpreter=jbpm.esb
+
+# smooks.esb actions
+org.jboss.soa.esb.actions.converters.SmooksTransformer=smooks.esb
+org.jboss.soa.esb.actions.smooks.SmooksAction=smooks.esb
+org.jboss.soa.esb.smooks.SmooksAction=smooks.esb
+
+# management.esb actions
+org.jboss.soa.esb.monitoring.server.DataFilerAction=management.esb
+org.jboss.soa.esb.monitoring.server.FilerAction=management.esb

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives)

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/esb-archive.esb
===================================================================
(Binary files differ)

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/esb-archive.esb (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/esb-archive.esb)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb)

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF)

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/deployment.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/deployment.xml	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/deployment.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,5 +0,0 @@
-<jbossesb-deployment>
-  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_esb</depends>
-  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_gw</depends>
-  <esb-depends>test2.war</esb-depends>
-</jbossesb-deployment>

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/deployment.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/deployment.xml)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/deployment.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/deployment.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,5 @@
+<jbossesb-deployment>
+  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_esb</depends>
+  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_gw</depends>
+  <esb-depends>test2.war</esb-depends>
+</jbossesb-deployment>

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/jboss-esb.xml	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/jboss-esb.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,50 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
-
-    <providers>
-          <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
-              <jms-bus busid="quickstartGwChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/quickstart_helloworld_Request_gw"
-                   />
-              </jms-bus>
-              <jms-bus busid="quickstartEsbChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/quickstart_helloworld_Request_esb"
-                  />
-              </jms-bus>
-
-          </jms-provider>
-      </providers>
-
-      <services>
-        <service
-            category="FirstServiceESB"
-            name="SimpleListener"
-            description="Hello World">
-            <listeners>
-                <jms-listener name="JMS-Gateway"
-                    busidref="quickstartGwChannel"
-                    is-gateway="true"
-                />
-                <jms-listener name="helloWorld"
-                              busidref="quickstartEsbChannel"
-                />
-            </listeners>
-            <actions mep="OneWay" webservice="true" inXsd="/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/request.xsd">
-                   <action name="action1"
-                    class="org.jboss.soa.esb.samples.quickstart.helloworld.MyJMSListenerAction"
-                    process="displayMessage"
-                    />
-                    <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln">
-                      <property name="printfull" value="false"/>
-                    </action>
-                    <!-- The next action is for Continuous Integration testing -->
-                    <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
-            </actions>
-        </service>
-      </services>
-
-</jbossesb>

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/jboss-esb.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/jboss-esb.xml)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/jboss-esb.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/META-INF/jboss-esb.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,50 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
+
+    <providers>
+          <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
+              <jms-bus busid="quickstartGwChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/quickstart_helloworld_Request_gw"
+                   />
+              </jms-bus>
+              <jms-bus busid="quickstartEsbChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/quickstart_helloworld_Request_esb"
+                  />
+              </jms-bus>
+
+          </jms-provider>
+      </providers>
+
+      <services>
+        <service
+            category="FirstServiceESB"
+            name="SimpleListener"
+            description="Hello World">
+            <listeners>
+                <jms-listener name="JMS-Gateway"
+                    busidref="quickstartGwChannel"
+                    is-gateway="true"
+                />
+                <jms-listener name="helloWorld"
+                              busidref="quickstartEsbChannel"
+                />
+            </listeners>
+            <actions mep="OneWay" webservice="true" inXsd="/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/request.xsd">
+                   <action name="action1"
+                    class="org.jboss.soa.esb.samples.quickstart.helloworld.MyJMSListenerAction"
+                    process="displayMessage"
+                    />
+                    <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln">
+                      <property name="printfull" value="false"/>
+                    </action>
+                    <!-- The next action is for Continuous Integration testing -->
+                    <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
+            </actions>
+        </service>
+      </services>
+
+</jbossesb>

Deleted: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/request.xsd
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/request.xsd	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/request.xsd	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,8 +0,0 @@
-<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-  <xs:element name="sayHi" type="x1:sayHi"/>
-  <xs:complexType name="sayHi">
-    <xs:sequence>
-      <xs:element name="arg0" type="xs:string" minOccurs="1"/>
-    </xs:sequence>
-  </xs:complexType>
-</xs:schema>

Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/request.xsd (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/request.xsd)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/request.xsd	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/test_esb_archives/exploded-esb-archive.esb/request.xsd	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,8 @@
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi"  xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+  <xs:element name="sayHi" type="x1:sayHi"/>
+  <xs:complexType name="sayHi">
+    <xs:sequence>
+      <xs:element name="arg0" type="xs:string" minOccurs="1"/>
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>

Added: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/util/VfsUtilUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/util/VfsUtilUnitTest.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/deployers/mc/util/VfsUtilUnitTest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,200 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ * LLC, and individual contributors by the @authors tag. See the copyright.txt
+ * in the distribution for a full listing of individual contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.listeners.deployers.mc.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.List;
+
+import org.jboss.virtual.MemoryFileFactory;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Unit test for {@link VfsUtil}.
+ * <p/>
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ */
+public class VfsUtilUnitTest
+{
+    @BeforeClass
+    public static void initVFS()
+    {
+        VFS.init();
+    }
+    
+    @Test
+    public void createInMemoryFs() throws IOException
+    {
+        final URL rootUrl = new URL("vfsmemory", "VfsUtilUnitTest", "");
+        final  VirtualFile root = VfsUtil.createInMemoryFs(rootUrl);
+        assertNotNull(root);
+        
+        final VirtualFile root2 = VfsUtil.createInMemoryFs(rootUrl);
+        assertEquals(root, root2);
+    }
+    
+    @Test
+    public void addFile() throws IOException
+    {
+        final URL rootUrl = new URL("vfsmemory", "VfsUtilUnitTest", "");
+        final VirtualFile rootFs = VfsUtil.createInMemoryFs(rootUrl);
+        
+        VfsUtil.addFile(rootUrl, "test.xml", "bajja".getBytes());
+        final VirtualFile testFile = rootFs.getChild("test.xml");
+        assertNotNull(testFile);
+    }
+    
+    @Test
+    public void createUrl() throws MalformedURLException
+    {
+        URL rootUrl = VfsUtil.createInMemUrl("vsftest");
+        assertEquals("vfsmemory://vsftest", rootUrl.toExternalForm());
+    }
+    
+    @Test
+    public void createUrlPath() throws MalformedURLException
+    {
+        URL rootUrl = VfsUtil.createInMemUrl("vsftest", "WEB-INF");
+        assertEquals("vfsmemory://vsftest/WEB-INF", rootUrl.toExternalForm());
+    }
+    
+    @Test
+    public void createUrlPathUrl() throws IOException
+    {
+        URL rootUrl = VfsUtil.createInMemUrl("vsftest");
+        URL pathUrl = VfsUtil.createInMemUrl(rootUrl, "WEB-INF/classes");
+        assertEquals("vfsmemory://vsftest/WEB-INF/classes", pathUrl.toExternalForm());
+    }
+    
+    @Test
+    public void addFilesInFromInMemFs() throws IOException, URISyntaxException
+    {
+        URL sourceUrl = VfsUtil.createInMemUrl("vsftest");
+        VfsUtil.createInMemoryFs(sourceUrl);
+        VirtualFile file1 = VfsUtil.addFile(sourceUrl, "test", "dummy".getBytes());
+        VirtualFile file2 = VfsUtil.addFile(sourceUrl, "test2", "dummy".getBytes());
+        
+        URL destUrl = VfsUtil.createInMemUrl("vsftest2");
+        VirtualFile destDir = VfsUtil.createInMemoryFs(destUrl);
+        
+        VfsUtil.addFiles(Arrays.asList(file1, file2), destUrl, null);
+        
+        assertNotNull(destDir.getChild("test"));
+        assertNotNull(destDir.getChild("test2"));
+    }
+    
+    @Test
+    public void addSchemasInFromInMemFs() throws IOException, URISyntaxException
+    {
+        URL sourceUrl = VfsUtil.createInMemUrl("vsftest");
+        VfsUtil.createInMemoryFs(sourceUrl);
+        VirtualFile file1 = VfsUtil.addFile(sourceUrl, "/rootPath/somepath/types/test.xsd", "dummy".getBytes());
+        VirtualFile file2 = VfsUtil.addFile(sourceUrl, "/rootPath/somepath/types/test2.xsd", "dummy".getBytes());
+        
+        URL destUrl = VfsUtil.createInMemUrl("vsftest2");
+        VirtualFile destDir = VfsUtil.createInMemoryFs(destUrl);
+        
+        VfsUtil.addFiles(Arrays.asList(file1, file2), destUrl, "somepath", "WEB-INF/wsdl");
+        
+        assertNotNull(destDir.getChild("WEB-INF/wsdl/types/test.xsd"));
+        assertNotNull(destDir.getChild("WEB-INF/wsdl/types/test2.xsd"));
+    }
+    
+    @Test
+    public void addFilesInFromFileFs() throws IOException, URISyntaxException
+    {
+        File workDir = null;
+        try
+        {
+            // Create a working directory in the OS tmp dir.
+            File tmpFile = File.createTempFile("test", "junit");
+            tmpFile.deleteOnExit();
+            File tmpDir = new File(tmpFile.getParent());
+            workDir = new File(tmpDir, "VfsTest");
+            workDir.mkdir();
+            
+            // Add two files to the working directory.
+            File file1 = new File(workDir, "test1.txt");
+            file1.createNewFile();
+            File file2 = new File(workDir, "test2.txt");
+            file2.createNewFile();
+            
+            // Create a new virtual root using the workDir.
+            VirtualFile root = VFS.createNewRoot(workDir.toURI());
+            List<VirtualFile> files = root.getChildren();
+            assertEquals(2, files.size());
+            
+            URL destUrl = VfsUtil.createInMemUrl("vsftest2");
+            VirtualFile destDir = VfsUtil.createInMemoryFs(destUrl);
+            
+            VfsUtil.addFiles(files, destUrl, null);
+            assertNotNull(destDir.getChild("test"));
+            assertNotNull("test1.txt", destDir.getChild("test").getPathName());
+            assertNotNull(destDir.getChild("test2"));
+            assertNotNull("test2.txt", destDir.getChild("test2").getPathName());
+        }
+        finally
+        {
+            if (workDir != null)
+            {
+                File[] listFiles = workDir.listFiles();
+                for (File file : listFiles)
+                {
+                    file.delete();
+                }
+                workDir.delete();
+            }
+        }
+    }
+    
+    @Test
+    public void subpath()
+    {
+        String actualPath = "Test.esb/types/custom-request-type.xsd";
+        String expectedPath = "/types/custom-request-type.xsd";
+        assertEquals(expectedPath, VfsUtil.subpath(actualPath, "Test.esb"));
+        assertEquals(null, VfsUtil.subpath(null, "Test.esb"));
+        assertEquals(actualPath, VfsUtil.subpath(actualPath, null));
+        assertEquals(actualPath, VfsUtil.subpath(actualPath, "dummy"));
+    }
+    
+    @Test
+    public void subpathWithSuffix()
+    {
+        String actualPath = "Test.esb/types/custom-request-type.xsd";
+        String expectedPath = "WEB-INF/wsdl/types/custom-request-type.xsd";
+        
+        assertEquals(expectedPath, VfsUtil.subpath(actualPath, "Test.esb", "WEB-INF/wsdl"));
+    }
+
+}

Modified: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetterUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetterUnitTest.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetterUnitTest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -133,7 +133,7 @@
 	@Test
 	public void setPropertiesFilterAllVendorSpecificProperties() throws JMSException
 	{
-	    final String filter = "[JMS_].*";
+	    final String filter = "^(JMS_).*";
 	    DefaultESBPropertiesSetter setter = new DefaultESBPropertiesSetter(filter);
 	    
 		final String propertyKey = "JMS_SomeVendor_Property";
@@ -149,7 +149,7 @@
 	@Test
     public void setPropertiesFilterIBMQVendorSpecificProperties() throws JMSException
     {
-        final String filter = "[JMS_IBMQ].*";
+        final String filter = "^(JMS_IBMQ_).+";
         DefaultESBPropertiesSetter setter = new DefaultESBPropertiesSetter(filter);
         
         final String propertyKey = "JMS_IBMQ_Property";

Modified: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/FileGatewayListenerUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/FileGatewayListenerUnitTest.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/FileGatewayListenerUnitTest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -90,7 +90,7 @@
             dir.delete();
         }
     }
-
+    
     public void testGateway () throws Exception
 	{
         ConfigTree tree = createTestListenerConfig();

Modified: labs/jbossesb/trunk/product/samples/quickstarts/conf/base-build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/conf/base-build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/conf/base-build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -72,13 +72,17 @@
 			message="JBossESB must be built. Please run 'ant dist' in ${product.dir}"/>
 	</target>
 
+
 <!-- ==================================================================== -->
 <!-- This section handles the discovery of the messaging platform.        -->
 <!-- ==================================================================== -->
 
-    <target name="messaging-config" depends="jbossesb-dependencies">
+    <target name="messaging-config" depends="jbossesb-dependencies-as4, jbossesb-dependencies-as5">
         <condition property="messaging.present">
-            <available file="${org.jboss.esb.server.deploy.dir}/jboss-messaging"/>
+            <or>
+                <available file="${org.jboss.esb.server.deploy.dir}/jboss-messaging"/>
+                <available file="${org.jboss.esb.server.deploy.dir}/messaging"/>
+            </or>
         </condition>
         <condition property="messaging.present">
             <available file="${org.jboss.esb.server.deploy.dir}/jboss-messaging.sar"/>
@@ -126,10 +130,26 @@
 <!-- org.jboss.esb.server.server and deployment-classpath                 -->
 <!-- ==================================================================== -->
 
+	<target name="check-as-version">
+		<property name="org.jboss.esb.server.server" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"/>
+		<echo message="${org.jboss.esb.server.server}"/>
+		<!-- Check for JBossAS5 -->
+		<condition property="jbossas5">
+			<available file="${org.jboss.esb.server.server}/deployers"/>
+		</condition>
+	    
+		<!-- Check for JBossAS4.x -->
+		<condition property="jbossas4">
+			<not>
+				<available file="${org.jboss.esb.server.server}/deployers"/>
+			</not>
+		</condition>
+	</target>
+
 	<!-- Configure dependencies for jbossesb and source distributions -->
-	<target name="jbossesb-dependencies" depends="check-jbossesb-dist, qslib-dependencies, non-qslib-dependencies, jbossesb-source-dependencies, jbossesb-server-dependencies">
+	<target name="jbossesb-dependencies-as4" if="jbossas4" depends="check-jbossesb-dist, qslib-dependencies, non-qslib-dependencies, jbossesb-source-dependencies, jbossesb-server-dependencies, check-as-version">
 		<property name="org.jboss.esb.server.server" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"/>
-                <property name="org.jboss.esb.server.deploy.dir" location="${org.jboss.esb.server.server}/deploy"/>
+		<property name="org.jboss.esb.server.deploy.dir" location="${org.jboss.esb.server.server}/deploy"/>
 
 		<path id="deployment-classpath">
 			<fileset dir="${org.jboss.esb.server.deploy.dir}/jbossesb.sar/lib" includes="*.jar"/>
@@ -177,6 +197,73 @@
 		</path>
 	</target>
 
+	<!-- Configure dependencies for jbossesb and source distributions -->
+    <target name="jbossesb-dependencies-as5" if="jbossas5" depends="check-jbossesb-dist, qslib-dependencies, non-qslib-dependencies, jbossesb-source-dependencies, jbossesb-server-dependencies, check-as-version">
+
+        <property name="org.jboss.esb.server.server" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"/>
+		<property name="org.jboss.esb.server.deploy.dir" location="${org.jboss.esb.server.server}/deploy"/>
+		<property name="org.jboss.esb.server.common.lib" location="${org.jboss.esb.server.home}/common/lib"/>
+
+        <path id="deployment-classpath">
+            <fileset dir="${org.jboss.esb.server.server}/deployers/esb.deployer/lib" includes="*.jar"/>
+            <!-- jbossesb.esb jars -->
+            <fileset dir="${org.jboss.esb.server.deploy.dir}/jbossesb.esb" includes="*.jar"/>
+            <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.esb"/>
+            
+            <!-- jbpm.esb jars -->
+            <fileset dir="${org.jboss.esb.server.deploy.dir}/jbpm.esb" includes="*.jar"/>
+            <pathelement location="${org.jboss.esb.server.deploy.dir}/jbpm.esb"/>
+
+            <pathelement location="${org.jboss.esb.server.home}/lib/dom4j.jar"/>
+            <pathelement location="${org.jboss.esb.server.common.lib}/antlr.jar"/>
+            
+            <!-- smooks.esb jars -->
+            <fileset dir="${org.jboss.esb.server.deploy.dir}/smooks.esb" includes="*.jar"/>
+            <pathelement location="${org.jboss.esb.server.deploy.dir}/smooks.esb"/>
+            
+            <!-- jbrules.esb jars -->
+            <fileset dir="${org.jboss.esb.server.deploy.dir}/jbrules.esb" includes="*.jar"/>
+            <pathelement location="${org.jboss.esb.server.deploy.dir}/jbrules.esb"/>
+            
+            <!-- spring.esb jars -->
+            <fileset dir="${org.jboss.esb.server.deploy.dir}/spring.esb" includes="*.jar"/>
+            <pathelement location="${org.jboss.esb.server.deploy.dir}/spring.esb"/>
+            
+            <!-- soap.esb config -->
+            <fileset dir="${org.jboss.esb.server.deploy.dir}/soap.esb" includes="*.jar"/>
+            <pathelement location="${org.jboss.esb.server.deploy.dir}/soap.esb"/>
+
+            <fileset dir="${org.jboss.esb.server.home}/lib/endorsed" includes="activation.jar"/>
+            <fileset dir="${org.jboss.esb.server.common.lib}" includes="mail.jar, jboss-ejb3x.jar"/>
+
+            <!-- general libs -->
+            <pathelement location="${org.jboss.esb.server.common.lib}/commons-logging.jar"/>
+            <pathelement location="${org.jboss.esb.server.common.lib}/quartz.jar"/>
+
+            <pathelement location="${org.jboss.esb.server.home}/lib/jboss-system.jar"/>
+            <pathelement location="${org.jboss.esb.server.home}/lib/jboss-xml-binding.jar"/>
+
+			<!-- includes for read only cache -->
+            <fileset dir="${org.jboss.esb.server.server}/lib" includes="jbosscache-*.jar"/>
+            
+			<!-- includes for h2 -->
+            <fileset dir="${org.jboss.esb.server.server}/lib" includes="h2*.jar"/>
+
+            <fileset dir="${org.jboss.esb.server.home}/lib/endorsed" includes="xalan.jar"/>
+
+            <!-- common client jars -->
+            <fileset dir="${org.jboss.esb.server.home}/client" includes="jaxb-api.jar jaxb-impl.jar jaxb-xjc.jar"/>
+            <!-- fileset dir="${org.jboss.esb.server.home}/client" includes="jaxws-rt.jar jaxws-tools.jar"/-->
+            <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossall-client.jar"/>
+
+            <!-- common lib jars -->
+            <fileset dir="${org.jboss.esb.server.common.lib}" includes="commons-httpclient.jar"/>
+            <fileset dir="${org.jboss.esb.server.common.lib}" includes="jboss-jaxws.jar jboss-saaj.jar jbossws-common.jar jbossws-spi.jar"/>
+            <fileset dir="${org.jboss.esb.server.common.lib}" includes="jbossws-common.jar jbossws-framework.jar jbossws-native-jaxrpc.jar jbossws-native-saaj.jar jbossws-spi.jar"/>
+        </path>
+    </target>
+
+
 	<target name="jbossesb-quickstart-override">
 		<condition 
 			property="org.jboss.esb.server.config" 
@@ -267,7 +354,7 @@
 <!-- compile-classpath, exec-classpath                                    -->
 <!-- ==================================================================== -->
 
-	<target name="dependencies" depends="classpath-dependencies, quickstart-specific-checks">
+	<target name="dependencies" depends="classpath-dependencies-as4, classpath-dependencies-as5, quickstart-specific-checks">
 	
 		<!-- jBPM Console properties -->
 		<condition property="jbpm.production.properties.set" value="true" else="false">
@@ -301,7 +388,7 @@
 		<!-- End jBPM Console properties -->
 	</target>
 
-	<target name="classpath-dependencies" depends="messaging-dependencies, jbossmq-dependencies, quickstart-specific-dependencies">
+	<target name="classpath-dependencies-as4" if="jbossas4" depends="messaging-dependencies, jbossmq-dependencies, quickstart-specific-dependencies">
     	
 		<path id="compile-classpath">
 			<path refid="quickstart-dependencies-classpath" />
@@ -327,7 +414,36 @@
 		</path>
 		<property name="exec-classpath" refid="exec-classpath"/>
 	</target>
+	
+	<target name="classpath-dependencies-as5" if="jbossas5" depends="messaging-dependencies, jbossmq-dependencies, quickstart-specific-dependencies">
+        
+        <path id="compile-classpath">
+            <path refid="quickstart-dependencies-classpath" />
+            <path refid="quickstart-lib-classpath" />
+            <fileset dir="${org.jboss.esb.server.home}/common/lib" includes="hibernate-*.jar" /> <!-- Required for jbpm Client Code. -->
+            <fileset dir="${org.jboss.esb.server.home}/common/lib" includes="quartz.jar"/> <!-- Required for the helloworld_hibernate_action quickstart -->
+            <pathelement location="${org.jboss.esb.server.common.lib}/commons-httpclient.jar"/>
+            <path refid="deployment-classpath" />
+            <fileset dir="${org.jboss.esb.server.home}/client" excludes="jbossws-native-jaxws.jar jbossws-native-jaxws-ext.jar jaxws-rt.jar jaxws-tools.jar" /> 
+        </path>
+        <property name="compile-classpath" refid="compile-classpath"/>
 
+        <path id="exec-classpath">
+            <pathelement location="." />
+            <pathelement location="${classes}" />
+            <pathelement location="${basedir}/src" />
+            <fileset dir="${org.jboss.esb.server.home}/common/lib" includes="jboss-remoting.jar jboss-javaee.jar jboss-messaging-client.jar" /> <!-- Required for JMS Client Code. -->
+            <fileset dir="${org.jboss.esb.server.home}/client" includes="jboss-messaging-client.jar" /> <!-- Required for JMS Client Code. -->
+            <fileset dir="${org.jboss.esb.server.home}/common/lib" includes="hibernate-*.jar commons-collections.jar hsqldb.jar" /> <!-- Required for jbpm Client Code. -->
+            <fileset dir="${org.jboss.esb.server.home}/common/lib" includes="bsh.jar" /> <!-- Required for scripting Client Code. -->
+            <fileset dir="${org.jboss.esb.server.home}/lib/endorsed" includes="*.jar" /> <!-- Required for JMS Client Code. -->
+            <fileset dir="${org.jboss.esb.server.home}/lib" includes="jboss-aop.jar" /> <!-- Required for JMS Client Code. -->
+            <path refid="compile-classpath" />
+            <pathelement location="${pwd}/anttasks/classes" />
+        </path>
+        <property name="exec-classpath" refid="exec-classpath"/>
+    </target>
+    
 <!-- ==================================================================== -->
 <!-- This section defines the following public targets.                   -->
 <!-- compile, run, deploy jar, prepare-deployment, package-deployment,    -->
@@ -337,7 +453,11 @@
 
     <target name="compile" depends="dependencies">
 		<mkdir dir="${classes}" />
-		<javac srcdir="${basedir}/src" destdir="${classes}" debug="true" deprecation="true">
+		<condition property="src.dir" value="${quickstart.src.dir}" else="${basedir}/src">
+            <isset property="quickstart.src.dir"/>
+		</condition>
+		
+		<javac srcdir="${src.dir}" destdir="${classes}" debug="true" deprecation="true">
 			<classpath refid="compile-classpath" />			
 		</javac>
 
@@ -377,6 +497,8 @@
         <copy todir="${build.dir}/META-INF">
             <fileset dir="${basedir}" includes="jboss-esb.xml" />
             <fileset dir="${basedir}" includes="deployment.xml" />
+            <fileset dir="${basedir}" includes="jboss-classloading.xml" />
+            <fileset dir="${basedir}" includes="jboss-structure.xml" />
         </copy>
     </target>
 
@@ -513,17 +635,34 @@
 <!-- supports JBossWS or EJB.                                             -->
 <!-- ==================================================================== -->
 
-    <target name="assert-ws-available" depends="jbossesb-dependencies">
+    <target name="assert-ws-available" depends="jbossesb-dependencies-as4, jbossesb-dependencies-as5">
         <available property="ws-spi" file="${org.jboss.esb.server.server}/lib/jbossws-spi.jar"/>
     	<available property="ws-intros" file="${org.jboss.esb.server.deploy.dir}/jbossws.sar/jboss-jaxb-intros.jar"/>
-    	
-    	<condition property="ws-available">
+    	<condition property="ws-available-as4">
     		<and>
     			<isset property="ws-spi"/>
     			<isset property="ws-intros"/>
     		</and>
     	</condition>
     	
+        <available property="ws-spi-as5" file="${org.jboss.esb.server.home}/common/lib/jbossws-spi.jar"/>
+    	<available property="ws-intros-as5" file="${org.jboss.esb.server.server}/deployers/jbossws.deployer/jboss-jaxb-intros.jar"/>
+    	
+    	<condition property="ws-available-as5">
+    		<and>
+    			<isset property="ws-spi-as5"/>
+    			<isset property="ws-intros-as5"/>
+    		</and>
+    	</condition>
+    	
+    	<condition property="ws-available">
+    		<or>
+    			<isset property="ws-available-as4"/>
+    			<isset property="ws-available-as5"/>
+    		</or>
+    	</condition>
+    	
+    	
         <fail unless="ws-available">**** DEPLOYMENT FAILED... Sorry, this Quickstart requires a modified JBoss Webservice container, please refer to the 'Configuring Webservice Integration' section of the Administration Guide.</fail>
 
         <echo message="JBoss Webservice container found on target '${org.jboss.esb.server.deploy.dir}'." />
@@ -547,7 +686,7 @@
         <fail unless="quickstart.ftp.config" message="Please configure ftp properties in quickstart.properties"/>
     </target>
 
-    <target name="assert-jbossremoting-version" depends="classpath-dependencies">
+    <target name="assert-jbossremoting-version" depends="classpath-dependencies-as4, classpath-dependencies-as5">
         <java fork="yes" classname="org.jboss.remoting.Version" failonerror="true" outputproperty="jbr-version-string">
             <classpath refid="exec-classpath"/>
         </java>
@@ -561,10 +700,16 @@
                 </not>
             </and>
         </condition>
+        
+        <condition property="is-valid-jbr-version">
+            <and>
+                <contains string="${jbr-version-string}" substring="2.5" />
+            </and>
+        </condition>
         <fail unless="is-valid-jbr-version" message="Invalid version of JBossRemoting installed on target server.  Please install version 2.2.2.SP2 or higher: http://repository.jboss.org/jboss/remoting/" />
     </target>
 
-    <target name="assert-jgroups" depends="jbossesb-dependencies">
+    <target name="assert-jgroups" depends="jbossesb-dependencies-as4, jbossesb-dependencies-as5">
         <available property="jgroups-available" file="${org.jboss.esb.server.server}/lib/jgroups.jar"/>
         <fail unless="jgroups-available" message="Unfortunately this aspect requires jgroups in order to function correctly.  Please target a server instance which contains jgroups.jar"/>
     </target>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jboss-esb.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jboss-esb.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -39,7 +39,7 @@
                    	process="displayMessage" 
                    	/>      
                     <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln">
-                      <property name="printfull" value="true"/>
+                      <property name="printfull" value="false"/>
                     </action>
                     <!-- The next action is for Continuous Integration testing -->
                     <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -80,12 +80,12 @@
 		</copy>
 	</target>
 	
-	<target name="deploy-database" depends="jbossesb-dependencies">
+	<target name="deploy-database" depends="jbossesb-dependencies-as4, jbossesb-dependencies-as5">
 		<copy tofile="${org.jboss.esb.server.deploy.dir}/${ant.project.name}-service.xml"
 			file="db-service.xml"/>
 	</target>
 
-	<target name="undeploy-database" depends="jbossesb-dependencies">
+	<target name="undeploy-database" depends="jbossesb-dependencies-as4, jbossesb-dependencies-as5">
 		<delete file="${org.jboss.esb.server.deploy.dir}/${ant.project.name}-service.xml"
 			quiet="true"/>
 	</target>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/db-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/db-service.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_ftp_action/db-service.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -6,5 +6,6 @@
      <attribute name="BindAddress">localhost</attribute> 
      <attribute name="Database">HelloworldFTPDB</attribute>
      <attribute name="ServerMode">true</attribute>
+	 <attribute name="DataDir">${jboss.server.data.dir}</attribute>
    </mbean>
 </server>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_hibernate_action/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_hibernate_action/jbm-queue-service.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_hibernate_action/jbm-queue-service.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -5,9 +5,6 @@
     xmbean-dd="xmdesc/Queue-xmbean.xml">
 	<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
 	<depends>jboss.messaging:service=PostOffice</depends>
-	<!-- redelivery attempt delay in millis -->
-    <attribute name="RedeliveryDelay">1000</attribute>
-    <attribute name="MaxDeliveryAttempts">15</attribute>
   </mbean>
 
 </server>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_hibernate_action/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_hibernate_action/jbmq-queue-service.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_hibernate_action/jbmq-queue-service.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -4,7 +4,5 @@
     name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_hibernate_action_Request_esb">
     <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
 	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
-	<!-- redelivery attempt delay in millis -->
-    <attribute name="RedeliveryDelay">1000</attribute>
   </mbean>
 </server>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -12,27 +12,34 @@
 
 	<target name="quickstart-specific-assemblies" description="Quickstart specific assemblies">
 	</target>
-  
-	<target name="runtest" depends="dependencies" description="Insert row data into sql table polled by gateway">
-                <property name="hsqldb.jar"
-                        value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>	
-				<echo>Insert row data into sql table polled by gateway</echo>
-                <sql
-                        driver="org.hsqldb.jdbcDriver"
-						url="jdbc:hsqldb:hsql://localhost:1704"
-                        userid="sa"	
-						autocommit="true"
-						password="">
-                        <classpath>
+
+	<target name="db.lib.dir">
+		<condition property="hsqldb.lib.dir" value="${org.jboss.esb.server.home}/common/lib" else="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib">	
+			<and>
+				<isset property="jbossas5"/>
+			</and>
+		</condition>
+	</target>
+
+	<target name="runtest" depends="dependencies, db.lib.dir" description="Insert row data into sql table polled by gateway">
+		<property name="hsqldb.jar" location="${hsqldb.lib.dir}/hsqldb.jar"/>	
+		<echo message="${hsqldb.jar}"/>
+		<echo>Insert row data into sql table polled by gateway</echo>
+		<sql
+			driver="org.hsqldb.jdbcDriver"
+			url="jdbc:hsqldb:hsql://localhost:1704"
+			userid="sa"	
+			autocommit="true"
+			password="">
+			<classpath>
 				<pathelement path="${hsqldb.jar}"/>
-                        </classpath>
+			</classpath>
 			<transaction src="populate.sql"/>
-			</sql>
+		</sql>
 	</target>  
 
-	<target name="select" depends="dependencies" description="select * from gateway_table">
-		<property name="hsqldb.jar" 
-			value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
+	<target name="select" depends="dependencies, db.lib.dir" description="select * from gateway_table">
+		<property name="hsqldb.jar" value="${hsqldb.lib.dir}/hsqldb.jar"/>	
 		<echo>Select * from gateway_table</echo>
 		<sql	
 			print="true"

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbm-queue-service.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbm-queue-service.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -5,9 +5,6 @@
     xmbean-dd="xmdesc/Queue-xmbean.xml">
 	<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
 	<depends>jboss.messaging:service=PostOffice</depends>
-	<!-- redelivery attempt delay in millis -->
-    <attribute name="RedeliveryDelay">1000</attribute>
-    <attribute name="MaxDeliveryAttempts">15</attribute>
   </mbean>
 
 </server>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbmq-queue-service.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_sql_action/jbmq-queue-service.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -4,7 +4,5 @@
     name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_sql_action_Request_esb">
     <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
 	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
-	<!-- redelivery attempt delay in millis -->
-    <attribute name="RedeliveryDelay">1000</attribute>
   </mbean>
 </server>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_topic_notifier/jboss-esb-unfiltered.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_topic_notifier/jboss-esb-unfiltered.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_topic_notifier/jboss-esb-unfiltered.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -33,7 +33,7 @@
                               busidref="quickstartEsbChannel"
 						/>
 		</listeners>
-	    <actions>
+	    <actions mep="OneWay">
 				<action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier">    
 					<property name="okMethod" value="notifyOK" />
 					<property name="notification-details"> 

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_tx_sql_action/quickstart-ds.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_tx_sql_action/quickstart-ds.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_tx_sql_action/quickstart-ds.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -19,5 +19,6 @@
         <attribute name="ServerMode">true</attribute>
         <attribute name="Port">9095</attribute>
         <attribute name="InMemoryMode">false</attribute>
+		<attribute name="DataDir">${jboss.server.data.dir}</attribute>
    </mbean>
 </datasources>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/jms_transacted/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jms_transacted/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/jms_transacted/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -22,9 +22,16 @@
 		<antcall target="truncate"/>
 	</target>  
 
-	 <target name="select">
-        <property name="hsqldb.jar"
-            value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
+	<target name="db.lib.dir">
+        <condition property="db.lib.dir" value="${org.jboss.esb.server.home}/common/lib" else="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib">
+            <and>
+                <isset property="jbossas5"/>
+            </and>
+        </condition>
+    </target>
+
+	 <target name="select" depends="dependencies, db.lib.dir">
+        <property name="hsqldb.jar" value="${db.lib.dir}/hsqldb.jar"/>
         <echo>Select * from jms_transacted_table</echo>
         <sql
             print="true"
@@ -43,9 +50,8 @@
 
     </target>
 
-	<target name="truncate">
-        <property name="hsqldb.jar"
-            value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
+	<target name="truncate" depends="dependencies, db.lib.dir">
+        <property name="hsqldb.jar" value="${db.lib.dir}/hsqldb.jar"/>
         <echo>(clean up) Delete from jms_transacted_table </echo>
         <sql
             print="true"

Modified: labs/jbossesb/trunk/product/samples/quickstarts/load_generator/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/load_generator/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/load_generator/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -12,7 +12,7 @@
 		<delete dir="load_generator_classes"/>
 	</target>
 
-	<target name="init-groovy" depends="dependencies">
+	<target name="init-groovy-as4" depends="dependencies" if="jbossas4">
 		<path id="groovy.classpath">
 			<pathelement path="build/classes"/>
 			<fileset dir="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deploy">
@@ -28,7 +28,23 @@
 		<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovy.classpath" />
 	</target>
 
-	<target name="compile-churn" depends="compile, init-groovy" description="compile groovy to bytecode">
+	<target name="init-groovy-as5" depends="dependencies" if="jbossas5">
+        <path id="groovy.classpath">
+            <pathelement path="build/classes"/>
+            <fileset dir="${org.jboss.esb.server.home}/lib">
+                <include name="*.jar"/>
+            </fileset>
+            <fileset dir="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deployers/esb.deployer/lib" includes="*.jar" />
+            <fileset dir="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deploy/jbossesb.sar/lib" includes="*.jar" />
+            <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossall-client.jar" />
+            <fileset dir="${org.jboss.esb.server.home}/lib/endorsed" includes="xercesImpl.jar" />
+        </path>
+
+        <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovy.classpath" />
+    </target>
+
+
+	<target name="compile-churn" depends="compile, init-groovy-as4, init-groovy-as5" description="compile groovy to bytecode">
 		<mkdir dir="load_generator_classes" />
 		<copy todir="load_generator_classes" overwrite="true">
 			<fileset dir="${basedir}/scripts/">

Modified: labs/jbossesb/trunk/product/samples/quickstarts/messagefilter/readme.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/messagefilter/readme.txt	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/messagefilter/readme.txt	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,7 +1,7 @@
 Overview:
 =========
   The purpose of the messagefilter quickstart sample is to show how to filter
-  a messag based on content. Here we pass in an Order object and the FilterRules
+  a message based on content. Here we pass in an Order object and the FilterRules
   parse this object to looks for the quantity. If the quantity does not meet
   the threshold of 10, then the message is filter out. On the console you should
   see:

Copied: labs/jbossesb/trunk/product/samples/quickstarts/native_client/war/resources/WEB-INF/jboss-web.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/native_client/war/resources/WEB-INF/jboss-web.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/native_client/war/resources/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/native_client/war/resources/WEB-INF/jboss-web.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-web>
+	<context-root>/Quickstart_native_client</context-root>
+</jboss-web>
+

Modified: labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice/jboss-esb.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,5 +1,5 @@
 <?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd" parameterReloadSecs="5">
 
     <providers>
           <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">

Copied: labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice/lib/commons-httpclient-3.0.1.jar (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/publish_as_webservice/lib/commons-httpclient-3.0.1.jar)
===================================================================
(Binary files differ)

Modified: labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice_inonly/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice_inonly/jboss-esb.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice_inonly/jboss-esb.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -17,7 +17,7 @@
       <services>
         <service 
         	category="ESBServiceSample" 
-        	name="HelloWorldPubService" 
+        	name="HelloWorldPubServiceInOnly" 
         	description="Hello world ESB Service">
             <listeners>
                 <jms-listener name="helloWorld"

Copied: labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice_inonly/lib/commons-httpclient-3.0.1.jar (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/publish_as_webservice_inonly/lib/commons-httpclient-3.0.1.jar)
===================================================================
(Binary files differ)

Modified: labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice_inonly/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SOAPTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice_inonly/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SOAPTest.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/publish_as_webservice_inonly/src/org/jboss/soa/esb/samples/quickstart/publishAsWebservice/test/SOAPTest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -36,7 +36,7 @@
 		final String soap = StreamUtils.getResourceAsString(args[0], "UTF-8");
 		HttpClient client = new HttpClient();
 		PostMethod postMethod = new PostMethod(
-				"http://127.0.0.1:8080/Quickstart_publish_as_webservice_inonly/ESBServiceSample/HelloWorldPubService?wsdl");
+				"http://127.0.0.1:8080/Quickstart_publish_as_webservice_inonly/ESBServiceSample/HelloWorldPubServiceInOnly?wsdl");
 
 		StringRequestEntity requestEntity = new StringRequestEntity(soap);
 		postMethod.setRequestEntity(requestEntity);

Copied: labs/jbossesb/trunk/product/samples/quickstarts/scripting_chain/jboss-structure.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/scripting_chain/jboss-structure.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/scripting_chain/jboss-structure.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/scripting_chain/jboss-structure.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,13 @@
+<structure>
+    <context>
+        <path name=""/>
+        <metaDataPath>
+            <path name="META-INF"/>
+            <path name=""/>
+        </metaDataPath>
+        <classpath>
+            <path name="" />
+            <path name="" suffixes=".jar"/>
+        </classpath>
+    </context>
+</structure>

Copied: labs/jbossesb/trunk/product/samples/quickstarts/spring_aop/jboss-structure.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/spring_aop/jboss-structure.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/spring_aop/jboss-structure.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/spring_aop/jboss-structure.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,13 @@
+<structure>
+    <context>
+        <path name=""/>
+        <metaDataPath>
+            <path name="META-INF"/>
+            <path name=""/>
+        </metaDataPath>
+        <classpath>
+            <path name="" />
+            <path name="" suffixes=".jar"/>
+        </classpath>
+    </context>
+</structure>

Copied: labs/jbossesb/trunk/product/samples/quickstarts/spring_aop/lib (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/spring_aop/lib)

Modified: labs/jbossesb/trunk/product/samples/quickstarts/spring_jpetstore/readme.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/spring_jpetstore/readme.txt	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/spring_jpetstore/readme.txt	2009-06-24 07:07:46 UTC (rev 27106)
@@ -32,10 +32,10 @@
   
 To Run '.esb' archive mode:
 ===========================
-  1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
-  2. Open another command terminal window in this folder ("Window2").
-  3. In "Window1", change directory to the "hsqldb" directory and run the 
+  1. Open another command terminal window in this folder ("Window2").
+  2. In "Window1", change directory to the "hsqldb" directory and run the 
      server.sh/server.bat script.
+  3. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
   4. In "Window2", type 'ant runtest'.
   5. Switch back to Application Server console to see the output from the ESB
   6. Interrupt the database ("Window1") using Ctrl-C.

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer1/war/resources/WEB-INF/jboss-web.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_consumer1/war/resources/WEB-INF/jboss-web.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer1/war/resources/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer1/war/resources/WEB-INF/jboss-web.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-web>
+	<context-root>/Quickstart_webservice_consumer1</context-root>
+</jboss-web>
+

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer2/war/resources/WEB-INF/jboss-web.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_consumer2/war/resources/WEB-INF/jboss-web.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer2/war/resources/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer2/war/resources/WEB-INF/jboss-web.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-web>
+	<context-root>/Quickstart_webservice_consumer2</context-root>
+</jboss-web>
+

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise/listener.log
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise/listener.log	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise/listener.log	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1 @@
+2009-04-22 13:24:03,286 DEBUG [main][org.jnp.interfaces.TimedSocketFactory] createSocket, hostAddr: localhost/127.0.0.1, port: 1099, localAddr: null, localPort: 0, timeout: 0

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise/war/resources/WEB-INF/jboss-web.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_consumer_wise/war/resources/WEB-INF/jboss-web.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise/war/resources/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise/war/resources/WEB-INF/jboss-web.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-web>
+	<context-root>/Quickstart_webservice_consumer_wise</context-root>
+</jboss-web>
+

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise2/listener.log
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise2/listener.log	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise2/listener.log	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1 @@
+2009-04-22 13:26:04,976 DEBUG [main][org.jnp.interfaces.TimedSocketFactory] createSocket, hostAddr: localhost/127.0.0.1, port: 1099, localAddr: null, localPort: 0, timeout: 0

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise2/war/resources/WEB-INF/jboss-web.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_consumer_wise2/war/resources/WEB-INF/jboss-web.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise2/war/resources/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise2/war/resources/WEB-INF/jboss-web.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-web>
+	<context-root>/Quickstart_webservice_consumer_wise2</context-root>
+</jboss-web>
+

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise3/listener.log
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise3/listener.log	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise3/listener.log	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1 @@
+2009-04-22 13:28:02,910 DEBUG [main][org.jnp.interfaces.TimedSocketFactory] createSocket, hostAddr: localhost/127.0.0.1, port: 1099, localAddr: null, localPort: 0, timeout: 0

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise3/war/resources/WEB-INF/jboss-web.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_consumer_wise3/war/resources/WEB-INF/jboss-web.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise3/war/resources/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise3/war/resources/WEB-INF/jboss-web.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-web>
+	<context-root>/Quickstart_webservice_consumer_wise3</context-root>
+</jboss-web>
+

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise4/listener.log
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise4/listener.log	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise4/listener.log	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1 @@
+2009-04-22 13:29:09,178 DEBUG [main][org.jnp.interfaces.TimedSocketFactory] createSocket, hostAddr: localhost/127.0.0.1, port: 1099, localAddr: null, localPort: 0, timeout: 0

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise4/war/resources/WEB-INF/jboss-web.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_consumer_wise4/war/resources/WEB-INF/jboss-web.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise4/war/resources/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer_wise4/war/resources/WEB-INF/jboss-web.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-web>
+	<context-root>/Quickstart_webservice_consumer_wise4</context-root>
+</jboss-web>
+

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -8,8 +8,17 @@
 	<!-- Import the base Ant build script... -->
 	<import file="../conf/base-build.xml"/>
 
-    <target name="quickstart-specific-checks" depends="assert-ws-available,assert-jbossremoting-version"/>
+    <target name="quickstart-specific-checks" depends="assert-ws-available,assert-jbossremoting-version, check-src-dir" />
 
+	<target name="check-src-dir">
+		<condition property="quickstart.src.dir" value="src_as5" else="src">
+			<and>
+				<available classname="org.jboss.wsf.common.handler.GenericSOAPHandler" classpathref="compile-classpath"/>
+			</and>
+		</condition>
+		<echo message="Set src dir to : ${quickstart.src.dir}"/>
+	</target>
+
     <target name="quickstart-specific-dependencies">
         <path id="quickstart-dependencies-classpath">
             <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossws-client.jar,jboss-remoting.jar" />
@@ -23,6 +32,9 @@
         <!-- Build the webservice... -->
         <war warfile="build/${ant.project.name}.war"
              webxml="${basedir}/war/resources/WEB-INF/web.xml">
+			<webinf dir="${basedir}/war/resources/WEB-INF">
+                <include name="jboss-web.xml"/>
+            </webinf>
             <fileset dir="${basedir}/war/view">
                 <include name="**/*"/>
             </fileset>

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5 (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/META-INF (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/META-INF)

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/META-INF/standard-jaxws-client-config.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/META-INF/standard-jaxws-client-config.xml	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/META-INF/standard-jaxws-client-config.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- $Id: standard-jaxws-client-config.xml 3797 2007-07-04 11:33:22Z thomas.diesler at jboss.com $ -->
-
-<jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
-  xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
-  
-  <client-config>
-    <config-name>Standard Client</config-name>
-    <feature>http://org.jboss.ws/dispatch/validate</feature>
-    <property>
-      <property-name>http://org.jboss.ws/http#chunksize</property-name>
-      <property-value>2048</property-value>
-    </property>
-  </client-config>
-  
-  <client-config>
-    <config-name>HTTP 1.0 Client</config-name>
-    <feature>http://org.jboss.ws/dispatch/validate</feature>
-  </client-config>
-  
-  <client-config>
-    <config-name>Standard WSAddressing Client</config-name>
-    <post-handler-chains>
-      <javaee:handler-chain>
-        <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
-        <javaee:handler>
-          <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
-          <javaee:handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler</javaee:handler-class>
-        </javaee:handler>
-      </javaee:handler-chain>
-    </post-handler-chains>
-  </client-config>
-  
-  <client-config>
-    <config-name>Standard WSSecurity Client</config-name>
-    <post-handler-chains>
-      <javaee:handler-chain>
-        <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
-        <javaee:handler>
-          <javaee:handler-name>WSSecurityHandlerOutbound</javaee:handler-name>
-          <javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient</javaee:handler-class>
-        </javaee:handler>
-      </javaee:handler-chain>
-    </post-handler-chains>
-  </client-config>
-  
-</jaxws-config>

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/META-INF/standard-jaxws-client-config.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/META-INF/standard-jaxws-client-config.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/META-INF/standard-jaxws-client-config.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/META-INF/standard-jaxws-client-config.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: standard-jaxws-client-config.xml 3797 2007-07-04 11:33:22Z thomas.diesler at jboss.com $ -->
+
+<jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+  xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
+  
+  <client-config>
+    <config-name>Standard Client</config-name>
+    <feature>http://org.jboss.ws/dispatch/validate</feature>
+    <property>
+      <property-name>http://org.jboss.ws/http#chunksize</property-name>
+      <property-value>2048</property-value>
+    </property>
+  </client-config>
+  
+  <client-config>
+    <config-name>HTTP 1.0 Client</config-name>
+    <feature>http://org.jboss.ws/dispatch/validate</feature>
+  </client-config>
+  
+  <client-config>
+    <config-name>Standard WSAddressing Client</config-name>
+    <post-handler-chains>
+      <javaee:handler-chain>
+        <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+        <javaee:handler>
+          <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
+          <javaee:handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler</javaee:handler-class>
+        </javaee:handler>
+      </javaee:handler-chain>
+    </post-handler-chains>
+  </client-config>
+  
+  <client-config>
+    <config-name>Standard WSSecurity Client</config-name>
+    <post-handler-chains>
+      <javaee:handler-chain>
+        <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+        <javaee:handler>
+          <javaee:handler-name>WSSecurityHandlerOutbound</javaee:handler-name>
+          <javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient</javaee:handler-class>
+        </javaee:handler>
+      </javaee:handler-chain>
+    </post-handler-chains>
+  </client-config>
+  
+</jaxws-config>

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice)

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHRequest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHRequest.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHRequest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
-
-import javax.activation.DataHandler;
-import javax.xml.bind.annotation.XmlMimeType;
-import javax.xml.bind.annotation.XmlType;
-
- at XmlType(name = "dataRequest", namespace = "http://org.jboss.ws/xop/doclit")
-public class DHRequest
-{
-   private DataHandler dataHandler;
-
-   public DHRequest()
-   {
-   }
-
-   public DHRequest(DataHandler dataHandler)
-   {
-      this.dataHandler = dataHandler;
-   }
-
-   @XmlMimeType("image/x-png")
-   public DataHandler getDataHandler()
-   {
-      return dataHandler;
-   }
-
-   public void setDataHandler(DataHandler dataHandler)
-   {
-      this.dataHandler = dataHandler;
-   }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHRequest.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHRequest.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHRequest.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHRequest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
+
+import javax.activation.DataHandler;
+import javax.xml.bind.annotation.XmlMimeType;
+import javax.xml.bind.annotation.XmlType;
+
+ at XmlType(name = "dataRequest", namespace = "http://org.jboss.ws/xop/doclit")
+public class DHRequest
+{
+   private DataHandler dataHandler;
+
+   public DHRequest()
+   {
+   }
+
+   public DHRequest(DataHandler dataHandler)
+   {
+      this.dataHandler = dataHandler;
+   }
+
+   @XmlMimeType("image/x-png")
+   public DataHandler getDataHandler()
+   {
+      return dataHandler;
+   }
+
+   public void setDataHandler(DataHandler dataHandler)
+   {
+      this.dataHandler = dataHandler;
+   }
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHResponse.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHResponse.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHResponse.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,50 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
-
-import javax.activation.DataHandler;
-import javax.xml.bind.annotation.XmlMimeType;
-import javax.xml.bind.annotation.XmlType;
-
- at XmlType(name="dataResponse", namespace = "http://org.jboss.ws/xop/doclit")
-public class DHResponse {
-
-
-   private DataHandler dataHandler;
-
-
-   public DHResponse() {
-   }
-
-   public DHResponse(DataHandler dataHandler) {
-      this.dataHandler = dataHandler;
-   }
-
-   @XmlMimeType("text/plain")
-   public DataHandler getDataHandler() {
-      return dataHandler;
-   }
-
-   public void setDataHandler(DataHandler dataHandler) {
-      this.dataHandler = dataHandler;
-   }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHResponse.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHResponse.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHResponse.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/DHResponse.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,50 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
+
+import javax.activation.DataHandler;
+import javax.xml.bind.annotation.XmlMimeType;
+import javax.xml.bind.annotation.XmlType;
+
+ at XmlType(name="dataResponse", namespace = "http://org.jboss.ws/xop/doclit")
+public class DHResponse {
+
+
+   private DataHandler dataHandler;
+
+
+   public DHResponse() {
+   }
+
+   public DHResponse(DataHandler dataHandler) {
+      this.dataHandler = dataHandler;
+   }
+
+   @XmlMimeType("text/plain")
+   public DataHandler getDataHandler() {
+      return dataHandler;
+   }
+
+   public void setDataHandler(DataHandler dataHandler) {
+      this.dataHandler = dataHandler;
+   }
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageRequest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageRequest.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageRequest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,43 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
-
-import java.awt.Image;
-
-import javax.xml.bind.annotation.XmlType;
-
- at XmlType(name="imageRequest", namespace = "http://org.jboss.ws/xop/doclit")
-public class ImageRequest {
-
-   private Image data;
-
-
-   public Image getData()
-   {
-      return data;
-   }
-
-   public void setData(Image data)
-   {
-      this.data = data;
-   }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageRequest.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageRequest.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageRequest.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageRequest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
+
+import java.awt.Image;
+
+import javax.xml.bind.annotation.XmlType;
+
+ at XmlType(name="imageRequest", namespace = "http://org.jboss.ws/xop/doclit")
+public class ImageRequest {
+
+   private Image data;
+
+
+   public Image getData()
+   {
+      return data;
+   }
+
+   public void setData(Image data)
+   {
+      this.data = data;
+   }
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageResponse.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageResponse.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageResponse.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,52 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
-
-import java.awt.Image;
-
-import javax.xml.bind.annotation.XmlType;
-
- at XmlType(name="imageResponse", namespace = "http://org.jboss.ws/xop/doclit")
-public class ImageResponse {
-
-   private Image data;
-
-
-   public ImageResponse()
-   {
-   }
-
-   public ImageResponse(Image data)
-   {
-      this.data = data;
-   }
-
-   public Image getData()
-   {
-      return data;
-   }
-
-   public void setData(Image data)
-   {
-      this.data = data;
-   }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageResponse.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageResponse.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageResponse.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/ImageResponse.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
+
+import java.awt.Image;
+
+import javax.xml.bind.annotation.XmlType;
+
+ at XmlType(name="imageResponse", namespace = "http://org.jboss.ws/xop/doclit")
+public class ImageResponse {
+
+   private Image data;
+
+
+   public ImageResponse()
+   {
+   }
+
+   public ImageResponse(Image data)
+   {
+      this.data = data;
+   }
+
+   public Image getData()
+   {
+      return data;
+   }
+
+   public void setData(Image data)
+   {
+      this.data = data;
+   }
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpoint.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpoint.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpoint.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
-
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.xml.ws.BindingType;
-
- at WebService(targetNamespace = "http://org.jboss.ws/xop/doclit")
- at SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE)
- at BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
-public interface MTOMEndpoint
-{
-   public ImageResponse echoImage(ImageRequest request);
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpoint.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpoint.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpoint.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpoint.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.BindingType;
+
+ at WebService(targetNamespace = "http://org.jboss.ws/xop/doclit")
+ at SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE)
+ at BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
+public interface MTOMEndpoint
+{
+   public ImageResponse echoImage(ImageRequest request);
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpointBean.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpointBean.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpointBean.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
-
-import org.apache.log4j.Logger;
-
-import java.io.IOException;
-import java.awt.*;
-
-import javax.activation.DataHandler;
-import javax.jws.WebService;
-import javax.xml.ws.WebServiceException;
-
- at WebService(name = "MTOMEndpoint", serviceName = "MTOMService", endpointInterface = "org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.MTOMEndpoint")
-public class MTOMEndpointBean implements MTOMEndpoint {
-
-    public ImageResponse echoImage(ImageRequest request) {
-        Image image = request.getData();
-        System.out.println("*** Received Image: " + image);
-        //System.out.println("*** Image attached to ESB Message: " + image);
-        
-        return new ImageResponse(image);
-    }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpointBean.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpointBean.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpointBean.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMEndpointBean.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
+
+import org.apache.log4j.Logger;
+
+import java.io.IOException;
+import java.awt.*;
+
+import javax.activation.DataHandler;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceException;
+
+ at WebService(name = "MTOMEndpoint", serviceName = "MTOMService", endpointInterface = "org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.MTOMEndpoint")
+public class MTOMEndpointBean implements MTOMEndpoint {
+
+    public ImageResponse echoImage(ImageRequest request) {
+        Image image = request.getData();
+        System.out.println("*** Received Image: " + image);
+        //System.out.println("*** Image attached to ESB Message: " + image);
+        
+        return new ImageResponse(image);
+    }
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMProtocolHandler.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMProtocolHandler.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMProtocolHandler.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,96 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.common.handler.GenericSOAPHandler;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import javax.xml.soap.SOAPBody;
-import javax.xml.soap.SOAPEnvelope;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.soap.SOAPMessageContext;
-
-/**
- * A MTOM handler should see the conceptual payload,
- * which means an inlined representation of the binary data.
- * It checks existence of the xop:Include element.
- */
-public class MTOMProtocolHandler extends GenericSOAPHandler
-{
-   private Logger log = Logger.getLogger(MTOMProtocolHandler.class);
-
-   protected boolean handleOutbound(MessageContext msgContext)
-   {
-      return verifyXOPPackage(msgContext);
-   }
-
-   protected boolean handleInbound(MessageContext msgContext)
-   {
-      return verifyXOPPackage(msgContext);
-   }
-
-   private boolean verifyXOPPackage(MessageContext context)
-   {
-      try
-      {
-         SOAPMessageContext msgContext = (SOAPMessageContext)context;
-         SOAPMessage soapMsg = msgContext.getMessage();
-         SOAPEnvelope soapEnv = soapMsg.getSOAPPart().getEnvelope();
-         SOAPBody body = soapEnv.getBody();
-         boolean found = scanNodes(body.getChildNodes());
-
-         if(found) throw new IllegalStateException("XOP request not properly inlined");
-                  
-      }
-      catch (SOAPException ex)
-      {
-         throw new WebServiceException(ex);
-      }
-
-      return true;
-   }
-
-   private boolean scanNodes(NodeList nodes)
-   {
-      boolean found = false;
-      for(int i = 0; i<nodes.getLength(); i++)
-      {
-         Node n = nodes.item(i);
-         if("Include".equals(n.getLocalName()))
-         {
-            found = true;
-            break;
-         }
-         else
-         {
-            found = scanNodes(n.getChildNodes());
-         }
-      }
-
-      return found;
-   }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMProtocolHandler.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMProtocolHandler.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMProtocolHandler.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/MTOMProtocolHandler.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+/**
+ * A MTOM handler should see the conceptual payload,
+ * which means an inlined representation of the binary data.
+ * It checks existence of the xop:Include element.
+ */
+public class MTOMProtocolHandler extends GenericSOAPHandler
+{
+   private Logger log = Logger.getLogger(MTOMProtocolHandler.class);
+
+   protected boolean handleOutbound(MessageContext msgContext)
+   {
+      return verifyXOPPackage(msgContext);
+   }
+
+   protected boolean handleInbound(MessageContext msgContext)
+   {
+      return verifyXOPPackage(msgContext);
+   }
+
+   private boolean verifyXOPPackage(MessageContext context)
+   {
+      try
+      {
+         SOAPMessageContext msgContext = (SOAPMessageContext)context;
+         SOAPMessage soapMsg = msgContext.getMessage();
+         SOAPEnvelope soapEnv = soapMsg.getSOAPPart().getEnvelope();
+         SOAPBody body = soapEnv.getBody();
+         boolean found = scanNodes(body.getChildNodes());
+
+         if(found) throw new IllegalStateException("XOP request not properly inlined");
+                  
+      }
+      catch (SOAPException ex)
+      {
+         throw new WebServiceException(ex);
+      }
+
+      return true;
+   }
+
+   private boolean scanNodes(NodeList nodes)
+   {
+      boolean found = false;
+      for(int i = 0; i<nodes.getLength(); i++)
+      {
+         Node n = nodes.item(i);
+         if("Include".equals(n.getLocalName()))
+         {
+            found = true;
+            break;
+         }
+         else
+         {
+            found = scanNodes(n.getChildNodes());
+         }
+      }
+
+      return found;
+   }
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceRequest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceRequest.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceRequest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
-
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.transform.Source;
-
- at XmlType(name="sourceRequest", namespace = "http://org.jboss.ws/xop/doclit")
-public class SourceRequest {
-
-   Source data;
-
-   public Source getData()
-   {
-      return data;
-   }
-
-   public void setData(Source data)
-   {
-      this.data = data;
-   }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceRequest.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceRequest.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceRequest.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceRequest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.transform.Source;
+
+ at XmlType(name="sourceRequest", namespace = "http://org.jboss.ws/xop/doclit")
+public class SourceRequest {
+
+   Source data;
+
+   public Source getData()
+   {
+      return data;
+   }
+
+   public void setData(Source data)
+   {
+      this.data = data;
+   }
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceResponse.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceResponse.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceResponse.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,50 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
-
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.transform.Source;
-
- at XmlType(name="sourceResponse", namespace = "http://org.jboss.ws/xop/doclit")
-public class SourceResponse {
-
-   private Source data;
-
-   public SourceResponse()
-   {
-   }
-
-   public SourceResponse(Source data)
-   {
-      this.data = data;
-   }
-
-   public Source getData()
-   {
-      return data;
-   }
-
-   public void setData(Source data)
-   {
-      this.data = data;
-   }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceResponse.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceResponse.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceResponse.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/SourceResponse.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,50 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.transform.Source;
+
+ at XmlType(name="sourceResponse", namespace = "http://org.jboss.ws/xop/doclit")
+public class SourceResponse {
+
+   private Source data;
+
+   public SourceResponse()
+   {
+   }
+
+   public SourceResponse(Source data)
+   {
+      this.data = data;
+   }
+
+   public Source getData()
+   {
+      return data;
+   }
+
+   public void setData(Source data)
+   {
+      this.data = data;
+   }
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/XOPSupport.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/XOPSupport.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/XOPSupport.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,103 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
-
-import java.awt.Image;
-import java.awt.Toolkit;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.activation.DataHandler;
-import javax.xml.transform.stream.StreamSource;
-
-/**
- * @author Heiko Braun <heiko.braun at jboss.com>
- * @since 22-Sep-2006
- */
-public class XOPSupport {
-
-   public static byte[] getBytesFromFile(File file) throws IOException
-   {
-      InputStream is = new FileInputStream(file);
-
-      long length = file.length();
-      byte[] bytes = new byte[(int)length];
-
-      int offset = 0;
-      int numRead = 0;
-      while (offset < bytes.length && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)
-      {
-         offset += numRead;
-      }
-
-      is.close();
-      return bytes;
-   }
-
-   public static Image createTestImage(File imgFile)
-   {
-      Image image = null;
-      try
-      {
-         URL url = imgFile.toURL();
-
-         image = null;
-         try
-         {
-            image = Toolkit.getDefaultToolkit().createImage(url);
-         }
-         catch (Throwable th)
-         {
-            //log.warn("Cannot create Image: " + th);
-         }
-      }
-      catch (MalformedURLException e)
-      {
-         throw new RuntimeException(e);
-      }
-
-      return image;
-   }
-
-   public static StreamSource createTestSource()
-   {
-      return new StreamSource(new ByteArrayInputStream("<some><nestedXml/></some>".getBytes()));
-   }
-
-   public static DataHandler createDataHandler(File imgFile)
-   {
-      try
-      {
-         URL url = imgFile.toURL();
-         return new DataHandler(url);
-      }
-      catch (MalformedURLException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/XOPSupport.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/XOPSupport.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/XOPSupport.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/XOPSupport.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice;
+
+import java.awt.Image;
+import java.awt.Toolkit;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.activation.DataHandler;
+import javax.xml.transform.stream.StreamSource;
+
+/**
+ * @author Heiko Braun <heiko.braun at jboss.com>
+ * @since 22-Sep-2006
+ */
+public class XOPSupport {
+
+   public static byte[] getBytesFromFile(File file) throws IOException
+   {
+      InputStream is = new FileInputStream(file);
+
+      long length = file.length();
+      byte[] bytes = new byte[(int)length];
+
+      int offset = 0;
+      int numRead = 0;
+      while (offset < bytes.length && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)
+      {
+         offset += numRead;
+      }
+
+      is.close();
+      return bytes;
+   }
+
+   public static Image createTestImage(File imgFile)
+   {
+      Image image = null;
+      try
+      {
+         URL url = imgFile.toURL();
+
+         image = null;
+         try
+         {
+            image = Toolkit.getDefaultToolkit().createImage(url);
+         }
+         catch (Throwable th)
+         {
+            //log.warn("Cannot create Image: " + th);
+         }
+      }
+      catch (MalformedURLException e)
+      {
+         throw new RuntimeException(e);
+      }
+
+      return image;
+   }
+
+   public static StreamSource createTestSource()
+   {
+      return new StreamSource(new ByteArrayInputStream("<some><nestedXml/></some>".getBytes()));
+   }
+
+   public static DataHandler createDataHandler(File imgFile)
+   {
+      try
+      {
+         URL url = imgFile.toURL();
+         return new DataHandler(url);
+      }
+      catch (MalformedURLException e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client)

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/MTOMClient.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/MTOMClient.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/MTOMClient.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,103 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.client;
-
-import org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.*;
-import org.jboss.internal.soa.esb.util.StreamUtils;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.SOAPBinding;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.util.List;
-import java.util.ArrayList;
-import java.awt.*;
-import java.awt.image.BufferedImage;
-
-import sun.awt.image.ToolkitImage;
-
-/**
- * MTOM Client.
- * <p/>
- * The basis of this code was lifted from JBossWS test code.  Thanks guys :-)
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class MTOMClient {
-    
-    public static void main(String[] args) throws MalformedURLException {
-        MTOMEndpoint mtomEndpoint;
-
-        // Get the client endpoint port...
-        mtomEndpoint = getEndpointPort();
-
-        // Create the Image request and send it to the MTOM endpoint...
-        byte[] imageBytes = StreamUtils.readStream(MTOMClient.class.getResourceAsStream("jboss.png"));
-        Image img = Toolkit.getDefaultToolkit().createImage(imageBytes);
-        if (img == null) {
-            throw new IllegalStateException("Failed to load the 'jboss.gif' image from the classpath!");
-        }
-        ImageRequest request = new ImageRequest();
-        request.setData(img);
-        ImageResponse response = mtomEndpoint.echoImage(request);
-
-        // Check the response...
-        assertImagesEqual(request, response);
-    }
-
-    private static MTOMEndpoint getEndpointPort() throws MalformedURLException {
-        MTOMEndpoint mtomEndpoint;
-        QName serviceName = new QName("http://webservice.webservicemtom.quickstart.samples.esb.soa.jboss.org/", "MTOMService");
-        URL wsdlURL = new URL("http://localhost:8080/contract/contract.jsp?serviceCat=MyServiceCategory&serviceName=MyMTOMService&protocol=http");
-        //URL wsdlURL = new URL("http://127.0.0.1:8080/Quickstart_webservice_mtom/MTOMService?wsdl");
-
-        Service service = Service.create(wsdlURL, serviceName);
-        mtomEndpoint = service.getPort(MTOMEndpoint.class);
-
-        // enable MTOM
-        SOAPBinding binding = (SOAPBinding)((BindingProvider)mtomEndpoint).getBinding();
-        binding.setMTOMEnabled(true);
-
-        List<Handler> handlerChain = new ArrayList<Handler>();
-        handlerChain.addAll(binding.getHandlerChain());
-        handlerChain.add(new MTOMProtocolHandler());
-        binding.setHandlerChain(handlerChain);
-        return mtomEndpoint;
-    }
-
-    private static void assertImagesEqual(ImageRequest request, ImageResponse response) {
-        ToolkitImage reqImage = (ToolkitImage) request.getData();
-        BufferedImage resImage = (BufferedImage) response.getData();
-
-        assertEquals("Image heights don't match.", reqImage.getHeight(), resImage.getHeight());
-        assertEquals("Image widths don't match.", reqImage.getWidth(), resImage.getWidth());
-
-        System.out.println("Successfully sent image data (binary) to MTOM Service endpoint, which echoed it back!");
-    }
-
-    private static void assertEquals(String failureMessage, Object obj1, Object obj2) {
-        if(!obj1.equals(obj2)) {
-            throw new RuntimeException(failureMessage + "  Expected '" + obj1 + "', actual '" + obj2 + "'.");
-        }
-    }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/MTOMClient.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/MTOMClient.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/MTOMClient.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/MTOMClient.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.client;
+
+import org.jboss.soa.esb.samples.quickstart.webservicemtom.webservice.*;
+import org.jboss.internal.soa.esb.util.StreamUtils;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.soap.SOAPBinding;
+import java.net.URL;
+import java.net.MalformedURLException;
+import java.util.List;
+import java.util.ArrayList;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+
+import sun.awt.image.ToolkitImage;
+
+/**
+ * MTOM Client.
+ * <p/>
+ * The basis of this code was lifted from JBossWS test code.  Thanks guys :-)
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class MTOMClient {
+    
+    public static void main(String[] args) throws MalformedURLException {
+        MTOMEndpoint mtomEndpoint;
+
+        // Get the client endpoint port...
+        mtomEndpoint = getEndpointPort();
+
+        // Create the Image request and send it to the MTOM endpoint...
+        byte[] imageBytes = StreamUtils.readStream(MTOMClient.class.getResourceAsStream("jboss.png"));
+        Image img = Toolkit.getDefaultToolkit().createImage(imageBytes);
+        if (img == null) {
+            throw new IllegalStateException("Failed to load the 'jboss.gif' image from the classpath!");
+        }
+        ImageRequest request = new ImageRequest();
+        request.setData(img);
+        ImageResponse response = mtomEndpoint.echoImage(request);
+
+        // Check the response...
+        assertImagesEqual(request, response);
+    }
+
+    private static MTOMEndpoint getEndpointPort() throws MalformedURLException {
+        MTOMEndpoint mtomEndpoint;
+        QName serviceName = new QName("http://webservice.webservicemtom.quickstart.samples.esb.soa.jboss.org/", "MTOMService");
+        URL wsdlURL = new URL("http://localhost:8080/contract/contract.jsp?serviceCat=MyServiceCategory&serviceName=MyMTOMService&protocol=http");
+        //URL wsdlURL = new URL("http://127.0.0.1:8080/Quickstart_webservice_mtom/MTOMService?wsdl");
+
+        Service service = Service.create(wsdlURL, serviceName);
+        mtomEndpoint = service.getPort(MTOMEndpoint.class);
+
+        // enable MTOM
+        SOAPBinding binding = (SOAPBinding)((BindingProvider)mtomEndpoint).getBinding();
+        binding.setMTOMEnabled(true);
+
+        List<Handler> handlerChain = new ArrayList<Handler>();
+        handlerChain.addAll(binding.getHandlerChain());
+        handlerChain.add(new MTOMProtocolHandler());
+        binding.setHandlerChain(handlerChain);
+        return mtomEndpoint;
+    }
+
+    private static void assertImagesEqual(ImageRequest request, ImageResponse response) {
+        ToolkitImage reqImage = (ToolkitImage) request.getData();
+        BufferedImage resImage = (BufferedImage) response.getData();
+
+        assertEquals("Image heights don't match.", reqImage.getHeight(), resImage.getHeight());
+        assertEquals("Image widths don't match.", reqImage.getWidth(), resImage.getWidth());
+
+        System.out.println("Successfully sent image data (binary) to MTOM Service endpoint, which echoed it back!");
+    }
+
+    private static void assertEquals(String failureMessage, Object obj1, Object obj2) {
+        if(!obj1.equals(obj2)) {
+            throw new RuntimeException(failureMessage + "  Expected '" + obj1 + "', actual '" + obj2 + "'.");
+        }
+    }
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/jboss.png
===================================================================
(Binary files differ)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/jboss.png (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/src_as5/org/jboss/soa/esb/samples/quickstart/webservicemtom/webservice/client/jboss.png)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/war/resources/WEB-INF/jboss-web.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_mtom/war/resources/WEB-INF/jboss-web.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/war/resources/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_mtom/war/resources/WEB-INF/jboss-web.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-web>
+	<context-root>/Quickstart_webservice_mtom</context-root>
+</jboss-web>
+

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -8,8 +8,17 @@
 	<!-- Import the base Ant build script... -->
 	<import file="../conf/base-build.xml"/>
 
-    <target name="quickstart-specific-checks" depends="assert-ws-available,assert-jbossremoting-version"/>
+    <target name="quickstart-specific-checks" depends="assert-ws-available,assert-jbossremoting-version, check-src-dir"/>
 
+	<target name="check-src-dir">
+        <condition property="quickstart.src.dir" value="src_as5" else="src">
+            <and>
+                <available classname="org.jboss.wsf.common.handler.GenericSOAPHandler" classpathref="compile-classpath"/>
+            </and>
+        </condition>
+        <echo message="Set src dir to : ${quickstart.src.dir}"/>
+    </target>
+
     <target name="quickstart-specific-dependencies">
         <path id="quickstart-dependencies-classpath">
             <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossws-client.jar,jboss-remoting.jar" />
@@ -23,6 +32,9 @@
         <!-- Build the webservice... -->
         <war warfile="build/${ant.project.name}.war"
              webxml="${basedir}/war/resources/WEB-INF/web.xml">
+			<webinf dir="${basedir}/war/resources/WEB-INF">
+                <include name="jboss-web.xml"/>
+            </webinf>
             <fileset dir="${basedir}/war/view">
                 <include name="**/*"/>
             </fileset>

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5 (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart)

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa)

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/ServerHandler.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/ServerHandler.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/ServerHandler.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,112 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.samples.quickstart.webservicewsa;
-
-import java.net.URISyntaxException;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPElement;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.EndpointReference;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.addressing.ReferenceParameters;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.MessageContext.Scope;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.xml.DOMUtils;
-import org.jboss.wsf.common.handler.GenericSOAPHandler;
-
-/**
- * A server side handler for the ws-addressing
- *
- * @author Thomas.Diesler at jboss.org
- * @since 24-Nov-2005
- */
-public class ServerHandler extends GenericSOAPHandler
-{
-   // Provide logging
-   private static Logger log = Logger.getLogger(ServerHandler.class);
-
-   private static final QName IDQN = StatefulEndpointImpl.IDQN;
-
-   @Override
-   public boolean handleInbound(MessageContext msgContext)
-   {
-      log.info("handleRequest");
-
-      AddressingProperties addrProps = (AddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
-      if (addrProps == null)
-         throw new IllegalStateException("Cannot obtain AddressingProperties");
-
-      String clientid = null;
-      EndpointReference replyTo = addrProps.getReplyTo();
-      ReferenceParameters refParams = replyTo!=null ? replyTo.getReferenceParameters() : null;
-      if (refParams != null)
-      {
-         for (Object obj : refParams.getElements())
-         {
-            SOAPElement el = (SOAPElement)obj;
-            QName qname = DOMUtils.getElementQName(el);
-            if (qname.equals(IDQN))
-            {
-               clientid = DOMUtils.getTextContent(el);
-            }
-         }
-      }
-
-      if (clientid == null)
-         throw new IllegalStateException("Cannot obtain client id");
-
-      // put the clientid in the message context
-      msgContext.put("clientid", clientid);
-      msgContext.setScope("clientid", Scope.APPLICATION);
-      return true;
-   }
-
-   @Override
-   public boolean handleOutbound(MessageContext msgContext)
-   {
-      log.info("handleResponse");
-
-      try
-      {
-         AddressingProperties inProps = (AddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
-         AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-
-         builder.newAddressingConstants();
-         AddressingProperties outProps = builder.newAddressingProperties();
-         outProps.initializeAsReply(inProps, false);
-         outProps.setAction(builder.newURI("http://org.jboss.ws/addressing/stateful/actionReply"));
-
-         msgContext.put(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
-         msgContext.setScope(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND, Scope.APPLICATION);
-      }
-      catch (URISyntaxException ex)
-      {
-         throw new IllegalStateException("Cannot handle response", ex);
-      }
-
-      return true;
-   }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/ServerHandler.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/ServerHandler.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/ServerHandler.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/ServerHandler.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.samples.quickstart.webservicewsa;
+
+import java.net.URISyntaxException;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.EndpointReference;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.addressing.ReferenceParameters;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.MessageContext.Scope;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.xml.DOMUtils;
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+
+/**
+ * A server side handler for the ws-addressing
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 24-Nov-2005
+ */
+public class ServerHandler extends GenericSOAPHandler
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(ServerHandler.class);
+
+   private static final QName IDQN = StatefulEndpointImpl.IDQN;
+
+   @Override
+   public boolean handleInbound(MessageContext msgContext)
+   {
+      log.info("handleRequest");
+
+      AddressingProperties addrProps = (AddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+      if (addrProps == null)
+         throw new IllegalStateException("Cannot obtain AddressingProperties");
+
+      String clientid = null;
+      EndpointReference replyTo = addrProps.getReplyTo();
+      ReferenceParameters refParams = replyTo!=null ? replyTo.getReferenceParameters() : null;
+      if (refParams != null)
+      {
+         for (Object obj : refParams.getElements())
+         {
+            SOAPElement el = (SOAPElement)obj;
+            QName qname = DOMUtils.getElementQName(el);
+            if (qname.equals(IDQN))
+            {
+               clientid = DOMUtils.getTextContent(el);
+            }
+         }
+      }
+
+      if (clientid == null)
+         throw new IllegalStateException("Cannot obtain client id");
+
+      // put the clientid in the message context
+      msgContext.put("clientid", clientid);
+      msgContext.setScope("clientid", Scope.APPLICATION);
+      return true;
+   }
+
+   @Override
+   public boolean handleOutbound(MessageContext msgContext)
+   {
+      log.info("handleResponse");
+
+      try
+      {
+         AddressingProperties inProps = (AddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+         AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+
+         builder.newAddressingConstants();
+         AddressingProperties outProps = builder.newAddressingProperties();
+         outProps.initializeAsReply(inProps, false);
+         outProps.setAction(builder.newURI("http://org.jboss.ws/addressing/stateful/actionReply"));
+
+         msgContext.put(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
+         msgContext.setScope(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND, Scope.APPLICATION);
+      }
+      catch (URISyntaxException ex)
+      {
+         throw new IllegalStateException("Cannot handle response", ex);
+      }
+
+      return true;
+   }
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpoint.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpoint.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpoint.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.samples.quickstart.webservicewsa;
-
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-import org.jboss.ws.annotation.EndpointConfig;
-
-/**
- * WS-Addressing stateful service endpoint interface
- *
- * @author Thomas.Diesler at jboss.org
- *
- * @since 24-Nov-2005
- */
- at WebService(name = "WsaEndpoint", targetNamespace = "http://webservice.webservicewsa.quickstart.samples.esb.soa.jboss.org/", serviceName = "WsaService")
- at SOAPBinding(style = SOAPBinding.Style.RPC)
-public interface StatefulEndpoint extends Remote
-{
-   @WebMethod
-   public void addItem(String item) throws RemoteException;
-
-   @WebMethod
-   public void checkout() throws RemoteException;
-
-   @WebMethod
-   public String getItems() throws RemoteException;
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpoint.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpoint.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpoint.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpoint.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.samples.quickstart.webservicewsa;
+
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.ws.annotation.EndpointConfig;
+
+/**
+ * WS-Addressing stateful service endpoint interface
+ *
+ * @author Thomas.Diesler at jboss.org
+ *
+ * @since 24-Nov-2005
+ */
+ at WebService(name = "WsaEndpoint", targetNamespace = "http://webservice.webservicewsa.quickstart.samples.esb.soa.jboss.org/", serviceName = "WsaService")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface StatefulEndpoint extends Remote
+{
+   @WebMethod
+   public void addItem(String item) throws RemoteException;
+
+   @WebMethod
+   public void checkout() throws RemoteException;
+
+   @WebMethod
+   public String getItems() throws RemoteException;
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpointImpl.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpointImpl.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpointImpl.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,112 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.samples.quickstart.webservicewsa;
-
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.annotation.Resource;
-import javax.jws.HandlerChain;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.annotation.EndpointConfig;
-
-/**
- * WS-Addressing stateful service endpoint
- *
- * @author Thomas.Diesler at jboss.org
- * @since 24-Nov-2005
- */
- at WebService(name = "WsaEndpoint", targetNamespace = "http://webservice.webservicewsa.quickstart.samples.esb.soa.jboss.org/", serviceName = "WsaService")
- at EndpointConfig(configName = "Standard WSAddressing Endpoint")
- at HandlerChain(file = "jaxws-handlers.xml")
- at SOAPBinding(style = SOAPBinding.Style.RPC)
-public class StatefulEndpointImpl implements StatefulEndpoint
-{
-   // provide logging
-   private static Logger log = Logger.getLogger(StatefulEndpointImpl.class);
-
-   public static final QName IDQN = new QName("http://somens", "clientid", "ns1");
-
-   // The state map for all clients
-   private static Map<String, List<String>> clientStateMap = new HashMap<String, List<String>>();
-
-   private String clientid;
-   private static List<String> items;
-   private WebServiceContext context;
-
-   @Resource
-   public void setContext(WebServiceContext context)
-   {
-      log.info("injecting: " + context);
-      this.context = context;
-   }
-
-   @WebMethod
-   public void addItem(String item)
-   {
-      initSessionState();
-      log.info("addItem [clientid=" + clientid + "]: " + item);
-      items.add(item);
-   }
-
-   @WebMethod
-   public void checkout()
-   {
-      initSessionState();
-      log.info("checkout [clientid=" + clientid + "]");
-      clientStateMap.remove(clientid);
-   }
-
-   @WebMethod
-   public String getItems()
-   {
-      initSessionState();
-      log.info("getItems [clientid=" + clientid + "]: " + items);
-      return items.toString();
-   }
-
-   private void initSessionState()
-   {
-      MessageContext msgContext = context.getMessageContext();
-      clientid = (String)msgContext.get("clientid");
-      if (clientid == null)
-         throw new IllegalStateException("Cannot obtain clientid");
-
-      // Get the client's items
-      items = clientStateMap.get(clientid);
-      if (items == null)
-      {
-         items = new ArrayList<String>();
-         clientStateMap.put(clientid, items);
-      }
-   }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpointImpl.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpointImpl.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpointImpl.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/StatefulEndpointImpl.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.samples.quickstart.webservicewsa;
+
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.namespace.QName;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.EndpointConfig;
+
+/**
+ * WS-Addressing stateful service endpoint
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 24-Nov-2005
+ */
+ at WebService(name = "WsaEndpoint", targetNamespace = "http://webservice.webservicewsa.quickstart.samples.esb.soa.jboss.org/", serviceName = "WsaService")
+ at EndpointConfig(configName = "Standard WSAddressing Endpoint")
+ at HandlerChain(file = "jaxws-handlers.xml")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+public class StatefulEndpointImpl implements StatefulEndpoint
+{
+   // provide logging
+   private static Logger log = Logger.getLogger(StatefulEndpointImpl.class);
+
+   public static final QName IDQN = new QName("http://somens", "clientid", "ns1");
+
+   // The state map for all clients
+   private static Map<String, List<String>> clientStateMap = new HashMap<String, List<String>>();
+
+   private String clientid;
+   private static List<String> items;
+   private WebServiceContext context;
+
+   @Resource
+   public void setContext(WebServiceContext context)
+   {
+      log.info("injecting: " + context);
+      this.context = context;
+   }
+
+   @WebMethod
+   public void addItem(String item)
+   {
+      initSessionState();
+      log.info("addItem [clientid=" + clientid + "]: " + item);
+      items.add(item);
+   }
+
+   @WebMethod
+   public void checkout()
+   {
+      initSessionState();
+      log.info("checkout [clientid=" + clientid + "]");
+      clientStateMap.remove(clientid);
+   }
+
+   @WebMethod
+   public String getItems()
+   {
+      initSessionState();
+      log.info("getItems [clientid=" + clientid + "]: " + items);
+      return items.toString();
+   }
+
+   private void initSessionState()
+   {
+      MessageContext msgContext = context.getMessageContext();
+      clientid = (String)msgContext.get("clientid");
+      if (clientid == null)
+         throw new IllegalStateException("Cannot obtain clientid");
+
+      // Get the client's items
+      items = clientStateMap.get(clientid);
+      if (items == null)
+      {
+         items = new ArrayList<String>();
+         clientStateMap.put(clientid, items);
+      }
+   }
+}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client)

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/ClientHandler.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/ClientHandler.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/ClientHandler.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,129 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.samples.quickstart.webservicewsa.client;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPHeaderElement;
-import javax.xml.ws.addressing.AddressingBuilder;
-import javax.xml.ws.addressing.AddressingConstants;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.EndpointReference;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.addressing.ReferenceParameters;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.MessageContext.Scope;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.xml.DOMUtils;
-import org.jboss.wsf.common.handler.GenericSOAPHandler;
-import org.jboss.wsf.common.utils.UUIDGenerator;
-import org.jboss.soa.esb.samples.quickstart.webservicewsa.StatefulEndpointImpl;
-
-/**
- * A client side handler for the ws-addressing
- *
- * @author Thomas.Diesler at jboss.org
- * @since 24-Nov-2005
- */
-public class ClientHandler extends GenericSOAPHandler
-{
-   // Provide logging
-   private static Logger log = Logger.getLogger(ClientHandler.class);
-
-   private static final QName IDQN = StatefulEndpointImpl.IDQN;
-
-   private static int maxClientId;
-   private String clientid;
-
-   @Override
-   public boolean handleOutbound(MessageContext msgContext)
-   {
-      try
-      {
-         AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
-         AddressingConstants ADDR = builder.newAddressingConstants();
-
-         AddressingProperties outProps = builder.newAddressingProperties();
-         outProps.setTo(builder.newURI("uri:jaxrpc-samples-wsaddressing/TestService"));
-         outProps.setAction(builder.newURI("http://org.jboss.ws/addressing/stateful/action"));
-
-         EndpointReference replyTo = builder.newEndpointReference(new URI(ADDR.getAnonymousURI()));
-         outProps.setReplyTo(replyTo);
-         outProps.setMessageID(builder.newURI("urn:uuid:"+ UUIDGenerator.generateRandomUUIDString()));
-
-         // Assign a new clientid
-         if (clientid == null)
-         {
-            clientid = "clientid-" + (++maxClientId);
-            log.info("New clientid: " + clientid);
-         }
-
-         ReferenceParameters refParams = replyTo.getReferenceParameters();
-         refParams.addElement(getClientIdElement(clientid));
-
-         msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
-         msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, Scope.APPLICATION);
-      }
-      catch (URISyntaxException ex)
-      {
-         throw new IllegalStateException("Cannot handle request", ex);
-      }
-
-      return true;
-   }
-
-   @Override
-   public boolean handleInbound(MessageContext msgContext)
-   {
-      AddressingProperties addrProps = (AddressingProperties)msgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND);
-      if (addrProps == null)
-         throw new IllegalStateException("Cannot obtain AddressingProperties");
-
-      ReferenceParameters refParams = addrProps.getReferenceParameters();
-      for (Object obj : refParams.getElements())
-      {
-         SOAPHeaderElement el = (SOAPHeaderElement)obj;
-         QName qname = DOMUtils.getElementQName(el);
-         if (qname.equals(IDQN))
-         {
-            clientid = DOMUtils.getTextContent(el);
-         }
-      }
-
-      if (clientid == null)
-         throw new IllegalStateException("Cannot obtain clientid");
-
-      return true;
-   }
-
-   private String getClientIdElement(String clientid)
-   {
-      String qualname = IDQN.getPrefix() + ":" + IDQN.getLocalPart();
-      StringBuffer buffer = new StringBuffer("<" + qualname);
-      buffer.append(" xmlns:" + IDQN.getPrefix() + "='" + IDQN.getNamespaceURI() + "'");
-      buffer.append(">" + clientid + "</" + qualname + ">");
-      return buffer.toString();
-   }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/ClientHandler.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/ClientHandler.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/ClientHandler.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/ClientHandler.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.samples.quickstart.webservicewsa.client;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPHeaderElement;
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingConstants;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.EndpointReference;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.addressing.ReferenceParameters;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.MessageContext.Scope;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.xml.DOMUtils;
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+import org.jboss.wsf.common.utils.UUIDGenerator;
+import org.jboss.soa.esb.samples.quickstart.webservicewsa.StatefulEndpointImpl;
+
+/**
+ * A client side handler for the ws-addressing
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 24-Nov-2005
+ */
+public class ClientHandler extends GenericSOAPHandler
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(ClientHandler.class);
+
+   private static final QName IDQN = StatefulEndpointImpl.IDQN;
+
+   private static int maxClientId;
+   private String clientid;
+
+   @Override
+   public boolean handleOutbound(MessageContext msgContext)
+   {
+      try
+      {
+         AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+         AddressingConstants ADDR = builder.newAddressingConstants();
+
+         AddressingProperties outProps = builder.newAddressingProperties();
+         outProps.setTo(builder.newURI("uri:jaxrpc-samples-wsaddressing/TestService"));
+         outProps.setAction(builder.newURI("http://org.jboss.ws/addressing/stateful/action"));
+
+         EndpointReference replyTo = builder.newEndpointReference(new URI(ADDR.getAnonymousURI()));
+         outProps.setReplyTo(replyTo);
+         outProps.setMessageID(builder.newURI("urn:uuid:"+ UUIDGenerator.generateRandomUUIDString()));
+
+         // Assign a new clientid
+         if (clientid == null)
+         {
+            clientid = "clientid-" + (++maxClientId);
+            log.info("New clientid: " + clientid);
+         }
+
+         ReferenceParameters refParams = replyTo.getReferenceParameters();
+         refParams.addElement(getClientIdElement(clientid));
+
+         msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
+         msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, Scope.APPLICATION);
+      }
+      catch (URISyntaxException ex)
+      {
+         throw new IllegalStateException("Cannot handle request", ex);
+      }
+
+      return true;
+   }
+
+   @Override
+   public boolean handleInbound(MessageContext msgContext)
+   {
+      AddressingProperties addrProps = (AddressingProperties)msgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND);
+      if (addrProps == null)
+         throw new IllegalStateException("Cannot obtain AddressingProperties");
+
+      ReferenceParameters refParams = addrProps.getReferenceParameters();
+      for (Object obj : refParams.getElements())
+      {
+         SOAPHeaderElement el = (SOAPHeaderElement)obj;
+         QName qname = DOMUtils.getElementQName(el);
+         if (qname.equals(IDQN))
+         {
+            clientid = DOMUtils.getTextContent(el);
+         }
+      }
+
+      if (clientid == null)
+         throw new IllegalStateException("Cannot obtain clientid");
+
+      return true;
+   }
+
+   private String getClientIdElement(String clientid)
+   {
+      String qualname = IDQN.getPrefix() + ":" + IDQN.getLocalPart();
+      StringBuffer buffer = new StringBuffer("<" + qualname);
+      buffer.append(" xmlns:" + IDQN.getPrefix() + "='" + IDQN.getNamespaceURI() + "'");
+      buffer.append(">" + clientid + "</" + qualname + ">");
+      return buffer.toString();
+   }
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/WSAClient.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/WSAClient.java	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/WSAClient.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.webservicewsa.client;
-
-import org.jboss.soa.esb.samples.quickstart.webservicewsa.StatefulEndpoint;
-import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.SOAPBinding;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-import java.rmi.RemoteException;
-
-/**
- * WSA Client.
- * <p/>
- * The basis of this code was lifted from JBossWS test code.  Thanks guys :-)
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class WSAClient {
-
-    public static void main(String[] args) throws MalformedURLException, RemoteException {
-        StatefulEndpoint endpointPort1 = getEndpointPort();
-        StatefulEndpoint endpointPort2 = getEndpointPort();
-
-        endpointPort1.addItem("Ice Cream");
-        endpointPort1.addItem("Chocolate");
-
-        endpointPort2.addItem("Water");
-        endpointPort2.addItem("Bread");
-
-        System.out.println("\nT1. endpointPort1 basket: " + endpointPort1.getItems());
-        System.out.println("T1. endpointPort2 basket: " + endpointPort2.getItems());
-
-        System.out.println("\nT2. endpointPort1 checks out...");
-        endpointPort1.checkout();
-
-        System.out.println("\nT3. endpointPort1 basket: " + endpointPort1.getItems());
-        System.out.println("T3. endpointPort2 basket: " + endpointPort2.getItems());
-
-        System.out.println("\nT4. endpointPort2 checks out...");
-        endpointPort2.checkout();
-
-        System.out.println("\nT5. endpointPort1 basket: " + endpointPort1.getItems());
-        System.out.println("T5. endpointPort2 basket: " + endpointPort2.getItems());
-    }
-
-    private static StatefulEndpoint getEndpointPort() throws MalformedURLException {
-        StatefulEndpoint endpoint;
-        QName serviceName = new QName("http://webservice.webservicewsa.quickstart.samples.esb.soa.jboss.org/", "WsaService");
-        URL wsdlURL = new URL("http://localhost:8080/contract/contract.jsp?serviceCat=MyServiceCategory&serviceName=MyWsaService&protocol=http");
-
-        Service service = Service.create(wsdlURL, serviceName);
-        endpoint = service.getPort(StatefulEndpoint.class);
-
-        SOAPBinding binding = (SOAPBinding)((BindingProvider)endpoint).getBinding();
-        List<Handler> handlerChain = new ArrayList<Handler>();
-
-        handlerChain.addAll(binding.getHandlerChain());
-        handlerChain.add(new ClientHandler());
-        handlerChain.add(new WSAddressingClientHandler());
-        binding.setHandlerChain(handlerChain);
-
-        return endpoint;
-    }
-}

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/WSAClient.java (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/WSAClient.java)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/WSAClient.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/client/WSAClient.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.webservicewsa.client;
+
+import org.jboss.soa.esb.samples.quickstart.webservicewsa.StatefulEndpoint;
+import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.soap.SOAPBinding;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.*;
+import java.rmi.RemoteException;
+
+/**
+ * WSA Client.
+ * <p/>
+ * The basis of this code was lifted from JBossWS test code.  Thanks guys :-)
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class WSAClient {
+
+    public static void main(String[] args) throws MalformedURLException, RemoteException {
+        StatefulEndpoint endpointPort1 = getEndpointPort();
+        StatefulEndpoint endpointPort2 = getEndpointPort();
+
+        endpointPort1.addItem("Ice Cream");
+        endpointPort1.addItem("Chocolate");
+
+        endpointPort2.addItem("Water");
+        endpointPort2.addItem("Bread");
+
+        System.out.println("\nT1. endpointPort1 basket: " + endpointPort1.getItems());
+        System.out.println("T1. endpointPort2 basket: " + endpointPort2.getItems());
+
+        System.out.println("\nT2. endpointPort1 checks out...");
+        endpointPort1.checkout();
+
+        System.out.println("\nT3. endpointPort1 basket: " + endpointPort1.getItems());
+        System.out.println("T3. endpointPort2 basket: " + endpointPort2.getItems());
+
+        System.out.println("\nT4. endpointPort2 checks out...");
+        endpointPort2.checkout();
+
+        System.out.println("\nT5. endpointPort1 basket: " + endpointPort1.getItems());
+        System.out.println("T5. endpointPort2 basket: " + endpointPort2.getItems());
+    }
+
+    private static StatefulEndpoint getEndpointPort() throws MalformedURLException {
+        StatefulEndpoint endpoint;
+        QName serviceName = new QName("http://webservice.webservicewsa.quickstart.samples.esb.soa.jboss.org/", "WsaService");
+        URL wsdlURL = new URL("http://localhost:8080/contract/contract.jsp?serviceCat=MyServiceCategory&serviceName=MyWsaService&protocol=http");
+
+        Service service = Service.create(wsdlURL, serviceName);
+        endpoint = service.getPort(StatefulEndpoint.class);
+
+        SOAPBinding binding = (SOAPBinding)((BindingProvider)endpoint).getBinding();
+        List<Handler> handlerChain = new ArrayList<Handler>();
+
+        handlerChain.addAll(binding.getHandlerChain());
+        handlerChain.add(new ClientHandler());
+        handlerChain.add(new WSAddressingClientHandler());
+        binding.setHandlerChain(handlerChain);
+
+        return endpoint;
+    }
+}

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/jaxws-handlers.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/jaxws-handlers.xml	2009-05-06 08:55:42 UTC (rev 26391)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/jaxws-handlers.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<handler-chains xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
-  
-  <handler-chain>
-    <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
-    <handler>
-      <handler-name>Application Server Handler</handler-name>
-      <handler-class>org.jboss.soa.esb.samples.quickstart.webservicewsa.ServerHandler</handler-class>
-    </handler>
-  </handler-chain>
-</handler-chains>
\ No newline at end of file

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/jaxws-handlers.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/jaxws-handlers.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/jaxws-handlers.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/src_as5/org/jboss/soa/esb/samples/quickstart/webservicewsa/jaxws-handlers.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+  
+  <handler-chain>
+    <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
+    <handler>
+      <handler-name>Application Server Handler</handler-name>
+      <handler-class>org.jboss.soa.esb.samples.quickstart.webservicewsa.ServerHandler</handler-class>
+    </handler>
+  </handler-chain>
+</handler-chains>
\ No newline at end of file

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/war/resources/WEB-INF/jboss-web.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wsaddressing/war/resources/WEB-INF/jboss-web.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/war/resources/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wsaddressing/war/resources/WEB-INF/jboss-web.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-web>
+	<context-root>/Quickstart_webservice_wsaddressing</context-root>
+</jboss-web>
+

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -23,6 +23,9 @@
         <!-- Build the webservice... -->
         <war warfile="build/${ant.project.name}.war"
              webxml="${basedir}/war/resources/WEB-INF/web.xml">
+			<webinf dir="${basedir}/war/resources/WEB-INF">
+                <include name="jboss-web.xml"/>
+            </webinf>
             <fileset dir="${basedir}/war/view">
                 <include name="**/*"/>
             </fileset>

Copied: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/jboss-web.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/jboss-web.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/jboss-web.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-web>
+	<context-root>/Quickstart_webservice_wssecurity</context-root>
+</jboss-web>
+

Modified: labs/jbossesb/trunk/product/services/base-project-build.xml
===================================================================
--- labs/jbossesb/trunk/product/services/base-project-build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/services/base-project-build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -34,6 +34,7 @@
 		<pathelement location="build/${ant.project.name}.esb" />
 		<pathelement location="build/classes" />
 		<pathelement location="build/test/classes" />
+        <fileset dir="${esb.main.lib}" includes="jboss-system-4.2.2.GA.jar" />
 		<fileset dir="lib/ext" includes="*.jar" />
 		<fileset dir="lib/ext/build-time" includes="*.jar" />
 		<fileset dir="${esb.product.lib.dir}" includes="*.jar" /> <!-- Product Jars. -->

Copied: labs/jbossesb/trunk/product/services/jbossesb/src/main/resources/META-INF/jboss-scanning.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/jbossesb/src/main/resources/META-INF/jboss-scanning.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/jbossesb/src/main/resources/META-INF/jboss-scanning.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/jbossesb/src/main/resources/META-INF/jboss-scanning.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,3 @@
+<scanning xmlns="urn:jboss:scanning:1.0">
+	<!-- prevent scanning for annotations -->
+</scanning>

Copied: labs/jbossesb/trunk/product/services/jbpm/src/main/resources/META-INF/jboss-scanning.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/jbpm/src/main/resources/META-INF/jboss-scanning.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/resources/META-INF/jboss-scanning.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/resources/META-INF/jboss-scanning.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,3 @@
+<scanning xmlns="urn:jboss:scanning:1.0">
+	<!-- prevent scanning for annotations -->
+</scanning>

Modified: labs/jbossesb/trunk/product/services/jbpm/src/main/resources/jbpm-ds.xml
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/resources/jbpm-ds.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/resources/jbpm-ds.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -33,5 +33,6 @@
    <mbean code="org.jboss.internal.soa.esb.dependencies.H2Database"
         name="jboss:service=h2,database=jbpmDB">
         <attribute name="Database">jbpmDB</attribute>
+		<attribute name="DataDir">${jboss.server.data.dir}</attribute>
    </mbean>
 </datasources>

Modified: labs/jbossesb/trunk/product/services/jbpm/src/main/resources/jbpm-service.xml
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/resources/jbpm-service.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/resources/jbpm-service.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,8 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <server>
-   <classpath codebase="deploy" archives="jbpm.esb"/>
-   <classpath codebase="deploy/jbossesb.sar/lib" archives="jbossesb-rosetta.jar"/>
    <mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
        name="jboss.esb:service=JBPMDatabaseInitializer">
       <attribute name="Datasource">java:/JbpmDS</attribute>

Copied: labs/jbossesb/trunk/product/services/jbrules/src/main/resources/META-INF/jboss-scanning.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/jbrules/src/main/resources/META-INF/jboss-scanning.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/jbrules/src/main/resources/META-INF/jboss-scanning.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/jbrules/src/main/resources/META-INF/jboss-scanning.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,3 @@
+<scanning xmlns="urn:jboss:scanning:1.0">
+	<!-- prevent scanning for annotations -->
+</scanning>

Copied: labs/jbossesb/trunk/product/services/jbrules/src/main/resources/META-INF/jboss-structure.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/jbrules/src/main/resources/META-INF/jboss-structure.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/jbrules/src/main/resources/META-INF/jboss-structure.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/jbrules/src/main/resources/META-INF/jboss-structure.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,12 @@
+<structure>
+    <context>
+        <path name=""/>
+        <metaDataPath>
+            <path name="META-INF"/>
+        </metaDataPath>
+        <classpath>
+            <path name=""/>
+            <path name=""  suffixes=".jar"/>
+        </classpath>
+    </context>
+</structure>

Copied: labs/jbossesb/trunk/product/services/slsb/src/main/resources/META-INF/jboss-structure.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/slsb/src/main/resources/META-INF/jboss-structure.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/slsb/src/main/resources/META-INF/jboss-structure.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/slsb/src/main/resources/META-INF/jboss-structure.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,12 @@
+<structure>
+    <context>
+        <path name=""/>
+        <metaDataPath>
+            <path name="META-INF"/>
+        </metaDataPath>
+        <classpath>
+            <path name=""/>
+            <path name=""  suffixes=".jar"/>
+        </classpath>
+    </context>
+</structure>

Copied: labs/jbossesb/trunk/product/services/smooks/src/main/resources/META-INF/jboss-scanning.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/smooks/src/main/resources/META-INF/jboss-scanning.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/smooks/src/main/resources/META-INF/jboss-scanning.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/smooks/src/main/resources/META-INF/jboss-scanning.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,3 @@
+<scanning xmlns="urn:jboss:scanning:1.0">
+	<!-- prevent scanning for annotations -->
+</scanning>

Copied: labs/jbossesb/trunk/product/services/smooks/src/main/resources/META-INF/jboss-structure.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/smooks/src/main/resources/META-INF/jboss-structure.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/smooks/src/main/resources/META-INF/jboss-structure.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/smooks/src/main/resources/META-INF/jboss-structure.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,12 @@
+<structure>
+    <context>
+        <path name=""/>
+        <metaDataPath>
+            <path name="META-INF"/>
+        </metaDataPath>
+        <classpath>
+            <path name=""/>
+            <path name=""  suffixes=".jar"/>
+        </classpath>
+    </context>
+</structure>

Copied: labs/jbossesb/trunk/product/services/soap/src/main/resources/META-INF/jboss-scanning.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/soap/src/main/resources/META-INF/jboss-scanning.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/main/resources/META-INF/jboss-scanning.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/soap/src/main/resources/META-INF/jboss-scanning.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,3 @@
+<scanning xmlns="urn:jboss:scanning:1.0">
+	<!-- prevent scanning for annotations -->
+</scanning>

Copied: labs/jbossesb/trunk/product/services/soap/src/main/resources/META-INF/jboss-structure.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/soap/src/main/resources/META-INF/jboss-structure.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/main/resources/META-INF/jboss-structure.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/soap/src/main/resources/META-INF/jboss-structure.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,12 @@
+<structure>
+    <context>
+        <path name=""/>
+        <metaDataPath>
+            <path name="META-INF"/>
+        </metaDataPath>
+        <classpath>
+            <path name=""/>
+            <path name=""  suffixes=".jar"/>
+        </classpath>
+    </context>
+</structure>

Modified: labs/jbossesb/trunk/product/services/soapui-client/build.xml
===================================================================
--- labs/jbossesb/trunk/product/services/soapui-client/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/services/soapui-client/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -16,6 +16,7 @@
 
     <path id="build.classpath">
     	<path location="${basedir}/src/test/resources"/>
+        <fileset dir="../../build/lib" includes="jboss-system-4.2.2.GA.jar" />
         <fileset dir="src/lib" includes="*.jar" />
         <fileset dir="../../lib/ext" includes="*.jar" />
         <fileset dir="../../build/lib" includes="*.jar" />
@@ -45,7 +46,7 @@
             <fileset dir="src/main/resources"/>
         </copy>
     </target>
-    <target name="jar" depends="compile,test" description="Clean the JAR">
+    <target name="jar" depends="compile" description="Clean the JAR">
         <jar jarfile="${maven.build.directory}/${maven.build.final.name}.jar" basedir="${maven.build.output}"
              excludes="**/package.html"/>
     </target>

Modified: labs/jbossesb/trunk/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java
===================================================================
--- labs/jbossesb/trunk/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientService.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -42,6 +42,8 @@
 import javax.xml.transform.dom.DOMResult;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
+import org.jboss.system.server.ServerConfigImplMBean;
+import org.jboss.mx.util.MBeanProxyExt;
 
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.log4j.Logger;
@@ -110,6 +112,8 @@
      * The additional schema resources.
      */
     private String schemas ;
+
+    private String serverDataDir;
     /**
      * The name of the SoapUI schema directory.
      */
@@ -135,8 +139,15 @@
         super.startService();
         
         if (propertyFile != null) {
-            final ServerConfig serverConfig = ServerConfigLocator.locate() ;
-            final File dataDir = serverConfig.getServerDataDir() ;
+            File dataDir;
+            if (serverDataDir != null) {
+                
+                dataDir = new File(serverDataDir);
+            }
+            else {
+                final ServerConfig serverConfig = (ServerConfig) MBeanProxyExt.create(ServerConfig.class, ServerConfigImplMBean.OBJECT_NAME);
+                dataDir = serverConfig.getServerDataDir() ;
+            }
             
             if (schemas != null)
             {
@@ -166,8 +177,15 @@
     {
         if (propertyFile != null)
         {
-            final ServerConfig serverConfig = ServerConfigLocator.locate() ;
-            final File dataDir = serverConfig.getServerDataDir() ;
+            File dataDir;
+            if (serverDataDir != null) {
+                dataDir = new File(serverDataDir);
+            }
+            else
+            {
+                final ServerConfig serverConfig = (ServerConfig) MBeanProxyExt.create(ServerConfig.class, ServerConfigImplMBean.OBJECT_NAME);
+                dataDir = serverConfig.getServerDataDir() ;
+            }
             final File schemaDir = new File(dataDir, SOAP_UI_SCHEMA_DIRECTORY) ;
             if (schemaDir.exists())
             {
@@ -758,4 +776,14 @@
             throw ioe ;
         }
     }
+    
+    public void setServerDataDir(final String datadir)
+    {
+        this.serverDataDir = datadir;
+    }
+    
+    public String getServerDataDir()
+    {
+        return serverDataDir;
+    }
 }

Modified: labs/jbossesb/trunk/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBean.java
===================================================================
--- labs/jbossesb/trunk/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBean.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/services/soapui-client/src/main/java/org/jboss/soa/esb/services/soapui/SoapUIClientServiceMBean.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -108,4 +108,8 @@
      * @see setPropertyFile
      */
     public void setSchemas(final String schemas) ;
+    
+    public String getServerDataDir() ;
+    public void setServerDataDir(String dataDir) ;
+    
 }

Copied: labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-scanning.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/soapui-client/src/main/resources/META-INF/jboss-scanning.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-scanning.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-scanning.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,3 @@
+<scanning xmlns="urn:jboss:scanning:1.0">
+	<!-- prevent scanning for annotations -->
+</scanning>

Copied: labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-service-as5.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/soapui-client/src/main/resources/META-INF/jboss-service-as5.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-service-as5.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-service-as5.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<service>
+    <classpath codebase="deploy/soapui-client.sar/lib" archives="*"/>
+    
+    <mbean code="org.jboss.soa.esb.services.soapui.SoapUIClientService" name="jboss.esb:service=SoapUIClientService">
+        <attribute name="PropertyFile">soapui-settings.xml</attribute>
+        <attribute name="Schemas">schemas/XMLSchema1999.xsd</attribute>
+        <attribute name="ServerDataDir">${jboss.server.data.dir}</attribute>
+    </mbean>
+    <loader-repository>
+        jboss.esb:loader=soapui-client.sar
+    </loader-repository>
+</service>

Modified: labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-service.xml
===================================================================
--- labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-service.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-service.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -4,6 +4,7 @@
            name="jboss.esb:service=SoapUIClientService">
         <attribute name="PropertyFile">soapui-settings.xml</attribute>
         <attribute name="Schemas">schemas/XMLSchema1999.xsd</attribute>
+        <attribute name="ServerDataDir">${jboss.server.data.dir}</attribute>
         <depends>jboss.esb:service=ESBDeployer</depends>
     </mbean>
     <loader-repository>

Copied: labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-structure.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/soapui-client/src/main/resources/META-INF/jboss-structure.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-structure.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/soapui-client/src/main/resources/META-INF/jboss-structure.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,12 @@
+<structure>
+    <context>
+        <path name=""/>
+        <metaDataPath>
+            <path name="META-INF"/>
+        </metaDataPath>
+        <classpath>
+            <path name=""/>
+            <path name=""  suffixes=".jar"/>
+        </classpath>
+    </context>
+</structure>

Copied: labs/jbossesb/trunk/product/services/spring/lib/ext/cglib-nodep-2.1_3.jar (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/spring/lib/ext/cglib-nodep-2.1_3.jar)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/trunk/product/services/spring/src/main/resources/META-INF/jboss-scanning.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/spring/src/main/resources/META-INF/jboss-scanning.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/spring/src/main/resources/META-INF/jboss-scanning.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/spring/src/main/resources/META-INF/jboss-scanning.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,3 @@
+<scanning xmlns="urn:jboss:scanning:1.0">
+	<!-- prevent scanning for annotations -->
+</scanning>

Copied: labs/jbossesb/trunk/product/services/spring/src/main/resources/META-INF/jboss-structure.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/services/spring/src/main/resources/META-INF/jboss-structure.xml)
===================================================================
--- labs/jbossesb/trunk/product/services/spring/src/main/resources/META-INF/jboss-structure.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/spring/src/main/resources/META-INF/jboss-structure.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,12 @@
+<structure>
+    <context>
+        <path name=""/>
+        <metaDataPath>
+            <path name="META-INF"/>
+        </metaDataPath>
+        <classpath>
+            <path name=""/>
+            <path name=""  suffixes=".jar"/>
+        </classpath>
+    </context>
+</structure>

Modified: labs/jbossesb/trunk/product/tools/console/management-esb/build.xml
===================================================================
--- labs/jbossesb/trunk/product/tools/console/management-esb/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/tools/console/management-esb/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -95,11 +95,27 @@
 		</copy>
 	</target>
 
+	<!-- Check for JBossAS5 -->
+    <condition property="jbossas5">
+        <available file="${server.dir}/deployers"/>
+    </condition>
+	    
+	<!-- Check for JBossAS4.x -->
+    <condition property="jbossas4">
+        <not>
+            <available file="${server.dir}/deployers"/>
+        </not>
+    </condition>
+
 	<target name="esb" depends="initialise-messaging,messaging-dependencies,jbossmq-dependencies,build-war,copy-metainf"
 		description="Build the management ESB">
 		<mkdir dir="${mgmt.esb.dir}/build"/>	
 		<mkdir dir="${mgmt.esb.dir}/build/META-INF"/>
 
+		<ant target="copy-management-servicexml-as4"/>
+		<ant target="copy-management-servicexml-as5"/>
+
+		<!--
 		<copy file="${mgmt.esb.dir}/src/main/resources/jbossesbmanagement-service.xml"
 			todir="${mgmt.esb.dir}/build"
 			overwrite="true">
@@ -110,6 +126,7 @@
 				<filter token="pollMinuteFrequency" value="${pollMinuteFrequency}"/>
 			</filterset>
 		</copy>
+		-->
 
 		<jar destfile="${mgmt.esb.dir}/build/management.esb">
 			<fileset dir="${mgmt.esb.dir}">
@@ -133,6 +150,32 @@
 		</jar>
 	</target>
 
+	<target name="copy-management-servicexml-as4" if="jbossas4">
+		<copy file="${mgmt.esb.dir}/src/main/resources/jbossesbmanagement-service.xml"
+			todir="${mgmt.esb.dir}/build"
+			overwrite="true">
+			<filterset>
+				<filter token="database.depends" value="${database.depends}"/>
+				<filter token="db.datasource" value="${db.datasource}"/>
+				<filter token="connection.datasource" value="${connection.datasource}"/>
+				<filter token="pollMinuteFrequency" value="${pollMinuteFrequency}"/>
+			</filterset>
+		</copy>
+	</target>
+
+	<target name="copy-management-servicexml-as5" if="jbossas5">
+		<copy file="${mgmt.esb.dir}/src/main/resources/jbossesbmanagement-service-as5.xml"
+			todir="${mgmt.esb.dir}/build"
+			overwrite="true">
+			<filterset>
+				<filter token="database.depends" value="${database.depends}"/>
+				<filter token="db.datasource" value="${db.datasource}"/>
+				<filter token="connection.datasource" value="${connection.datasource}"/>
+				<filter token="pollMinuteFrequency" value="${pollMinuteFrequency}"/>
+			</filterset>
+		</copy>
+	</target>
+
 	<target name="copy-datasource" if="management.ds.available" depends="initialise-config">
 		<filter token="db.username" value="${db.username}"/>
 		<filter token="db.password" value="${db.password}"/>

Copied: labs/jbossesb/trunk/product/tools/console/management-esb/src/main/resources/jbossesbmanagement-service-as5.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/product/tools/console/management-esb/src/main/resources/jbossesbmanagement-service-as5.xml)
===================================================================
--- labs/jbossesb/trunk/product/tools/console/management-esb/src/main/resources/jbossesbmanagement-service-as5.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/tools/console/management-esb/src/main/resources/jbossesbmanagement-service-as5.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+   <classpath codebase="deploy" archives="management.esb"/>
+
+   <mbean code="org.jboss.soa.esb.monitoring.server.DataFilerScheduler"
+      name="jboss.esb:service=DataFilerScheduler">
+      <attribute name="PollMinuteFrequency">@pollMinuteFrequency@</attribute>
+   </mbean>
+
+   <mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
+       name="jboss.esb:service=ManagementDatabaseInitializer">
+      <attribute name="Datasource">@connection.datasource@</attribute>
+      <attribute name="ExistsSql">select * from JMXDATA</attribute>
+      <attribute name="SqlFiles">
+      create_database.sql,
+      insert_rows.sql
+      </attribute>
+      <depends>jboss.jca:service=DataSourceBinding,name=ManagementDS</depends>
+	  @database.depends@
+	</mbean>
+</server>

Modified: labs/jbossesb/trunk/product/tools/console/management-web/web.xml
===================================================================
--- labs/jbossesb/trunk/product/tools/console/management-web/web.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/product/tools/console/management-web/web.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
+<web-app version="2.3" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
   <display-name>Archetype Created Web Application</display-name>
 </web-app>

Modified: labs/jbossesb/trunk/qa/base-cp.xml
===================================================================
--- labs/jbossesb/trunk/qa/base-cp.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/qa/base-cp.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -13,54 +13,156 @@
 	<property name="org.jboss.esb.server.server"
 		location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}" />
 	<dirname property="pwd" file="${ant.file.base-cp}" />
-	<path id="base.cp">
-		<pathelement location="${product.dir}/build/lib/jaxr-api-1.0rc1.jar" />
-		<fileset dir="${org.jboss.esb.server.server}/lib" includes="jboss-remoting.jar jboss-j2ee.jar" /> <!-- Required for JMS Client Code. -->
-		<fileset dir="${org.jboss.esb.server.home}/client" includes="jboss-messaging-client.jar" /> <!-- Required for JMS Client Code. -->
-		<fileset dir="${org.jboss.esb.server.server}/lib"
-			includes="hibernate3.jar commons-collections.jar hsqldb.jar" /> <!-- Required for jbpm Client Code. -->
-		<fileset dir="${org.jboss.esb.server.server}/lib" includes="bsh.jar" /> <!-- Required for scripting Client Code. -->
-		<fileset dir="${org.jboss.esb.server.home}/lib/endorsed"
-			includes="*.jar" /> <!-- Required for JMS Client Code. -->
-		<fileset
-			dir="${org.jboss.esb.server.server}/deploy/jboss-aop-jdk50.deployer"
-			includes="jboss-aop-jdk50.jar" /> <!-- Required for JMS Client Code. -->
-		<fileset dir="${org.jboss.esb.server.home}/client" includes="javassist.jar trove.jar" /> <!-- Required for JMS Client Code. -->
-		<fileset dir="${org.jboss.esb.server.home}/client" includes="hibernate-client.jar" /> <!-- Required for jbpm Client Code. -->
-		<fileset dir="${org.jboss.esb.server.server}/deploy/jbossesb.sar/lib"
-			includes="*.jar" />
-		<!-- jbossesb config -->
-		<fileset dir="${org.jboss.esb.server.server}/deploy/jbossesb.esb"
-			includes="*.jar" />
-		<!-- jbpm config -->
-		<fileset dir="${org.jboss.esb.server.server}/deploy/jbpm.esb"
-			includes="*.jar" />
-		<pathelement location="${org.jboss.esb.server.server}/lib/cglib.jar" />
-		<!-- smooks config -->
-		<fileset dir="${org.jboss.esb.server.server}/deploy/smooks.esb"
-			includes="*.jar" />
-		<!-- jbrules config -->
-		<fileset dir="${org.jboss.esb.server.server}/deploy/jbrules.esb"
-			includes="*.jar" />
-		<!-- spring config -->
-		<fileset dir="${org.jboss.esb.server.server}/deploy/spring.esb"
-			includes="*.jar" />
-		<!-- soap config -->
-		<fileset dir="${org.jboss.esb.server.server}/deploy/soap.esb"
-			includes="*.jar" />
-		<fileset dir="${org.jboss.esb.server.server}/lib" includes="activation.jar, mail.jar, jboss-ejb3x.jar" />
-		<!-- general libs -->
-		<pathelement location="${org.jboss.esb.server.home}/lib/commons-logging.jar" />
-		<pathelement location="${org.jboss.esb.server.home}/lib/commons-codec.jar" />
-		<pathelement location="${org.jboss.esb.server.home}/lib/jboss-system.jar" />
-		<pathelement location="${org.jboss.esb.server.home}/lib/jboss-xml-binding.jar" />
-		<pathelement location="${org.jboss.esb.server.home}/lib/commons-httpclient.jar" />
-		<pathelement location="${org.jboss.esb.server.server}/lib/log4j.jar" />
-		<fileset dir="${product.dir}/../testlib">
-			<include name="emma*.jar" />
-		</fileset>
-		<fileset dir="${qa.lib}/ext" includes="*.jar" />
-		<pathelement location="${org.jboss.esb.server.home}/client/jbossall-client.jar" />
-		<pathelement location="${pwd}" />
-	</path>
+
+	<target name="check-as-version">
+		<property name="org.jboss.esb.server.server" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"/>
+		<!-- Check for JBossAS5 -->
+		<condition property="jbossas5">
+			<available file="${org.jboss.esb.server.server}/deployers"/>
+		</condition>
+	    
+		<!-- Check for JBossAS4.x -->
+		<condition property="jbossas4">
+			<not>
+				<available file="${org.jboss.esb.server.server}/deployers"/>
+			</not>
+		</condition>
+		<echo message="Server : ${org.jboss.esb.server.server}"/>
+		<echo message="jbossas4 : ${jbossas4}"/>
+		<echo message="jbossas5 : ${jbossas5}"/>
+	</target>
+
+	<target name="init-version" depends="check-as-version, as4-path, as5-path"/>
+
+	<target name="as4-path" if="jbossas4">
+		<echo message="JBoss AS 4.x compatible build = ${jbossas4}"/>
+		<path id="base.cp">
+			<pathelement location="${product.dir}/build/lib/jaxr-api-1.0rc1.jar" />
+			<fileset dir="${org.jboss.esb.server.server}/lib" includes="jboss-remoting.jar jboss-j2ee.jar" /> <!-- Required for JMS Client Code. -->
+			<fileset dir="${org.jboss.esb.server.home}/client" includes="jboss-messaging-client.jar" /> <!-- Required for JMS Client Code. -->
+			<fileset dir="${org.jboss.esb.server.server}/lib"
+				includes="hibernate3.jar commons-collections.jar hsqldb.jar" /> <!-- Required for jbpm Client Code. -->
+			<fileset dir="${org.jboss.esb.server.server}/lib" includes="bsh.jar" /> <!-- Required for scripting Client Code. -->
+			<fileset dir="${org.jboss.esb.server.home}/lib/endorsed"
+				includes="*.jar" /> <!-- Required for JMS Client Code. -->
+			<fileset
+				dir="${org.jboss.esb.server.server}/deploy/jboss-aop-jdk50.deployer"
+				includes="jboss-aop-jdk50.jar" /> <!-- Required for JMS Client Code. -->
+			<fileset dir="${org.jboss.esb.server.home}/client" includes="javassist.jar trove.jar" /> <!-- Required for JMS Client Code. -->
+			<fileset dir="${org.jboss.esb.server.home}/client" includes="hibernate-client.jar" /> <!-- Required for jbpm Client Code. -->
+			<fileset dir="${org.jboss.esb.server.server}/deploy/jbossesb.sar/lib"
+				includes="*.jar" />
+			<!-- jbossesb config -->
+			<fileset dir="${org.jboss.esb.server.server}/deploy/jbossesb.esb"
+				includes="*.jar" />
+			<!-- jbpm config -->
+			<fileset dir="${org.jboss.esb.server.server}/deploy/jbpm.esb"
+				includes="*.jar" />
+			<pathelement location="${org.jboss.esb.server.server}/lib/cglib.jar" />
+			<!-- smooks config -->
+			<fileset dir="${org.jboss.esb.server.server}/deploy/smooks.esb"
+				includes="*.jar" />
+			<!-- jbrules config -->
+			<fileset dir="${org.jboss.esb.server.server}/deploy/jbrules.esb"
+				includes="*.jar" />
+			<!-- spring config -->
+			<fileset dir="${org.jboss.esb.server.server}/deploy/spring.esb"
+				includes="*.jar" />
+			<!-- soap config -->
+			<fileset dir="${org.jboss.esb.server.server}/deploy/soap.esb"
+				includes="*.jar" />
+			<fileset dir="${org.jboss.esb.server.server}/lib" includes="activation.jar, mail.jar, jboss-ejb3x.jar" />
+			<!-- general libs -->
+			<pathelement location="${org.jboss.esb.server.home}/lib/commons-logging.jar" />
+			<pathelement location="${org.jboss.esb.server.home}/lib/commons-codec.jar" />
+			<pathelement location="${org.jboss.esb.server.home}/lib/jboss-system.jar" />
+			<pathelement location="${org.jboss.esb.server.home}/lib/jboss-xml-binding.jar" />
+			<pathelement location="${org.jboss.esb.server.home}/lib/commons-httpclient.jar" />
+			<pathelement location="${org.jboss.esb.server.server}/lib/log4j.jar" />
+			<fileset dir="${product.dir}/../testlib">
+				<include name="emma*.jar" />
+			</fileset>
+			<fileset dir="${qa.lib}/ext" includes="*.jar" />
+			<pathelement location="${org.jboss.esb.server.home}/client/jbossall-client.jar" />
+			<pathelement location="${pwd}" />
+		</path>
+	</target>
+
+	<target name="as5-path" if="jbossas5">
+		<property name="org.jboss.esb.server.server" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"/>
+		<property name="org.jboss.esb.server.deploy.dir" location="${org.jboss.esb.server.server}/deploy"/>
+		<property name="org.jboss.esb.server.common.lib" location="${org.jboss.esb.server.home}/common/lib"/>
+
+		<echo message="JBoss AS 5 compatible build = ${jbossas5} server=${org.jboss.esb.server.server}"/>
+
+        <path id="base.cp">
+			<pathelement location="${product.dir}/build/lib/jaxr-api-1.0rc1.jar" />
+            <fileset dir="${org.jboss.esb.server.server}/deployers/esb.deployer/lib" includes="*.jar"/>
+
+            <!-- jbossesb.esb jars -->
+            <fileset dir="${org.jboss.esb.server.deploy.dir}/jbossesb.esb" includes="*.jar"/>
+            <pathelement location="${org.jboss.esb.server.deploy.dir}/jbossesb.esb"/>
+            
+            <!-- jbpm.esb jars -->
+            <fileset dir="${org.jboss.esb.server.deploy.dir}/jbpm.esb" includes="*.jar"/>
+            <pathelement location="${org.jboss.esb.server.deploy.dir}/jbpm.esb"/>
+
+            <pathelement location="${org.jboss.esb.server.home}/lib/dom4j.jar"/>
+            <pathelement location="${org.jboss.esb.server.common.lib}/antlr.jar"/>
+            
+            <!-- smooks.esb jars -->
+            <fileset dir="${org.jboss.esb.server.deploy.dir}/smooks.esb" includes="*.jar"/>
+            <pathelement location="${org.jboss.esb.server.deploy.dir}/smooks.esb"/>
+            
+            <!-- jbrules.esb jars -->
+            <fileset dir="${org.jboss.esb.server.deploy.dir}/jbrules.esb" includes="*.jar"/>
+            <pathelement location="${org.jboss.esb.server.deploy.dir}/jbrules.esb"/>
+            
+            <!-- spring.esb jars -->
+            <fileset dir="${org.jboss.esb.server.deploy.dir}/spring.esb" includes="*.jar"/>
+            <pathelement location="${org.jboss.esb.server.deploy.dir}/spring.esb"/>
+            
+            <!-- soap.esb config -->
+            <fileset dir="${org.jboss.esb.server.deploy.dir}/soap.esb" includes="*.jar"/>
+
+            <fileset dir="${org.jboss.esb.server.home}/lib/endorsed" includes="activation.jar"/>
+            <fileset dir="${org.jboss.esb.server.common.lib}" includes="mail.jar, jboss-ejb3x.jar"/>
+
+            <!-- general libs -->
+            <pathelement location="${org.jboss.esb.server.common.lib}/commons-logging.jar"/>
+            <pathelement location="${org.jboss.esb.server.common.lib}/quartz.jar"/>
+
+            <pathelement location="${org.jboss.esb.server.home}/lib/jboss-system.jar"/>
+            <pathelement location="${org.jboss.esb.server.home}/lib/jboss-system-jmx.jar"/>
+            <pathelement location="${org.jboss.esb.server.home}/lib/jboss-kernel.jar"/>
+            <pathelement location="${org.jboss.esb.server.home}/lib/jboss-xml-binding.jar"/>
+
+			<!-- includes for read only cache -->
+            <fileset dir="${org.jboss.esb.server.server}/lib" includes="jbosscache-*.jar"/>
+            
+			<!-- includes for h2 -->
+            <fileset dir="${org.jboss.esb.server.server}/lib" includes="h2*.jar"/>
+
+            <fileset dir="${org.jboss.esb.server.home}/lib/endorsed" includes="xalan.jar"/>
+
+            <!-- common client jars -->
+            <fileset dir="${org.jboss.esb.server.home}/client" includes="jaxb-api.jar jaxb-impl.jar jaxb-xjc.jar"/>
+            <!-- fileset dir="${org.jboss.esb.server.home}/client" includes="jaxws-rt.jar jaxws-tools.jar"/-->
+            <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossall-client.jar"/>
+
+            <!-- common lib jars -->
+            <fileset dir="${org.jboss.esb.server.common.lib}" includes="bsh.jar"/>
+            <fileset dir="${org.jboss.esb.server.common.lib}" includes="commons-collections.jar"/>
+            <fileset dir="${org.jboss.esb.server.common.lib}" includes="jboss-jaxws.jar jboss-saaj.jar jbossws-common.jar jbossws-spi.jar"/>
+            <fileset dir="${org.jboss.esb.server.common.lib}" includes="jbossws-common.jar jbossws-framework.jar jbossws-native-jaxrpc.jar jbossws-native-saaj.jar jbossws-spi.jar"/>
+
+			<fileset dir="${product.dir}/../testlib" >
+                <include name="emma*.jar" />
+                <include name="commons-httpclient-*.jar" />
+            </fileset>
+            <fileset dir="${qa.lib}/ext" includes="*.jar" />
+            <pathelement location="${pwd}" />
+
+        </path>
+	</target>
 </project>

Modified: labs/jbossesb/trunk/qa/build.xml
===================================================================
--- labs/jbossesb/trunk/qa/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/qa/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -15,6 +15,10 @@
 	<property name="build.location" location="build"/>
         <property file="test.properties" />
 
+	<condition property="org.jboss.esb.server.home" value="${esb.server.home}">
+		<available file="${esb.server.home}"/>
+    </condition>
+
 	<import file="${product.dir}/esb-config.xml"/>
 
 	<property name="org.jboss.esb.properties" location="${product.dir}/product.properties"/>
@@ -44,7 +48,8 @@
 				<syspropertyset refid="org.jboss.esb.server"/>
 				<sysproperty key="ant.home" value="${ant.home}"/>
 				<sysproperty key="ant.library.dir" value="${ant.library.dir}"/>
-	            		<sysproperty key="org.jboss.esb.properties" value="${org.jboss.esb.properties}"/>
+				<sysproperty key="org.jboss.esb.properties" value="${org.jboss.esb.properties}"/>
+				<sysproperty key="esb.server.home" value="${esb.server.home}"/>
 				<arg value="-cp"/>
 				<arg value="${junit.jar}"/>
 				<arg value="-f"/>
@@ -59,6 +64,7 @@
 	<target name="soa-test" description="Run tests on the SOA server.">
 		<property name="soa.test.no-prepare" value="true"/>
 		<property name="server.timeout.seconds" value="240"/>
+		<echo message="${java.home}"/>
 		<antcall target="start-server">
 			<param name="no-prepare" value="true"/>
 			<param name="org.jboss.esb.server.config" value="all"/>	
@@ -134,8 +140,11 @@
 	
 	<target name="stop-server" depends="esb.init">
 		<stop-server serverHome="${org.jboss.esb.server.home}"/>
+		<condition property="shutDownString" value="Shutdown complete" else="[org.jboss.system.server.Server] Shutdown complete">
+			<available file="${org.jboss.esb.server.home}/server/${org.jboss.esb.test.server.config}/deployers"/>
+		</condition>
 		<wait-on-shutdown serverHome="${org.jboss.esb.server.home}"
-			serverConfig="${org.jboss.esb.test.server.config}"/>
+			serverConfig="${org.jboss.esb.test.server.config}" shutDownString="${shutDownString}"/>
 	</target>
 
 	<target name="ant">

Modified: labs/jbossesb/trunk/qa/junit/build.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/qa/junit/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -28,17 +28,17 @@
       <path refid="base.cp"/>
    </path>
 
-   <target name="test" depends="jars, prompt, execute"/>
-   <target name="ci-test" depends="jars, execute"/>
+   <target name="test" depends="init-version, jars, prompt, execute"/>
+   <target name="ci-test" depends="init-version, jars, execute"/>
 
-   <target name="compile">
+   <target name="compile" depends="init-version">
       <echo message="Running JUnit based QA tests..."/>
       <!-- Build the tests... -->
       <mkdir dir="${qa.junit.classes}"/>
       <javac srcdir="${qa.junit.src}" destdir="${qa.junit.classes}" classpathref="base.cp" debug="on"/>
    </target>
 
-   <target name="compile-versioned">
+   <target name="compile-versioned" depends="init-version">
       <echo message="Running JUnit based QA tests..."/>
 
       <path id="qa.junit.versioned.cp">
@@ -54,6 +54,7 @@
    <target name="jars" depends="compile, compile-versioned">
       <mkdir dir="${qa.build.lib}"/>
       <mkdir dir="${qa.build.ftp}/META-INF"/>
+	<echo message="${org.jboss.esb.test.ftp.hostname}"/>
       <copy file="${qa.junit.resources}/server/ftp/META-INF/jboss-esb-unfiltered.xml" tofile="${qa.build.ftp}/META-INF/jboss-esb.xml">
           <filterset>
               <filter token="FTP_HOSTNAME" value="${org.jboss.esb.test.ftp.hostname}"/>

Modified: labs/jbossesb/trunk/qa/junit/resources/server/jbpmReply/META-INF/deployment.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/resources/server/jbpmReply/META-INF/deployment.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/qa/junit/resources/server/jbpmReply/META-INF/deployment.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -2,4 +2,5 @@
   <depends>jboss.esb.qa.junit.destination:service=Queue,name=jbpm_reply_create_channel</depends>
   <depends>jboss.esb.qa.junit.destination:service=Queue,name=jbpm_reply_channel</depends>
   <depends>jboss.esb:test=JbpmReplyServer</depends>
+  <depends>jboss.esb:test=RedeliveryServer</depends>
 </jbossesb-deployment>

Copied: labs/jbossesb/trunk/qa/junit/resources/server/simple-scoped/META-INF/jboss-classloading.xml (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/qa/junit/resources/server/simple-scoped/META-INF/jboss-classloading.xml)
===================================================================
--- labs/jbossesb/trunk/qa/junit/resources/server/simple-scoped/META-INF/jboss-classloading.xml	                        (rev 0)
+++ labs/jbossesb/trunk/qa/junit/resources/server/simple-scoped/META-INF/jboss-classloading.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -0,0 +1 @@
+<classloading xmlns="urn:jboss:classloading:1.0" domain="simple-scoped" parent-first="false" />

Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/jbpmReply/JbpmReplyUnitTest.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/jbpmReply/JbpmReplyUnitTest.java	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/server/jbpmReply/JbpmReplyUnitTest.java	2009-06-24 07:07:46 UTC (rev 27106)
@@ -31,6 +31,8 @@
 import org.jboss.soa.esb.message.format.MessageFactory;
 import org.jboss.soa.esb.server.RedeliveryMBean;
 import org.jboss.test.JBossTestCase;
+import java.util.Arrays;
+import java.util.List;
 
 /**
  * Test local variables for jBPM processes.
@@ -78,16 +80,17 @@
         final int numMessages = 4 ;
         final String[] messages = (String[])getServer().invoke(new ObjectName(RedeliveryMBean.objectName), "waitForMessages",
                 new Integer[] {Integer.valueOf(numMessages)}, new String[] { Integer.TYPE.getName() });
+		List messageList = Arrays.asList(messages);
         assertNotNull("log messages", messages) ;
         assertEquals("Message count", numMessages, messages.length) ;
         for(int count = 0 ; count < numMessages ; count++)
         {
             assertNotNull("Message: " + count, messages[count]) ;
         }
-        assertEquals("Reply notification", "EsbNotifier:reply", messages[0]) ;
-        assertEquals("Reply action", "EsbActionHandler:reply", messages[1]) ;
-        assertEquals("Fault notification", "EsbNotifier:fault", messages[2]) ;
-        assertEquals("Fault action", "EsbActionHandler:fault", messages[3]) ;
+        assertTrue("Reply notification", messageList.contains("EsbNotifier:reply"));
+        assertTrue("Reply action", messageList.contains("EsbActionHandler:reply"));
+        assertTrue("Fault notification", messageList.contains("EsbNotifier:fault"));
+        assertTrue("Fault action", messageList.contains("EsbActionHandler:fault"));
     }
     
     /**

Modified: labs/jbossesb/trunk/qa/quickstarts/build.xml
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/build.xml	2009-06-23 21:57:33 UTC (rev 27105)
+++ labs/jbossesb/trunk/qa/quickstarts/build.xml	2009-06-24 07:07:46 UTC (rev 27106)
@@ -148,7 +148,7 @@
       </sequential>
 	</macrodef> 
 
-   <target name="init">
+   <target name="init" depends="init-version">
       <available property="quickstarts.exist" type="dir"
          file="${org.jboss.esb.test.quickstarts.dir}"/>
    </target>

Copied: labs/jbossesb/trunk/testlib/commons-httpclient-3.0.1.jar (from rev 26391, labs/jbossesb/workspace/dbevenius/jbossas5/testlib/commons-httpclient-3.0.1.jar)
===================================================================
(Binary files differ)




More information about the jboss-svn-commits mailing list