[jboss-svn-commits] JBL Code SVN: r18617 - in labs/jbossesb/workspace/chharris: product/docs and 113 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Feb 28 11:09:30 EST 2008


Author: kevin.conner at jboss.com
Date: 2008-02-28 11:09:28 -0500 (Thu, 28 Feb 2008)
New Revision: 18617

Added:
   labs/jbossesb/workspace/chharris/product/docs/services/WS-BPEL.odt
   labs/jbossesb/workspace/chharris/product/docs/services/jBPMIntegrationGuide.odt
   labs/jbossesb/workspace/chharris/product/docs/services/jBPMIntegrationGuide.pdf
   labs/jbossesb/workspace/chharris/product/lib/ext/h2.jar
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseMBean.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPool.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPoolContainer.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextException.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/actions/OtherAggregatorUnitTest.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/build.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/deployment.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jboss-esb.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-service.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jndi.properties
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/juddi.properties
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/log4j.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/quickstart-ds.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/readme.txt
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/hsqldb/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/JMXAttributeFinder.java
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/LGCallbackHandler.java
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build.xml
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/classes/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/classes/org/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/classes/org/jbpm/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/classes/org/jbpm/ant/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java
   labs/jbossesb/workspace/chharris/product/services/jbpm/lib/ext/jbpm-ant.jar
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/AsyncProcessSignal.java
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/DummyAction.java
   labs/jbossesb/workspace/chharris/product/tools/console/management-web/src/main/webapp/WEB-INF/
   labs/jbossesb/workspace/chharris/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/deployment.xml
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/jboss-esb.xml
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbm-service.xml
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbmq-service.xml
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/jbpmAsyncTest.xml
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/test-jbpm-service.xml
   labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/
   labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/EchoSuspendAction.java
   labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncActionHandler.java
   labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncUnitTest.java
   labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServer.java
   labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServerMBean.java
Removed:
   labs/jbossesb/workspace/chharris/product/docs/advanced/jBPMIntegrationGuide.odt
   labs/jbossesb/workspace/chharris/product/docs/services/ServiceOrchestration.odt
   labs/jbossesb/workspace/chharris/product/docs/services/ServiceOrchestration.pdf
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPool.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPoolContainer.java
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/build.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/deployment.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jboss-esb.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-service.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jndi.properties
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/juddi.properties
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/log4j.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/quickstart-ds.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/readme.txt
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/hsqldb/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/JMXAttributeFinder.java
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/LGCallbackHandler.java
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_mtom/src/org/jboss/soa/esb/samples/quickstart/webservicemtom/test/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build.xml
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/classes/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/classes/org/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/classes/org/jbpm/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/classes/org/jbpm/ant/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java
   labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/DeployProcessDefinitionFacade.java
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actions/
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/cmd/
   labs/jbossesb/workspace/chharris/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/deployment.xml
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/jboss-esb.xml
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbm-service.xml
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbmq-service.xml
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/jbpmAsyncTest.xml
   labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/test-jbpm-service.xml
   labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/EchoSuspendAction.java
   labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncActionHandler.java
   labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncUnitTest.java
   labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServer.java
   labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServerMBean.java
Modified:
   labs/jbossesb/workspace/chharris/product/build.xml
   labs/jbossesb/workspace/chharris/product/docs/AdministrationGuide.odt
   labs/jbossesb/workspace/chharris/product/docs/GettingStarted.odt
   labs/jbossesb/workspace/chharris/product/docs/MessageActionGuide.odt
   labs/jbossesb/workspace/chharris/product/docs/MessageActionGuide.pdf
   labs/jbossesb/workspace/chharris/product/docs/ProgrammersGuide.odt
   labs/jbossesb/workspace/chharris/product/docs/ReleaseNotes.odt
   labs/jbossesb/workspace/chharris/product/docs/advanced/SOAConcepts.odt
   labs/jbossesb/workspace/chharris/product/docs/advanced/WebServices.odt
   labs/jbossesb/workspace/chharris/product/docs/governance/MonitoringGuide.odt
   labs/jbossesb/workspace/chharris/product/docs/samples/TBGuide.odt
   labs/jbossesb/workspace/chharris/product/docs/services/ContentBasedRouting.odt
   labs/jbossesb/workspace/chharris/product/docs/services/MessageTransformation.odt
   labs/jbossesb/workspace/chharris/product/docs/services/Registry.odt
   labs/jbossesb/workspace/chharris/product/esb-config.xml
   labs/jbossesb/workspace/chharris/product/etc/schemas/xml/jbossesb-1.0.1.xsd
   labs/jbossesb/workspace/chharris/product/install/build.xml
   labs/jbossesb/workspace/chharris/product/install/standalone/jbossesb-server-base.zip
   labs/jbossesb/workspace/chharris/product/lib/Licenses.txt
   labs/jbossesb/workspace/chharris/product/plugins/org.jboss.soa.esb.oracle.aq/src/main/java/org/jboss/soa/esb/oracle/aq/AQUtil.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/command/JmsCommandQueue.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/DatabaseInitializer.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/DatabaseInitializerMBean.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/actions/Aggregator.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/addressing/util/DefaultFaultTo.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/Configuration.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/TransactionStrategy.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContext.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/persist/JdbcCleanConn.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecyclePriorities.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/RegistryUtil.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetter.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/NotifyQueues.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetter.java
   labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/jms/JMSPropertiesSetter.java
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/actions/AggregatorUnitTest.java
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/common/tests/utils/DrainQueuesAndTopics.java
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ListenerManagerJDBCUnitTest.java
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.xml
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetterUnitTest.java
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java
   labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration1/build.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration1/jboss-esb-unfiltered.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration1/processDefinition/processdefinition.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/build.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/jboss-esb.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/processDefinition/processdefinition.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/readme.txt
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/build.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/processDefinition/processdefinition.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/readme.txt
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/conf/base-build.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/build.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/readme.txt
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/scripts/LoadReport.groovy
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/scripts/LoadUtil.groovy
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_bpel/build.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_bpel/readme.txt
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_consumer1/build.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_consumer2/build.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_consumer2/readme.txt
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_mtom/build.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_producer/build.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_wsaddressing/build.xml
   labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_wssecurity/build.xml
   labs/jbossesb/workspace/chharris/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java
   labs/jbossesb/workspace/chharris/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/jcr/JCRConnectionManager.java
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/Constants.java
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbActionHandler.java
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/CallbackCommand.java
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/CommandExecutor.java
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/MessageFacade.java
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/META-INF/jboss-esb.xml
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-ds.xml
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-service.xml
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.db2.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.derby.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.firebird.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.hsqldb.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.informix.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.ingres.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.interbase.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mckoi.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mssql.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mysql.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.oracle.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.pointbase.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.postgresql.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.progress.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sapdb.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sybase.sql
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/test/resources/testExceptionHandling.jpg
   labs/jbossesb/workspace/chharris/product/services/jbpm/src/test/resources/testExceptionHandling.xml
   labs/jbossesb/workspace/chharris/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksInstanceManager.java
   labs/jbossesb/workspace/chharris/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPClient.java
   labs/jbossesb/workspace/chharris/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
   labs/jbossesb/workspace/chharris/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl
   labs/jbossesb/workspace/chharris/product/skip.properties-example
   labs/jbossesb/workspace/chharris/product/tools/console/management-esb/src/main/resources/mysql/create_database.sql
   labs/jbossesb/workspace/chharris/product/tools/console/management-web/src/main/webapp/attribute.jsp
   labs/jbossesb/workspace/chharris/product/tools/console/management/mysql.properties
   labs/jbossesb/workspace/chharris/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/BeanRegistrationServlet.java
   labs/jbossesb/workspace/chharris/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java
   labs/jbossesb/workspace/chharris/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/StatisticsHelper.java
   labs/jbossesb/workspace/chharris/qa/build.xml
   labs/jbossesb/workspace/chharris/qa/junit/build.xml
   labs/jbossesb/workspace/chharris/qa/quickstarts/build.xml
   labs/jbossesb/workspace/chharris/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BPMOrchestration2Test.java
Log:
Updated to SOA GA

Modified: labs/jbossesb/workspace/chharris/product/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -128,19 +128,19 @@
 
     <!-- Test targets -->
 
-    <target name="esb.test" depends="org.jboss.esb.test.configure-default, org.jboss.esb.test"/>
+    <target name="esb.test" depends="org.jboss.esb.test.configure-default, org.jboss.esb.test" unless="skip.tests"/>
 	
 	<target name="org.jboss.esb.test.configure-default">
         <property name="tests.to.run" value="*" />
     </target>
 
-    <target name="esb.testx" depends="org.jboss.esb.test.configure-tests, org.jboss.esb.test"/>
+    <target name="esb.testx" depends="org.jboss.esb.test.configure-tests, org.jboss.esb.test" unless="skip.tests"/>
 	
 	<target name="org.jboss.esb.test.configure-tests">
         <input addproperty="tests.to.run" message="Enter the name of the class(es) to be tested.  Wildcards Supported.  No need to specify the 'UnitTest' suffix:" />
     </target>
 
-    <target name="org.jboss.esb.test" depends="org.jboss.esb.jar">
+    <target name="org.jboss.esb.test" depends="org.jboss.esb.jar" unless="skip.tests">
         <echo message="Testing of modules, using unit and functional tests"/>
         <ant dir="rosetta" target="org.jboss.esb.rosetta.test"/>
     	<ant dir="services" target="test"/>
@@ -156,7 +156,7 @@
     </target>
 
     <!-- Integration test targets -->
-    <target name="org.jboss.esb.integration.test" depends="org.jboss.esb.compile">
+    <target name="org.jboss.esb.integration.test" depends="org.jboss.esb.compile" unless="skip.tests">
         <echo message="Testing of modules, using unit, functional and integration tests"/>
         <ant dir="rosetta">
             <target name="org.jboss.esb.rosetta.integration.test"/>

Modified: labs/jbossesb/workspace/chharris/product/docs/AdministrationGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/docs/GettingStarted.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/docs/MessageActionGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/docs/MessageActionGuide.pdf
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/docs/ProgrammersGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/docs/ReleaseNotes.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/docs/advanced/SOAConcepts.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/docs/advanced/WebServices.odt
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/chharris/product/docs/advanced/jBPMIntegrationGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/docs/governance/MonitoringGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/docs/samples/TBGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/docs/services/ContentBasedRouting.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/docs/services/MessageTransformation.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/docs/services/Registry.odt
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/chharris/product/docs/services/ServiceOrchestration.odt
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/chharris/product/docs/services/ServiceOrchestration.pdf
===================================================================
(Binary files differ)

Copied: labs/jbossesb/workspace/chharris/product/docs/services/WS-BPEL.odt (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/docs/services/WS-BPEL.odt)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/workspace/chharris/product/docs/services/jBPMIntegrationGuide.odt (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/docs/services/jBPMIntegrationGuide.odt)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/workspace/chharris/product/docs/services/jBPMIntegrationGuide.pdf (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/docs/services/jBPMIntegrationGuide.pdf)
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/esb-config.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/esb-config.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/esb-config.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -112,7 +112,12 @@
     <target name="esb.init-app-server" if="org.jboss.esb.server.home">
         <property name="org.jboss.esb.test.server.config" value="test-esb"/>
     	<condition property="esb.server.config.nameclash">
+		<and>
     		<equals arg1="${org.jboss.esb.test.server.config}" arg2="${org.jboss.esb.server.config}"/>
+		<not>
+		<equals arg1="true" arg2="${soa.test.no-prepare}"/>
+		</not>
+		</and>
     	</condition>
     	<fail if="esb.server.config.nameclash" message="Specified server config matches test profile name: ${org.jboss.esb.test.server.config}"/>
     	
@@ -139,7 +144,7 @@
     	<property name="org.jboss.esb.server.config.appserver" value="true"/>
 	</target>
 	
-	<target name="esb.configure-app-server" if="org.jboss.esb.server.config.appserver">
+	<target name="esb.configure-app-server" unless="soa.test.no-prepare" if="org.jboss.esb.server.config.appserver">
 		<property name="esb.target-dir" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.test.server.config}"/>
     	<delete dir="${esb.target-dir}" quiet="true"/>
     	
@@ -171,7 +176,7 @@
     	<property name="org.jboss.esb.server.config.ftpserver" value="true"/>
 	</target>
 	
-	<target name="esb.configure-ftp-server" if="org.jboss.esb.server.config.ftpserver">
+	<target name="esb.configure-ftp-server" unless="soa.test.no-prepare" if="org.jboss.esb.server.config.ftpserver">
 		<ant antfile="build.xml" dir="${esb.ftp.location}"/>
 		<property name="esb.deploy-dir" location="${org.jboss.esb.server.home}/server/${org.jboss.esb.test.server.config}/deploy"/>
 		<copy todir="${esb.deploy-dir}">
@@ -191,8 +196,8 @@
 
 	<target name="esb.configure" depends="esb.init, esb.configure-app-server, esb.configure-esb-server, esb.configure-ftp-server"/>
 	
-    <target name="esb.setup-esb" depends="esb.configure" description="target for configuring a clean esb">
-    	<echo>install dir: ${esb.install.location}</echo>
+    <target name="esb.setup-esb" depends="esb.configure" unless="soa.test.no-prepare" description="target for configuring a clean esb">
+	<echo>install dir: ${esb.install.location}</echo>
     	<ant antfile="build.xml" dir="${esb.install.location}" target="deploy"
     		inheritall="false">
     		<property name="org.jboss.esb.server.home" value="${org.jboss.esb.server.home}"/>

Modified: labs/jbossesb/workspace/chharris/product/etc/schemas/xml/jbossesb-1.0.1.xsd
===================================================================
--- labs/jbossesb/workspace/chharris/product/etc/schemas/xml/jbossesb-1.0.1.xsd	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/etc/schemas/xml/jbossesb-1.0.1.xsd	2008-02-28 16:09:28 UTC (rev 18617)
@@ -626,6 +626,15 @@
 					</xsd:documentation>
 				</xsd:annotation>
 			</xsd:attribute>
+			<xsd:attribute default="false" name="transacted"
+				type="xsd:boolean" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						If true, JMS sessions will be transaction aware.
+						Default is false.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
 		</xsd:complexType>
 	</xsd:element>
 	<xsd:element name="jms-bus" substitutionGroup="jesb:bus">
@@ -745,6 +754,13 @@
 							</xsd:documentation>
 						</xsd:annotation>
 					</xsd:attribute>
+					<xsd:attribute name="providerAdapterJNDI" type="xsd:string">
+						<xsd:annotation>
+							<xsd:documentation xml:lang="en">
+								The JNDI location of an alternate provider adapter
+							</xsd:documentation>
+						</xsd:annotation>
+					</xsd:attribute>
 				</xsd:extension>
 			</xsd:complexContent>
 		</xsd:complexType>

Modified: labs/jbossesb/workspace/chharris/product/install/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/install/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/install/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -10,6 +10,7 @@
         <property name="server.dir" value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"/>
         <property name="conf.dir" value="${server.dir}/conf"/>
         <property name="deploy.dir" value="${server.dir}/deploy"/>
+        <property name="server.lib.dir" value="${server.dir}/lib"/>
         <property name="hadeploy.dir" value="${server.dir}/deploy-hasingleton"/>
 
         <property name="product.dir" location=".."/>
@@ -152,6 +153,9 @@
           <copy file="${org.jboss.esb.dist}/tools/configeditor/dist/jbossesb-config-editor.war" todir="${deploy.dir}" />
           <copy file="${org.jboss.esb.dist}/tools/configeditor/resources/action-templates.xml" todir="${conf.dir}" />
 
+          <!-- install h2 jar -->
+          <copy file="${org.jboss.esb.dist.lib}/ext/h2.jar" todir="${server.lib.dir}"/>
+
 	  <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}"/>

Modified: labs/jbossesb/workspace/chharris/product/install/standalone/jbossesb-server-base.zip
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/lib/Licenses.txt
===================================================================
--- labs/jbossesb/workspace/chharris/product/lib/Licenses.txt	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/lib/Licenses.txt	2008-02-28 16:09:28 UTC (rev 18617)
@@ -707,3 +707,12 @@
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 ------------------------------------------------------------------------------
+
+
+--- h2 database jar ----------------------------------------------------------
+
+Licensed under the H2 License, Version 1.0
+(http://h2database.com/html/license.html).
+Initial Developer: H2 Group
+
+------------------------------------------------------------------------------

Copied: labs/jbossesb/workspace/chharris/product/lib/ext/h2.jar (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/lib/ext/h2.jar)
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/plugins/org.jboss.soa.esb.oracle.aq/src/main/java/org/jboss/soa/esb/oracle/aq/AQUtil.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/plugins/org.jboss.soa.esb.oracle.aq/src/main/java/org/jboss/soa/esb/oracle/aq/AQUtil.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/plugins/org.jboss.soa.esb.oracle.aq/src/main/java/org/jboss/soa/esb/oracle/aq/AQUtil.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -138,6 +138,14 @@
         } catch (SQLException e) {
             log.error("caught sqlexception", e);
         } finally {
+            if (rs != null)
+            {
+        	try {
+                    rs.close();
+                } catch (SQLException e) {
+                    if(log.isDebugEnabled()) log.debug("sqlexception while closing resultset", e);
+                }
+            }
             if(statement!=null)
                 try {
                     statement.close();

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/command/JmsCommandQueue.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/command/JmsCommandQueue.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/command/JmsCommandQueue.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -23,7 +23,8 @@
 import org.apache.log4j.Logger;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.NamingContext;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 import org.jboss.soa.esb.util.Util;
 
 /**
@@ -121,7 +122,7 @@
 		return null;
 	}
 
-	private void initialiseJMS (ConfigTree p_oP) throws ConfigurationException, JMSException, NamingException
+	private void initialiseJMS (ConfigTree p_oP) throws ConfigurationException, JMSException, NamingException, NamingContextException
 	{
 		// Only check for JMS attributes if a queue JNDI name was specified
 		String sJndiName = p_oP.getAttribute(COMMAND_JNDI_NAME);
@@ -143,7 +144,9 @@
 			String sJndiPkgPrefix = obtainAtt(p_oP, COMMAND_JNDI_PKG_PREFIX,"");
             environment.put(Context.URL_PKG_PREFIXES, sJndiPkgPrefix);
 			oNewAtts.put(COMMAND_JNDI_PKG_PREFIX, sJndiPkgPrefix);
-			Context oJndiCtx = NamingContext.getServerContext(environment);
+			Context oJndiCtx = NamingContextPool.getNamingContext(environment);
+			try
+			{
 
 			String sFactClass = obtainAtt(p_oP, COMMAND_CONN_FACTORY,
 					"ConnectionFactory");
@@ -156,7 +159,7 @@
 			{
 				oFactCls = oJndiCtx.lookup(sFactClass);
 			} catch (NamingException ne) {
-                oJndiCtx = NamingContext.getFreshServerContext(environment);
+                oJndiCtx = NamingContextPool.replaceNamingContext(oJndiCtx, environment);
                 try {
                     oFactCls = oJndiCtx.lookup(sFactClass);
                 } catch (NamingException ex) {
@@ -210,7 +213,11 @@
 				m_oJmsSess = oSess;
 				m_oCmdSrc = oSess.createReceiver(oQ, sMsgSelector);
 			}
-            oJndiCtx.close();
+			}
+			finally
+			{
+			    NamingContextPool.releaseNamingContext(oJndiCtx) ;
+			}
 		}
 	}
 

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -46,13 +46,18 @@
 import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
 import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
 import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPoolContainer;
+import org.jboss.internal.soa.esb.rosetta.pooling.xa.XaJmsConnectionPool;
+import org.jboss.internal.soa.esb.rosetta.pooling.xa.XaJmsConnectionPoolContainer;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.addressing.MalformedEPRException;
 import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.common.TransactionStrategy;
+import org.jboss.soa.esb.common.TransactionStrategyException;
 import org.jboss.soa.esb.couriers.CourierException;
 import org.jboss.soa.esb.couriers.CourierTimeoutException;
 import org.jboss.soa.esb.helpers.KeyValuePair;
-import org.jboss.soa.esb.helpers.NamingContext;
+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.listeners.gateway.ESBPropertiesSetter;
 import org.jboss.soa.esb.message.Message;
@@ -139,8 +144,12 @@
     }
 
     public Session getJmsSession(final int acknowledgeMode) throws CourierException {
+	reset();
+	
         if(jmsSession == null) {
             synchronized(this) {
+        	checkTransaction();
+        	
                 if(jmsSession == null) {
                     String sType;
 
@@ -184,9 +193,13 @@
         if (null == message) {
             return false;
         }
-
+        
         if (_messageProducer == null) {
-            createMessageProducer();
+            try {
+                createMessageProducer();
+            } catch (final NamingContextException nce) {
+                throw new CourierException("Unexpected exception attempting to access naming context pool", nce) ;
+            }
         }
 
         // Create the JMS message from the serialized ESB message...
@@ -226,9 +239,15 @@
         if (null == message) {
             return false;
         }
-
+	
+	reset();
+	
         if (_messageProducer == null) {
-            createMessageProducer();
+            try {
+                createMessageProducer();
+            } catch (final NamingContextException nce) {
+                throw new CourierException("Unexpected exception attempting to access naming context pool", nce) ;
+            }
         }
 
         while (null != _messageProducer) {
@@ -239,7 +258,13 @@
                         message.setStringProperty(key, kvp.getValue());
                     }
                 }
+
+                checkTransaction();
+                
                 sendMessage(message);
+                if ( jmsSession.getTransacted() && !transactional )
+	                jmsSession.commit();
+                
                 return true;
             }
             catch (JMSException e) {
@@ -301,14 +326,18 @@
         }
     } // ________________________________
 
-    private void createMessageProducer() throws CourierException {
+    private void createMessageProducer() throws CourierException, NamingContextException {
         Context oJndiCtx = null;
 
+        reset();
+	
+        checkTransaction();
+        
         if (_messageProducer == null) {
             synchronized(this) {
                 if (_messageProducer == null) {
                     try {
-                        oJndiCtx = NamingContext.getServerContext(_epr.getJndiEnvironment());
+                        oJndiCtx = NamingContextPool.getNamingContext(_epr.getJndiEnvironment());
 
                         String sType = _epr.getDestinationType();
                         if (JMSEpr.QUEUE_TYPE.equals(sType)) {
@@ -319,7 +348,7 @@
                                         .getDestinationName());
                             } catch (NamingException ne) {
                                 try {
-                                    oJndiCtx = NamingContext.getFreshServerContext(_epr.getJndiEnvironment());
+                                    oJndiCtx = NamingContextPool.replaceNamingContext(oJndiCtx, _epr.getJndiEnvironment());
                                     queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
                                             .getDestinationName());
                                 } catch (NamingException nex) {
@@ -344,7 +373,7 @@
                         }
                         _messageProducer.setDeliveryMode(_epr.getPersistent()?DeliveryMode.PERSISTENT:DeliveryMode.NON_PERSISTENT);
                         if ( _logger.isDebugEnabled() )
-                            _logger.debug(" JMSCourier deliveryMode: " + _messageProducer.getDeliveryMode() + ", peristent:" + _epr.getPersistent());
+                            _logger.debug("JMSCourier deliveryMode: " + _messageProducer.getDeliveryMode() + ", peristent:" + _epr.getPersistent());
                     }
                     catch (JMSException ex) {
                         _logger.debug("Error from JMS system.", ex);
@@ -353,6 +382,10 @@
                     }
                     catch (URISyntaxException ex) {
                         throw new CourierException(ex);
+                    } finally {
+                        if (oJndiCtx != null) {
+                            NamingContextPool.releaseNamingContext(oJndiCtx) ;
+                        }
                     }
                 }
             }
@@ -360,14 +393,26 @@
     } // ________________________________
 
     private JmsConnectionPool getConnectionPool() throws ConnectionException {
-        if(jmsConnectionPool == null) {
+	reset();
+	
+        if (jmsConnectionPool == null) {
             synchronized(this) {
+        	try
+        	{
+        	    checkTransaction();
+        	}
+        	catch (CourierException ex)
+        	{
+        	    throw new ConnectionException(ex);
+        	}
+        	
                 if(jmsConnectionPool == null) {
                     String sFactoryClass;
                     String sType;
                     Properties properties;
                     String username;
                     String password;
+                    boolean transacted;
 
                     try {
                         sFactoryClass = _epr.getConnectionFactory();
@@ -375,6 +420,7 @@
                         properties = _epr.getJndiEnvironment();
                         username = _epr.getJMSSecurityPrincipal();
                         password = _epr.getJMSSecurityCredential();
+                        transacted = _epr.getTransacted();
                     } catch (URISyntaxException e) {
                         throw new ConnectionException("Unexpected exception while getting JMS connection pool.", e);
                     }
@@ -383,7 +429,29 @@
                         sFactoryClass = "ConnectionFactory";
                     }
 
-                    jmsConnectionPool = JmsConnectionPoolContainer.getPool(properties, sFactoryClass, sType, username, password);
+                    /*
+                     * Needs to be a one-shot instance if transactional.
+                     */
+                    
+                    Object tx = null;
+                    
+                    try
+                    {
+                	TransactionStrategy txS = TransactionStrategy.getTransactionStrategy(true);
+                	
+                	tx = txS.getTransaction();
+                    }
+                    catch (TransactionStrategyException ex)
+                    {
+                	_logger.warn("Problem getting transaction strategy: ", ex);
+                	
+                	throw new ConnectionException(ex);
+                    }
+
+                    if (tx == null)
+                	jmsConnectionPool = JmsConnectionPoolContainer.getPool(properties, sFactoryClass, sType, username, password, transacted);
+                    else
+                	jmsConnectionPool = XaJmsConnectionPoolContainer.getPool(properties, sFactoryClass, sType, username, password, true, tx);  // force transacted to be true!
                 }
             }
         }
@@ -391,6 +459,56 @@
         return jmsConnectionPool;
     }
 
+    private void reset ()
+    {
+	/*
+	 * Are we in a global transaction?
+	 */
+	
+	if (jmsConnectionPool instanceof XaJmsConnectionPool)
+	{
+	    /*
+	     * If the global transaction has terminated then this pool instance has been
+	     * closed and we need to get another one.
+	     */
+	    
+	    if (!((XaJmsConnectionPool) jmsConnectionPool).active())
+	    {
+		jmsConnectionPool = null;
+		_messageProducer = null;
+		_messageConsumer = null;
+		jmsSession = null;
+	    }
+	}
+    }
+    
+    private void checkTransaction () throws CourierException
+    {
+	try
+	{
+        	TransactionStrategy txStrategy = TransactionStrategy.getTransactionStrategy(true);
+		Object txHandle = txStrategy.getTransaction();
+		boolean isActive = txStrategy.isActive();
+		
+		transactional = (txHandle != null);
+		
+		/*
+		 * Make sure the current transaction is still active! If we
+		 * have previously slept, then the timeout may be longer than that
+		 * associated with the transaction.
+		 */
+		
+		if (transactional && !isActive)
+		{
+			throw new CourierException("Associated transaction is no longer active!");
+		}
+	}
+	catch (TransactionStrategyException ex)
+	{
+	    throw new CourierException(ex);
+	}
+    }
+    
     public Message pickup(long millis) throws CourierException, CourierTimeoutException {
         javax.jms.Message jmsMessage = pickupPayload(millis);
 
@@ -416,6 +534,8 @@
 
         javax.jms.Message jmsMessage = null;
         while (null != _messageConsumer) {
+            checkTransaction();
+            
             try {
                 jmsMessage = _messageConsumer.receive(millis);
                 break;
@@ -471,47 +591,50 @@
         esbPropertiesStrategy.setPropertiesFromJMSMessage(fromJMS, toESB);
     }
 
-    private void createMessageConsumer() throws CourierException, ConfigurationException, MalformedEPRException {
+    private void createMessageConsumer() throws CourierException, ConfigurationException, MalformedEPRException, NamingContextException {
         Context oJndiCtx = null;
 
+        reset();
+        
         if (_messageConsumer == null) {
             synchronized(this) {
                 if (_messageConsumer == null) {
                     boolean success = false;
                     try {
                         Properties environment = _epr.getJndiEnvironment();
-                        oJndiCtx = NamingContext.getServerContext(environment);
-                        if (null == oJndiCtx)
-                            throw new ConfigurationException(
-                                    "Unable fo obtain jndi context");
-
-                        String sType = _epr.getDestinationType();
-                        if (JMSEpr.QUEUE_TYPE.equals(sType)) {
-                            QueueSession qSess = (QueueSession) getJmsSession(_epr.getAcknowledgeMode());
-                            javax.jms.Queue queue = null;
-                            try {
-                                queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
-                                        .getDestinationName());
-                            } catch (NamingException ne) {
+                        oJndiCtx = NamingContextPool.getNamingContext(environment);
+                        try
+                        {
+                            String sType = _epr.getDestinationType();
+                            if (JMSEpr.QUEUE_TYPE.equals(sType)) {
+                                QueueSession qSess = (QueueSession) getJmsSession(_epr.getAcknowledgeMode());
+                                javax.jms.Queue queue = null;
                                 try {
-                                    oJndiCtx = NamingContext.getFreshServerContext(environment);
                                     queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
                                             .getDestinationName());
-                                } catch (NamingException nex) {
-                                    //ActiveMQ
-                                    queue = qSess.createQueue(_epr.getDestinationName());
+                                } catch (NamingException ne) {
+                                    try {
+                                        oJndiCtx = NamingContextPool.replaceNamingContext(oJndiCtx, environment);
+                                        queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
+                                                .getDestinationName());
+                                    } catch (NamingException nex) {
+                                        //ActiveMQ
+                                        queue = qSess.createQueue(_epr.getDestinationName());
+                                    }
                                 }
+                                _messageConsumer = qSess.createReceiver(queue, _epr.getMessageSelector());
+                            } else if (JMSEpr.TOPIC_TYPE.equals(sType)) {
+                                TopicSession tSess = (TopicSession) getJmsSession(_epr.getAcknowledgeMode());
+                                Topic topic = tSess.createTopic(_epr.getDestinationName());
+                                _messageConsumer = tSess.createConsumer(topic, _epr
+                                        .getMessageSelector());
+                            } else {
+                                throw new CourierException("Unknown destination type");
                             }
-                            _messageConsumer = qSess.createReceiver(queue, _epr.getMessageSelector());
-                        } else if (JMSEpr.TOPIC_TYPE.equals(sType)) {
-                            TopicSession tSess = (TopicSession) getJmsSession(_epr.getAcknowledgeMode());
-                            Topic topic = tSess.createTopic(_epr.getDestinationName());
-                            _messageConsumer = tSess.createConsumer(topic, _epr
-                                    .getMessageSelector());
-                        } else {
-                            throw new CourierException("Unknown destination type");
+                            success = true;
+                        } finally {
+                            NamingContextPool.releaseNamingContext(oJndiCtx) ;
                         }
-                        success = true;
                     }
                     catch (JMSException ex) {
                         _logger.debug("Error from JMS system.", ex);
@@ -531,7 +654,6 @@
         }
     } // ________________________________
 
-
     long _sleepForRetries = 3000; // milliseconds
 
     protected boolean _isReceiver;
@@ -552,6 +674,8 @@
 
     protected volatile JmsConnectionPool jmsConnectionPool;
 
+    private boolean transactional = false;
+    
     /**
      * Strategy for setting JMSProperties
      */

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -114,7 +114,8 @@
 
 	/**
 	 * package the ESB message in a java.io.Serializable, and write it.
-	 * Delivery occurs within its own transaction.
+	 * Delivery occurs within its own transaction if there is no
+	 * global transaction active.
 	 * 
 	 * @param message
 	 *            Message - the message to deliverAsync
@@ -146,6 +147,30 @@
 			throw new CourierException("Problems with message header ",e);
 		}
 
+		try
+		{
+        		TransactionStrategy txStrategy = TransactionStrategy.getStrategy();
+        		Object txHandle = ((txStrategy == null) ? null : txStrategy.getTransaction());
+        		boolean isActive = ((txStrategy == null) ? false : txStrategy.isActive());
+        		
+        		transactional = (txHandle != null);
+        		
+        		/*
+        		 * Make sure the current transaction is still active! If we
+        		 * have previously slept, then the timeout may be longer than that
+        		 * associated with the transaction.
+        		 */
+        		
+        		if (transactional && !isActive)
+        		{
+        			throw new CourierException("Associated transaction is no longer active!");
+        		}
+		}
+		catch (TransactionStrategyException ex)
+		{
+		    throw new CourierException(ex);
+		}
+		
 		if (null == _conn)
 		{
 			try
@@ -170,7 +195,10 @@
 				PS.setLong(iCol++, System.currentTimeMillis());
 
 				_conn.execUpdWait(PS, 3);
-				_conn.commit();
+				
+				if (!transactional)
+				    _conn.commit();
+				
 				return true;
 			}
 			catch (SQLException e)
@@ -179,6 +207,7 @@
 				{
 					try
 					{
+					    if (!transactional)
 						_conn.rollback();
 					}
 					catch (Exception roll)
@@ -236,58 +265,71 @@
 				throw new CourierException("Could not determine transaction association!");
 			}
 			
+			ResultSet RS = null;
+			
 			try
-            {
-                ResultSet RS = getRowList();
+			{
+			    RS = getRowList();
 
-				while (null != RS && RS.next())
-				{
-					String messageId = RS.getString(1);
+			    while (null != RS && RS.next())
+			    {
+				String messageId = RS.getString(1);
 
-					if (null == (result = tryToPickup(messageId)))
-						continue;
-					
-					/*
-					 * If this is fault message, then throw an exception with the contents. With the
-					 * exception of user-defined exceptions, faults will have nothing in the body, properties etc.
-					 */
-					
-					if (Type.isFaultMessage(result))
-					    Factory.createExceptionFromFault(result);
-					
-					return result;
-				}
-            }
+				if (null == (result = tryToPickup(messageId)))
+				    continue;
+
+				/*
+				 * If this is fault message, then throw an exception with the contents. With the
+				 * exception of user-defined exceptions, faults will have nothing in the body, properties etc.
+				 */
+
+				if (Type.isFaultMessage(result))
+				    Factory.createExceptionFromFault(result);
+
+				return result;
+			    }
+			}
 			catch (SQLException e)
 			{
-				_logger.debug("SQL Exception during pickup", e);
-				return null;
+			    _logger.debug("SQL Exception during pickup", e);
+			    return null;
 			}
-                        finally
-                        {
-                            // Added to make sure we release transactions from all paths
-                            if (_conn != null)
-                            {
-                                try
-                                {
-                                	if (!transactional)
-                                		_conn.rollback() ;
-                                }
-                                catch (final SQLException sqle) {} //ignore
-                            }
-                        }
-                        try
-                        {
-                                long lSleep = limit - System.currentTimeMillis();
-                                if (_pollLatency < lSleep)
-                                        lSleep = _pollLatency;
-                                if (lSleep > 0)
-                                        Thread.sleep(lSleep);
-                        }
-                        catch (InterruptedException e)
-                        {
-                                return null;
-                        }
+			finally
+			{
+			    try
+			    {
+        			    if (RS != null)
+        				RS.close();
+			    }
+			    catch (final SQLException ex)
+			    {
+				_logger.warn("SQLException during close of ResultSet.", ex);
+			    }
+			    
+			    // Added to make sure we release transactions from all paths
+			    if (_conn != null)
+			    {
+				try
+				{
+				    if (!transactional)
+					_conn.rollback() ;
+				}
+				catch (final SQLException sqle) {} //ignore
+			    }
+			}
+			
+			try
+			{
+			    long lSleep = limit - System.currentTimeMillis();
+			    if (_pollLatency < lSleep)
+				lSleep = _pollLatency;
+			    if (lSleep > 0)
+				Thread.sleep(lSleep);
+			}
+			catch (InterruptedException e)
+			{
+			    return null;
+			}
 		} while (System.currentTimeMillis() <= limit);
 		return null;
 	} // ________________________________
@@ -303,9 +345,12 @@
 
 		while (_conn != null)
 		{
+		    ResultSet RS = null;
+		    
 			try
 			{
-				ResultSet RS = _conn.execQueryWait(select4UpdateStatement(), 3);
+				RS = _conn.execQueryWait(select4UpdateStatement(), 3);
+				
 				while (RS.next())
 				{
 					Exception eBad = null;
@@ -346,10 +391,22 @@
 			{
 				throw new CourierException(e);
 			}
-			catch (Exception e)
+			catch (Exception ex)
 			{
-				jdbcConnectRetry(e);
+				jdbcConnectRetry(ex);
 			}
+			finally
+			{
+			    try
+			    {
+				if (RS != null)
+				    RS.close();
+			    }
+			    catch (final Exception ex)
+			    {
+				_logger.warn("Could not close ResultSet.", ex);
+			    }
+			}
 		}
 		return null;
 	} // ________________________________

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/DatabaseInitializer.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/DatabaseInitializer.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/DatabaseInitializer.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -47,6 +47,7 @@
    private String datasource;
    private String sqlFiles;
    private String existsSql;
+   private boolean useEOL ;
 
 
    public String getExistsSql()
@@ -59,6 +60,16 @@
       this.existsSql = existsSql;
    }
 
+   public boolean getUseEOL()
+   {
+      return useEOL;
+   }
+
+   public void setUseEOL(boolean useEOL)
+   {
+      this.useEOL = useEOL;
+   }
+
    public String getSqlFiles()
    {
       return sqlFiles;
@@ -118,7 +129,12 @@
       URL url = Thread.currentThread().getContextClassLoader().getResource(resource);
       String sql = Configuration.getStringFromStream(url.openStream());
       sql = sql.replaceAll("(?m)^--([^\n]+)?$", ""); // Remove all commented lines
-      String[] statements = sql.split(";");
+      final String[] statements ; 
+      if (useEOL) {
+          statements = sql.split("[\n;]");
+      } else {
+          statements = sql.split(";");
+      }
       for (String statement : statements)
       {
     	  if ((statement == null) || ("".equals(statement.trim()))) {

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/DatabaseInitializerMBean.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/DatabaseInitializerMBean.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/DatabaseInitializerMBean.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -37,6 +37,10 @@
    void setExistsSql(String existsSql)
            ;
 
+   boolean getUseEOL() ;
+
+   void setUseEOL(boolean useEOL) ;
+
    String getSqlFiles()
            ;
 

Copied: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2Database.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,333 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.dependencies;
+
+import java.io.File;
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+
+import org.jboss.system.ServiceMBeanSupport;
+import org.jboss.system.server.ServerConfigLocator;
+
+/**
+ * Integration with H2.
+ *
+ * @author <a href="mailto:rickard.oberg at telkel.com">Rickard �berg</a>
+ * @author <a href="mailto:Scott_Stark at displayscape.com">Scott Stark</a>.
+ * @author <a href="mailto:pf at iprobot.com">Peter Fagerlund</a>
+ * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
+ * @author <a href="mailto:vesco.claudio at previnet.it">Claudio Vesco</a>
+ * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
+ * @author <a href="mailto:kevin.conner at jboss.org">Kevin Conner</a>
+ * @version $Revision$
+ */
+public class H2Database extends ServiceMBeanSupport
+   implements H2DatabaseMBean
+{
+   /** Default password: <code>empty string</code>. */
+   private static final String DEFAULT_PASSWORD = "";
+   
+   /** Default user: <code>sa</code>. */
+   private static final String DEFAULT_USER = "sa";
+   
+   /** JDBC Driver class: <code>org.h2.Driver</code>. */
+   private static final String JDBC_DRIVER_CLASS = "org.h2.Driver";
+   
+   /** JDBC URL common prefix: <code>jdbc:h2:</code>. */
+   private static final String JDBC_URL_PREFIX = "jdbc:h2:";
+   
+   /** JDBC in memory URL prefix: <code>jdbc:h2:mem:</code>. */
+   private static final String JDBC_MEM_URL_PREFIX = JDBC_URL_PREFIX + "mem:";
+   
+   /** Default data subdir: <code>h2</code>. */
+   private static final String H2_DATA_DIR = "h2";
+   
+   /** Default database name: <code>default</code>. */
+   private static final String DEFAULT_DATABASE_NAME = "default";
+
+   // Private Data --------------------------------------------------
+   
+   /** Full path to db/h2. */
+   private File dbPath;
+
+   /** Database name. */
+   private String name = DEFAULT_DATABASE_NAME;
+   
+   /** In memory mode. */
+   private boolean inMemoryMode ;
+   
+   /** Database user. */
+   private String user = DEFAULT_USER;
+   
+   /** Database password. */
+   private String password = DEFAULT_PASSWORD;
+   
+   /** Hold a connection for in memory h2. */
+   private Connection connection;
+
+
+   // Attributes ----------------------------------------------------
+   
+   /**
+    * Set the database name.
+    * 
+    * @jmx.managed-attribute
+    */
+   public void setDatabase(String name)
+   {
+      if (name == null)
+      {
+         name = DEFAULT_DATABASE_NAME;
+      }
+      this.name = name;
+   }
+
+   /**
+    * Get the database name.
+    * 
+    * @jmx.managed-attribute
+    */
+   public String getDatabase()
+   {
+      return name;
+   }
+
+   /**
+    * Get the full database path.
+    * 
+    * @jmx.managed-attribute
+    */
+   public String getDatabasePath()
+   {
+      if (dbPath != null)
+      {
+         return dbPath.toString();
+      }
+      else
+      {
+         return null;
+      }
+   }
+
+   /**
+    * @return the <code>inMemoryMode</code> flag.
+    * 
+    * @jmx.managed-attribute 
+    */
+   public boolean isInMemoryMode()
+   {
+      return inMemoryMode;
+   }
+
+   /**
+    * If <b>true</b> the h2 is in memory mode otherwise h2 is in server or remote mode.
+    * 
+    * @param b in memory mode.
+    * 
+    * @jmx.managed-attribute
+    */
+   public void setInMemoryMode(boolean b)
+   {
+      inMemoryMode = b;
+   }
+
+   /**
+    * @return the password
+    * 
+    * @jmx.managed-attribute 
+    */
+   public String getPassword()
+   {
+      return password;
+   }
+
+   /**
+    * @return the user
+    * 
+    * @jmx.managed-attribute 
+    */
+   public String getUser()
+   {
+      return user;
+   }
+
+   /**
+    * @param password
+    * 
+    * @jmx.managed-attribute 
+    */
+   public void setPassword(String password)
+   {
+      if (password == null)
+      {
+         password = DEFAULT_PASSWORD;
+      }
+      this.password = password;
+   }
+
+   /**
+    * @param user
+    * 
+    * @jmx.managed-attribute 
+    */
+   public void setUser(String user)
+   {
+      if (user == null)
+      {
+         user = DEFAULT_USER;
+      }
+      this.user = user;
+   }
+
+   // Lifecycle -----------------------------------------------------
+   
+   /**
+    * Start the database
+    */
+   protected void startService() throws Exception
+   {
+      if (inMemoryMode)
+      {
+          startInMemoryDatabase();
+      }
+      else
+      {
+          startStandaloneDatabase();
+      }
+   }
+
+   /**
+    * We now close the connection clean by calling the
+    * serverSocket throught jdbc. The MBeanServer calls this 
+    * method at closing time.
+    */
+   protected void stopService() throws Exception
+   {
+       if (inMemoryMode)
+       {
+           stopInMemoryDatabase();
+       }
+       else
+       {
+           stopStandaloneDatabase();
+       }
+   }
+   
+   // Private -------------------------------------------------------
+   
+   /**
+    * Start the standalone (in process) database.
+    */
+   private void startStandaloneDatabase() throws Exception
+   {
+       final File h2Dir = checkDataDir() ;
+       
+       dbPath = new File(h2Dir, name);
+
+       final String dbURL = JDBC_URL_PREFIX + dbPath.toURI().toString();
+
+       // Check wee have connectivity
+       final Connection connection = getConnection(dbURL);
+       connection.close() ;
+   }
+
+   /**
+    * Start the only in memory database.
+    */
+   private void startInMemoryDatabase() throws Exception
+   {
+       final String dbURL = JDBC_MEM_URL_PREFIX + name;
+
+       // hold a connection so h2 does not close the database
+       connection = getConnection(dbURL);
+   }
+
+   /**
+    * Stop the standalone (in process) database.
+    */
+   private void stopStandaloneDatabase() throws Exception
+   {
+       // Nothing to do here
+       log.info("Database standalone closed clean");
+   }
+
+   /**
+    * Stop the in memory database.
+    */
+   private void stopInMemoryDatabase() throws Exception
+   {
+       try
+       {
+           connection.close() ;
+       }
+       finally
+       {
+           connection = null;
+       }
+       log.info("Database in memory closed clean");
+   }
+   
+   /**
+    * Get the connection.
+    * 
+    * @param dbURL jdbc url.
+    * @return the connection, allocate one if needed.
+    * @throws Exception
+    */
+   private synchronized Connection getConnection(String dbURL) throws Exception
+   {
+      if (connection == null)
+      {
+         ClassLoader cl = Thread.currentThread().getContextClassLoader();
+         Class.forName(JDBC_DRIVER_CLASS, true, cl).newInstance();
+         connection = DriverManager.getConnection(dbURL, user, password);
+      }
+      return connection;
+   }
+   
+   /**
+    * Check the existence of the h2 data directory.
+    * @return The h2 data directory.
+    * @throws IOException For errors checking/creating the h2 data directory.
+    */
+   private File checkDataDir()
+       throws IOException
+   {
+       // Get the server data directory
+       final File dataDir = ServerConfigLocator.locate().getServerDataDir();
+
+       // Get DB directory
+       final File h2Dir = new File(dataDir, H2_DATA_DIR);
+
+       if (!h2Dir.exists())
+       {
+           h2Dir.mkdirs();
+       }
+       else if (!h2Dir.isDirectory())
+       {
+          throw new IOException("Failed to create directory: " + h2Dir);
+       }
+       return h2Dir ;
+   }
+
+}

Copied: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseMBean.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseMBean.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseMBean.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/H2DatabaseMBean.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.dependencies;
+
+import javax.management.ObjectName;
+
+import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.system.ServiceMBean;
+
+/**
+ * MBean interface.
+ * 
+ * In all cases we run h2 in the same VM with JBoss.
+ * A few notes on h2 running modes:
+ * 
+ * remote (server) mode
+ *    Not supported yet
+ * 
+ * in-process (standalone) mode
+ *    h2 can only be contacted from in-vm clients
+ * 
+ * memory-only mode
+ *    h2 will only keep tables in memory, no persistence of data
+ * 
+ * @version $Revision$
+ */
+public interface H2DatabaseMBean extends ServiceMBean
+{
+   /** The default ObjectName */
+   ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss:service=h2");
+
+   // Attributes ----------------------------------------------------
+
+   /** The database name, default is 'default' */
+   String getDatabase();   
+   void setDatabase(String name);
+
+   /** The default user to use when connecting to the DB, default is "sa" */
+   String getUser();   
+   void setUser(String user);
+   
+   /** The default password to use when connecting to the DB, default is "" */
+   String getPassword();
+   void setPassword(String password);
+   
+   /** The full database path */
+   String getDatabasePath();
+   
+   /** In memory mode */
+   boolean isInMemoryMode() ;
+   void setInMemoryMode(boolean b) ;
+}

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -44,7 +44,10 @@
 import org.jboss.soa.esb.addressing.eprs.JMSEpr;
 import org.jboss.soa.esb.common.Environment;
 import org.jboss.soa.esb.common.ModulePropertyManager;
-import org.jboss.soa.esb.helpers.NamingContext;
+import org.jboss.soa.esb.common.TransactionStrategy;
+import org.jboss.soa.esb.common.TransactionStrategyException;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 
 import com.arjuna.common.util.propertyservice.PropertyManager;
 
@@ -77,7 +80,7 @@
     private Map<Integer,ArrayList<Session>> inUseSessionsMap = new HashMap<Integer,ArrayList<Session>>();
     
     /** Reference to a Queue or Topic Connection, we only need one per pool */
-    private Connection jmsConnection = null;
+    protected Connection jmsConnection = null;
     
     /** The Indentifier of the pool */
     private Map<String, String> poolKey;
@@ -85,9 +88,6 @@
     /** Logger */
     private Logger logger = Logger.getLogger(this.getClass());
     
-    /** Context, which is cached until we encounter a naming exception, or the pool is rebuild */
-    private Context jndiContext;
-    
     /**
      * Contructor of the pool.
      * 
@@ -122,58 +122,59 @@
      * @throws ConnectionException
      */
     private  synchronized void addAnotherSession(Map<String, String> poolKey, final int acknowledgeMode)
-    throws NamingException, JMSException, ConnectionException
+    throws NamingException, JMSException, ConnectionException, NamingContextException
     {
         String destinationType = poolKey.get(JMSEpr.DESTINATION_TYPE_TAG);
-        
+
         //Setup a connection if we don't have one
         if (jmsConnection==null) {
             JmsConnectionPoolContainer.addToPool(poolKey, this);
             logger.debug("Creating a JMS Connection for poolKey : " + poolKey);
             Properties jndiEnvironment = JmsConnectionPoolContainer.getJndiEnvironment(poolKey);
-            jndiContext = NamingContext.getServerContext(jndiEnvironment);
-            String connectionFactoryString = poolKey.get(JMSEpr.CONNECTION_FACTORY_TAG);
-            Object factoryConnection=null;
+            Context jndiContext = NamingContextPool.getNamingContext(jndiEnvironment);
             try {
-                factoryConnection = jndiContext.lookup(connectionFactoryString);
-            } catch (NamingException ne) {
-                logger.info("Received NamingException, refreshing context.");
-                jndiContext = NamingContext.getFreshServerContext(JmsConnectionPoolContainer.getJndiEnvironment(poolKey));
-                factoryConnection = jndiContext.lookup(connectionFactoryString);
-            }
-            final String username = poolKey.get( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG );
-            final String password = poolKey.get( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG );
-            boolean useJMSSecurity = (username != null && password != null);
-            logger.debug( "JMS Security principal [" + username + "] using JMS Security : " + useJMSSecurity );
-            
-            if (JMSEpr.QUEUE_TYPE.equals(destinationType)) {
-                QueueConnectionFactory factory = (QueueConnectionFactory) factoryConnection;
-                jmsConnection = useJMSSecurity ? factory.createQueueConnection(username,password): factory.createQueueConnection();
-            } else {
-                TopicConnectionFactory factory = (TopicConnectionFactory) factoryConnection;
-                jmsConnection = useJMSSecurity ? factory.createTopicConnection(username,password): factory.createTopicConnection();
-            }
-            
-            jmsConnection.setExceptionListener(new ExceptionListener() {
-                public void onException(JMSException arg0)
+                String connectionFactoryString = poolKey.get(JMSEpr.CONNECTION_FACTORY_TAG);
+                Object factoryConnection=null;
+
+                try
                 {
-                    removeSessionPool() ;
+                    factoryConnection = jndiContext.lookup(overrideName(connectionFactoryString));
+                } catch (NamingException ne) {
+                    logger.info("Received NamingException, refreshing context.");
+                    jndiContext = NamingContextPool.replaceNamingContext(jndiContext, JmsConnectionPoolContainer.getJndiEnvironment(poolKey));
+                    factoryConnection = jndiContext.lookup(connectionFactoryString);
                 }
-            }) ;
-            jmsConnection.start();
+                final String username = poolKey.get( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG );
+                final String password = poolKey.get( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG );
+                boolean useJMSSecurity = (username != null && password != null);
+                logger.debug( "JMS Security principal [" + username + "] using JMS Security : " + useJMSSecurity );
+                
+                if (JMSEpr.QUEUE_TYPE.equals(destinationType)) {
+                    QueueConnectionFactory factory = (QueueConnectionFactory) factoryConnection;
+                    jmsConnection = useJMSSecurity ? factory.createQueueConnection(username,password): factory.createQueueConnection();
+                } else {
+                    TopicConnectionFactory factory = (TopicConnectionFactory) factoryConnection;
+                    jmsConnection = useJMSSecurity ? factory.createTopicConnection(username,password): factory.createTopicConnection();
+                }
+                
+                addExceptionListener();
+                
+                jmsConnection.start();
+            } finally {
+                NamingContextPool.releaseNamingContext(jndiContext) ;
+            }
         }
+        final boolean transacted = Boolean.valueOf(poolKey.get(JMSEpr.TRANSACTED_TAG));
         
         //Create a new Session
         ArrayList<Session> freeSessions = freeSessionsMap.get( acknowledgeMode );
-        
+
         if (JMSEpr.QUEUE_TYPE.equals(destinationType)) {
-            logger.debug("Creating a new Queue session.");
-            QueueSession session = ((QueueConnection)jmsConnection).createQueueSession(false,acknowledgeMode);
+            QueueSession session = ((QueueConnection)jmsConnection).createQueueSession(transacted,acknowledgeMode);
                     
             freeSessions.add(session);
         } else if (JMSEpr.TOPIC_TYPE.equals(destinationType)) {
-            logger.debug("Creating a new Topic session.");
-            TopicSession session = ((TopicConnection) jmsConnection).createTopicSession(false,acknowledgeMode);
+            TopicSession session = ((TopicConnection) jmsConnection).createTopicSession(transacted,acknowledgeMode);
             freeSessions.add(session);
         } else {
             throw new ConnectionException("Unknown destination type");
@@ -206,7 +207,12 @@
                 inUseSessions.add(session);
                 return session ;
             } else if (inUseSessions.size()<MAX_SESSIONS) {
-                addAnotherSession(poolKey,acknowledgeMode);
+                try {
+                    addAnotherSession(poolKey,acknowledgeMode);
+                } catch (final NamingContextException nce) {
+                    throw new ConnectionException("Unexpected exception accessing Naming Context", nce) ;
+                }
+                
                 continue ;
             } else {
                 if (emitExpiry)
@@ -274,7 +280,9 @@
 		try
 		{
         	ArrayList<Session> sessions = freeSessionsMap.get(sessionToClose.getAcknowledgeMode());
-        	sessions.add(sessionToClose);
+        	if ( sessions != null )
+	        	sessions.add(sessionToClose);
+        	
             releaseSession(sessionToClose) ;
 		} catch (JMSException e)
 		{
@@ -291,7 +299,8 @@
     	try
 		{
 			ArrayList<Session> inUseSessions = inUseSessionsMap.get(sessionToClose.getAcknowledgeMode());
-            inUseSessions.remove(sessionToClose);
+			if ( inUseSessions != null )
+	            inUseSessions.remove(sessionToClose);
             notifyAll() ;
 		} catch (JMSException e)
 		{
@@ -366,6 +375,21 @@
         return inUseSessionsMap.get(acknowledgeMode).size();
     }
     
+    protected String overrideName (String name) throws ConnectionException
+    {
+	return name;
+    }
+    
+    protected void addExceptionListener () throws JMSException, ConnectionException
+    {
+        jmsConnection.setExceptionListener(new ExceptionListener() {
+            public void onException(JMSException arg0)
+            {
+                removeSessionPool() ;
+            }
+        }) ;
+    }
+    
     static
     {
     	PropertyManager prop = ModulePropertyManager.getPropertyManager(ModulePropertyManager.TRANSPORTS_MODULE);

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -43,7 +43,7 @@
  */
 public class JmsConnectionPoolContainer{
 
-    private static Logger logger = Logger.getLogger(JmsConnectionPoolContainer.class);
+    protected static Logger logger = Logger.getLogger(JmsConnectionPoolContainer.class);
 
     /**
      * The lifecycle resource factory.
@@ -56,6 +56,8 @@
         new LifecycleResource<Map<Map<String, String>, JmsConnectionPool>>(lifecycleJMSPoolFactory,
                 LifecyclePriorities.JMS_CONNECTION_POOL_PRIORITY) ;
 
+    protected static final HashMap<Object, JmsConnectionPool> transactions = new HashMap<Object, JmsConnectionPool>();
+    
     /**
      * Returns the pool given a JMSEpr.
      * 
@@ -66,13 +68,17 @@
      */
     public static JmsConnectionPool getPool(JMSEpr jmsEpr) throws ConnectionException, URISyntaxException
     {
-        return getPool(jmsEpr.getJndiEnvironment()
-                , jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType(), jmsEpr.getJMSSecurityPrincipal(), jmsEpr.getJMSSecurityCredential());
+        return getPool(jmsEpr.getJndiEnvironment(), 
+        		jmsEpr.getConnectionFactory(), 
+        		jmsEpr.getDestinationType(), 
+                jmsEpr.getJMSSecurityPrincipal(), 
+                jmsEpr.getJMSSecurityCredential(),
+                jmsEpr.getTransacted());
     }
     /**
      * Returns the pool given the identifiers for the JMS provider.
      * 
-     * @param enviroment 			- JNDI evironment for which a JMSConnectionPool should be retreived
+     * @param enviroment 			- JNDI environment for which a JMSConnectionPool should be retreived
      * @param connectionFactory		- connectionfactory for which a JMSConnectionPool should be retreived
      * @param destinationType		- destinationType(Queue or Topic) for which a JMSConnectionPool should be retreived
      * @return <code>JmsConnectionPool</code>
@@ -81,8 +87,16 @@
     public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory, String destinationType)
         throws ConnectionException
     {
-    	return getPool(enviroment, connectionFactory, destinationType, null, null);
+    	return getPool(enviroment, connectionFactory, destinationType, null, null, false);
     }
+    public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory, String destinationType,
+    		final String username, final String password)
+        throws ConnectionException
+    {
+    	return getPool( enviroment, connectionFactory, destinationType, username, password, false );
+    	
+    }
+    
     /**
      * Returns the pool given the identifiers for the JMS provider.
      * 
@@ -91,20 +105,24 @@
      * @param destinationType		- destinationType(Queue or Topic) for which a JMSConnectionPool should be retreived
      * @param username				- username that should be used to create the JMS Connection
      * @param password				- password that should be used to create the JMS Connection
+     * @param transacted			- should the JMS Session be transacted
      * @return <code>JmsConnectionPool</code>
      * @throws ConnectionException
      */
     public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory, String destinationType,
-    		final String username, final String password)
+    		final String username, final String password, final boolean transacted)
         throws ConnectionException
     {
-        Map<String,String> poolKey = createPoolKey(enviroment, connectionFactory, destinationType, username, password);
+        Map<String,String> poolKey = createPoolKey(enviroment, connectionFactory, destinationType, username, password, transacted);
         final Map<Map<String, String>, JmsConnectionPool> poolMap = getMap() ;
+  
         if (poolMap.containsKey(poolKey)) {
             return poolMap.get(poolKey);
         } else {
             JmsConnectionPool pool = new JmsConnectionPool(poolKey);
+            
             poolMap.put(poolKey, pool);
+            
             return pool;
         }
     }
@@ -118,7 +136,7 @@
      */
     public static Map<String, String> createPoolKey(Properties  environment, String connectionFactory, String destinationType) 
     {
-    	return createPoolKey( environment, connectionFactory, destinationType, null, null );
+    	return createPoolKey( environment, connectionFactory, destinationType, null, null, false );
     }
     /**
      * Creates a poolKey using the identifying parameters
@@ -131,7 +149,7 @@
      * @return
      */
     public static Map<String, String> createPoolKey(Properties  environment, String connectionFactory, String destinationType,
-    		final String username, final String password) 
+    		final String username, final String password, final boolean transacted) 
     {
         Map<String,String> poolKey = new HashMap<String,String>();
         if (environment!=null) {
@@ -147,6 +165,9 @@
         
         if (connectionFactory!=null)  poolKey.put(JMSEpr.CONNECTION_FACTORY_TAG, connectionFactory);
         if (destinationType!=null)    poolKey.put(JMSEpr.DESTINATION_TYPE_TAG, destinationType);
+        
+        poolKey.put(JMSEpr.TRANSACTED_TAG, String.valueOf(transacted));
+        
         return poolKey;
     }
     /**
@@ -248,4 +269,4 @@
             }
         }
     }
-}
+}
\ No newline at end of file

Copied: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa)

Deleted: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPool.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPool.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPool.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,160 +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.internal.soa.esb.rosetta.pooling.xa;
-
-import java.util.Map;
-
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Session;
-import javax.naming.NamingException;
-
-import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
-import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
-import org.jboss.soa.esb.common.TransactionStrategy;
-import org.jboss.soa.esb.common.TransactionStrategyException;
-
-/**
- * One instance per global transaction.
- * 
- * @author marklittle
- * 
- */
-
-public class XaJmsConnectionPool extends JmsConnectionPool
-{
-    public XaJmsConnectionPool(Map<String, String> poolKey)
-    {
-	super(poolKey);
-    }
-
-    public XaJmsConnectionPool(Map<String, String> poolKey, int poolSize,
-	    int sleepTime)
-    {
-	super(poolKey, poolSize, sleepTime);
-    }
-
-    public boolean active ()
-    {
-	return _active;
-    }
-
-    public void terminated ()
-    {
-	_active = false;
-    }
-
-    /*
-     * Make sure we return the same connection during the transaction.
-     * @see org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool#getSession(int)
-     */
-    public synchronized Session getSession (final int acknowledgeMode)
-	    throws NamingException, JMSException, ConnectionException
-    {
-	if (_theSession == null)
-	    _theSession = super.getSession(acknowledgeMode);
-
-	return _theSession;
-    }
-
-    public synchronized void closeSession (Session sessionToClose)
-    {
-	// not within the scope of a transaction!
-    }
-
-    public synchronized void releaseSession (final Session sessionToClose)
-    {
-	// not within the scope of a transaction!
-    }
-
-    public synchronized void removeSessionPool()
-    {
-	// ignore and let Synchronization cleanup for us.
-    }
-    
-    public synchronized void removeTxSessionPool()
-    {
-	super.closeSession(_theSession);
-	_theSession = null;
-	
-	super.removeSessionPool();
-    }
-    
-    protected String overrideName (String name) throws ConnectionException
-    {
-	try
-	{
-	    /*
-                 * If there is a global transaction in place then make sure we
-                 * grab the right connection, irrespective of the provider info.
-                 */
-
-	    if (TransactionStrategy.getTransactionStrategy(true)
-		    .getTransaction() != null)
-	    {
-		if (("XAConnectionFactory".equals(name))
-			|| ("ConnectionFactory".equals(name)))
-		    return "java:/JmsXA";
-	    }
-
-	    return name;
-	}
-	catch (TransactionStrategyException ex)
-	{
-	    throw new ConnectionException(ex);
-	}
-    }
-
-    protected void addExceptionListener () throws JMSException,
-	    ConnectionException
-    {
-	/*
-         * It is illegal to set ExceptionListeners if we are within a
-         * transaction.
-         */
-
-	try
-	{
-	    TransactionStrategy txStrategy = TransactionStrategy
-		    .getTransactionStrategy(true);
-
-	    if ((txStrategy != null) && (txStrategy.getTransaction() == null))
-	    {
-		jmsConnection.setExceptionListener(new ExceptionListener()
-		{
-		    public void onException (JMSException arg0)
-		    {
-			removeSessionPool();
-		    }
-		});
-	    }
-	}
-	catch (TransactionStrategyException ex)
-	{
-	    throw new ConnectionException(ex);
-	}
-    }
-
-    private boolean _active = true;
-
-    private Session _theSession = null;
-}

Copied: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPool.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPool.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPool.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPool.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,160 @@
+/*
+ * 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.internal.soa.esb.rosetta.pooling.xa;
+
+import java.util.Map;
+
+import javax.jms.ExceptionListener;
+import javax.jms.JMSException;
+import javax.jms.Session;
+import javax.naming.NamingException;
+
+import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
+import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
+import org.jboss.soa.esb.common.TransactionStrategy;
+import org.jboss.soa.esb.common.TransactionStrategyException;
+
+/**
+ * One instance per global transaction.
+ * 
+ * @author marklittle
+ * 
+ */
+
+public class XaJmsConnectionPool extends JmsConnectionPool
+{
+    public XaJmsConnectionPool(Map<String, String> poolKey)
+    {
+	super(poolKey);
+    }
+
+    public XaJmsConnectionPool(Map<String, String> poolKey, int poolSize,
+	    int sleepTime)
+    {
+	super(poolKey, poolSize, sleepTime);
+    }
+
+    public boolean active ()
+    {
+	return _active;
+    }
+
+    public void terminated ()
+    {
+	_active = false;
+    }
+
+    /*
+     * Make sure we return the same connection during the transaction.
+     * @see org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool#getSession(int)
+     */
+    public synchronized Session getSession (final int acknowledgeMode)
+	    throws NamingException, JMSException, ConnectionException
+    {
+	if (_theSession == null)
+	    _theSession = super.getSession(acknowledgeMode);
+
+	return _theSession;
+    }
+
+    public synchronized void closeSession (Session sessionToClose)
+    {
+	// not within the scope of a transaction!
+    }
+
+    public synchronized void releaseSession (final Session sessionToClose)
+    {
+	// not within the scope of a transaction!
+    }
+
+    public synchronized void removeSessionPool()
+    {
+	// ignore and let Synchronization cleanup for us.
+    }
+    
+    public synchronized void removeTxSessionPool()
+    {
+	super.closeSession(_theSession);
+	_theSession = null;
+	
+	super.removeSessionPool();
+    }
+    
+    protected String overrideName (String name) throws ConnectionException
+    {
+	try
+	{
+	    /*
+                 * If there is a global transaction in place then make sure we
+                 * grab the right connection, irrespective of the provider info.
+                 */
+
+	    if (TransactionStrategy.getTransactionStrategy(true)
+		    .getTransaction() != null)
+	    {
+		if (("XAConnectionFactory".equals(name))
+			|| ("ConnectionFactory".equals(name)))
+		    return "java:/JmsXA";
+	    }
+
+	    return name;
+	}
+	catch (TransactionStrategyException ex)
+	{
+	    throw new ConnectionException(ex);
+	}
+    }
+
+    protected void addExceptionListener () throws JMSException,
+	    ConnectionException
+    {
+	/*
+         * It is illegal to set ExceptionListeners if we are within a
+         * transaction.
+         */
+
+	try
+	{
+	    TransactionStrategy txStrategy = TransactionStrategy
+		    .getTransactionStrategy(true);
+
+	    if ((txStrategy != null) && (txStrategy.getTransaction() == null))
+	    {
+		jmsConnection.setExceptionListener(new ExceptionListener()
+		{
+		    public void onException (JMSException arg0)
+		    {
+			removeSessionPool();
+		    }
+		});
+	    }
+	}
+	catch (TransactionStrategyException ex)
+	{
+	    throw new ConnectionException(ex);
+	}
+    }
+
+    private boolean _active = true;
+
+    private Session _theSession = null;
+}

Deleted: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPoolContainer.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPoolContainer.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPoolContainer.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,114 +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.internal.soa.esb.rosetta.pooling.xa;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.transaction.Synchronization;
-
-import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
-import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
-import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPoolContainer;
-import org.jboss.internal.soa.esb.rosetta.pooling.xa.XaJmsConnectionPool;
-import org.jboss.soa.esb.common.TransactionStrategy;
-import org.jboss.soa.esb.common.TransactionStrategyException;
-
-public class XaJmsConnectionPoolContainer extends JmsConnectionPoolContainer
-{
-
-    public static JmsConnectionPool getPool (Properties enviroment,
-	    String connectionFactory, String destinationType,
-	    final String username, final String password,
-	    final boolean transacted, final Object transaction)
-	    throws ConnectionException
-    {
-	synchronized (transactions)
-	{
-	    JmsConnectionPool connection = transactions.get(transaction);
-
-	    if (connection == null)
-	    {
-		// we could override the connectionfactory name here ...
-		// in fact we could change all of the info here if necessary ...
-		
-		Map<String, String> poolKey = createPoolKey(enviroment,
-			connectionFactory, destinationType, username, password,
-			true);  // force transacted to be true
-		XaJmsConnectionPool pool = new XaJmsConnectionPool(poolKey);
-
-		transactions.put(transaction, pool);
-
-		TransactionStrategy tx = TransactionStrategy
-			.getTransactionStrategy(true);
-
-		try
-		{
-		    tx.registerSynchronization(new PoolSynchronization(
-			    transactions, pool));
-		}
-		catch (TransactionStrategyException ex)
-		{
-		    logger.warn("Problem when enlisting synchronization", ex);
-
-		    throw new ConnectionException(ex);
-		}
-
-		return pool;
-	    }
-	    else
-		return connection;
-	}
-    }
-
-}
-
-class PoolSynchronization implements Synchronization
-{
-    PoolSynchronization(HashMap<Object, JmsConnectionPool> transactions,
-	    XaJmsConnectionPool pool)
-    {
-	_transactions = transactions;
-	_pool = pool;
-    }
-
-    public void beforeCompletion ()
-    {
-    }
-
-    public void afterCompletion (int status) // we don't care about the
-                                                // status
-    {
-	_pool.removeTxSessionPool();
-	_pool.terminated();
-	
-	synchronized (_transactions)
-	{
-	    _transactions.remove(_pool);
-	}
-    }
-
-    private HashMap<Object, JmsConnectionPool> _transactions;
-
-    private XaJmsConnectionPool _pool;
-}

Copied: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPoolContainer.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPoolContainer.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPoolContainer.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/xa/XaJmsConnectionPoolContainer.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,114 @@
+/*
+ * 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.internal.soa.esb.rosetta.pooling.xa;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.transaction.Synchronization;
+
+import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
+import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
+import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPoolContainer;
+import org.jboss.internal.soa.esb.rosetta.pooling.xa.XaJmsConnectionPool;
+import org.jboss.soa.esb.common.TransactionStrategy;
+import org.jboss.soa.esb.common.TransactionStrategyException;
+
+public class XaJmsConnectionPoolContainer extends JmsConnectionPoolContainer
+{
+
+    public static JmsConnectionPool getPool (Properties enviroment,
+	    String connectionFactory, String destinationType,
+	    final String username, final String password,
+	    final boolean transacted, final Object transaction)
+	    throws ConnectionException
+    {
+	synchronized (transactions)
+	{
+	    JmsConnectionPool connection = transactions.get(transaction);
+
+	    if (connection == null)
+	    {
+		// we could override the connectionfactory name here ...
+		// in fact we could change all of the info here if necessary ...
+		
+		Map<String, String> poolKey = createPoolKey(enviroment,
+			connectionFactory, destinationType, username, password,
+			true);  // force transacted to be true
+		XaJmsConnectionPool pool = new XaJmsConnectionPool(poolKey);
+
+		transactions.put(transaction, pool);
+
+		TransactionStrategy tx = TransactionStrategy
+			.getTransactionStrategy(true);
+
+		try
+		{
+		    tx.registerSynchronization(new PoolSynchronization(
+			    transactions, pool));
+		}
+		catch (TransactionStrategyException ex)
+		{
+		    logger.warn("Problem when enlisting synchronization", ex);
+
+		    throw new ConnectionException(ex);
+		}
+
+		return pool;
+	    }
+	    else
+		return connection;
+	}
+    }
+
+}
+
+class PoolSynchronization implements Synchronization
+{
+    PoolSynchronization(HashMap<Object, JmsConnectionPool> transactions,
+	    XaJmsConnectionPool pool)
+    {
+	_transactions = transactions;
+	_pool = pool;
+    }
+
+    public void beforeCompletion ()
+    {
+    }
+
+    public void afterCompletion (int status) // we don't care about the
+                                                // status
+    {
+	_pool.removeTxSessionPool();
+	_pool.terminated();
+	
+	synchronized (_transactions)
+	{
+	    _transactions.remove(_pool);
+	}
+    }
+
+    private HashMap<Object, JmsConnectionPool> _transactions;
+
+    private XaJmsConnectionPool _pool;
+}

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/actions/Aggregator.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/actions/Aggregator.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/actions/Aggregator.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -70,7 +70,7 @@
     public final static String SPLITTER_TIME_STAMP = "splitterTimeStamp";
     
     private Map<String, Map< Integer, Message > > aggregatedMessageMap
-        = new ConcurrentHashMap< String, Map< Integer, Message > >();
+        = new ConcurrentHashMap< String, Map< Integer, Message > >();  // can probably change this to a vanilla Map now
     private TimeoutChecker _timeoutChecker=null;
     
     protected ConfigTree config;
@@ -84,10 +84,21 @@
 	public Aggregator(ConfigTree config) throws ConfigurationException, RegistryException
 	{        
         this.config = config;
-        String timeoutAttr = config.getRequiredAttribute("timeoutInMillies");
+        String timeoutAttr = config.getAttribute("timeoutInMillies", null);
         
         if (timeoutAttr != null)
-        	timeoutInMillies = Long.valueOf(config.getRequiredAttribute("timeoutInMillies"));
+        {
+        	try
+        	{
+        		timeoutInMillies = Long.valueOf(timeoutAttr);
+        	}
+        	catch (NumberFormatException ex)
+        	{
+        		logger.error("Invalid value for timeoutInMillies: "+timeoutAttr);
+        		
+        		throw new ConfigurationException(ex);
+        	}
+        }
         
         logger.debug("Aggregator config:  timeoutInMillies=" + timeoutInMillies);
         splitId = config.getAttribute("splitId");
@@ -109,7 +120,7 @@
     }
 
     public Map<String, Map<Integer, Message>> getAggregatedMessageMap() {
-        return aggregatedMessageMap;
+    		return aggregatedMessageMap;
     }
 
     /**
@@ -150,37 +161,40 @@
             // Set the timestamp on the message... used by the TimeoutChecker...
             message.getProperties().setProperty(SPLITTER_TIME_STAMP, aggrDetails.getSeriesTimestamp());
 
-            Map<Integer, Message> messageMap = aggregatedMessageMap.get(aggrDetails.getSeriesUuid());
-            if (isTimedOut(aggrDetails.getSeriesTimestamp())) {
-                if (messageMap != null) {
-                    //add the message in if we don't already have it
-                    if (!messageMap.containsKey(aggrDetails.getMessageNumber())) {
-                         messageMap.put(aggrDetails.getMessageNumber(), message);
-                    }
-                    //Just going to send out what we have this far, which will remove this key
-                    //so subsequent messages with this uuId will be ignored
-                    message = createAggregateMessage(aggrDetails.getSeriesUuid(), messageMap);
-                } else {
-                    logger.debug("Ignoring this message since we are already timedout on this message.");
-                    //ignoring this message
-                    message = null;
-                }
-            } else {
-                //Get the messageMap with this uuId, or create it if not found
-                if (messageMap == null) {
-                    messageMap = new ConcurrentHashMap<Integer, Message>();
-                    aggregatedMessageMap.put(aggrDetails.getSeriesUuid(), messageMap);
-                }
-                if (messageMap.containsKey(aggrDetails.getMessageNumber())) {
-                    logger.warn("Received duplicate message, ignoring it but this should not happen.");
-                } else {
-                    messageMap.put(aggrDetails.getMessageNumber(), message);
-                }
-                if (messageMap.size() == aggrDetails.getSeriesSize()) {
-                    message = createAggregateMessage(aggrDetails.getSeriesUuid(), messageMap);
-                } else {
-                    message = null;
-                }
+            synchronized (aggregatedMessageMap)
+            {
+            	Map<Integer, Message> messageMap = aggregatedMessageMap.get(aggrDetails.getSeriesUuid());
+            	if (isTimedOut(aggrDetails.getSeriesTimestamp())) {
+            		if (messageMap != null) {
+            			//add the message in if we don't already have it
+            			if (!messageMap.containsKey(aggrDetails.getMessageNumber())) {
+            				messageMap.put(aggrDetails.getMessageNumber(), message);
+            			}
+            			//Just going to send out what we have this far, which will remove this key
+            			//so subsequent messages with this uuId will be ignored
+            			message = createAggregateMessage(aggrDetails.getSeriesUuid(), messageMap);
+            		} else {
+            			logger.debug("Ignoring this message since we are already timedout on this message.");
+            			//ignoring this message
+            			message = null;
+            		}
+            	} else {
+            		//Get the messageMap with this uuId, or create it if not found
+            		if (messageMap == null) {
+            			messageMap = new ConcurrentHashMap<Integer, Message>();
+            			aggregatedMessageMap.put(aggrDetails.getSeriesUuid(), messageMap);
+            		}
+            		if (messageMap.containsKey(aggrDetails.getMessageNumber())) {
+            			logger.warn("Received duplicate message, ignoring it but this should not happen.");
+            		} else {
+            			messageMap.put(aggrDetails.getMessageNumber(), message);
+            		}
+            		if (messageMap.size() == aggrDetails.getSeriesSize()) {
+            			message = createAggregateMessage(aggrDetails.getSeriesUuid(), messageMap);
+            		} else {
+            			message = null;
+            		}
+            	}
             }
         } else {
             // Just aggregate the single message...
@@ -298,7 +312,11 @@
                 throw new ActionProcessingException("Message attachment serialization failure", e);
             }
         }
-        aggregatedMessageMap.remove(uuId);
+        
+        synchronized (aggregatedMessageMap)
+        {
+        	aggregatedMessageMap.remove(uuId);
+        }
         //TODO remove messageMap from permanent storage, or do that per message in the loop above using value of the aggregatorTag
         //remove from the notificationMap if it is in there.
         
@@ -373,14 +391,15 @@
             while(running) {
                 //no need to check if no timeout is set
                 if (timeoutInMillies!=null) {
+                	// is a snapshot so no lock needed
                     for (Map<Integer, Message > messageMap : aggregatedMessageMap.values()) {
                         //Check the first message, they all have the same time stamp
                         Message message = messageMap.values().iterator().next();
                         long timeStamp = (Long) message.getProperties().getProperty(SPLITTER_TIME_STAMP);
                         
                         if (isTimedOut(timeStamp)) {
-                            //We found a timed-out message. Let's go notify ourselves about by resending a message,
-                            //it if we haven't done so already
+                            //We found a timed-out message. Let's go notify ourselves about it by resending a message,
+                            //if we haven't done so already
                             List<String> aggregatorTag = getAggregatorTags(message);
                             if(aggregatorTag != null && !aggregatorTag.isEmpty()) {
                                 AggregationDetails aggrDetails = new AggregationDetails(aggregatorTag.get(aggregatorTag.size() - 1));
@@ -394,7 +413,10 @@
                                 } catch(Throwable e) {
                                     logger.error("Error delivering timed out aggregation message to Dead Letter Service.", e);
                                 } finally {
-                                    aggregatedMessageMap.remove(aggrDetails.getSeriesUuid());
+                                	synchronized (aggregatedMessageMap)
+                                	{
+                                		aggregatedMessageMap.remove(aggrDetails.getSeriesUuid());
+                                	}
                                 }
                             }
                         }

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/actions/routing/JMSRouter.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -50,7 +50,8 @@
 import org.jboss.soa.esb.common.Configuration;
 import org.jboss.soa.esb.helpers.ConfigTree;
 import org.jboss.soa.esb.helpers.KeyValuePair;
-import org.jboss.soa.esb.helpers.NamingContext;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 import org.jboss.soa.esb.notification.jms.DefaultJMSPropertiesSetter;
 import org.jboss.soa.esb.notification.jms.JMSPropertiesSetter;
 import org.jboss.soa.esb.util.Util;
@@ -329,38 +330,41 @@
         
         // TODO: Modify to support topic destinations too
 
-        private JMSSendQueueSetup(String queueName) throws NamingException, JMSException, ConnectionException  {
+        private JMSSendQueueSetup(String queueName) throws NamingException, JMSException, ConnectionException, NamingContextException  {
             environment = new Properties();
             environment.setProperty(Context.PROVIDER_URL, Configuration.getJndiServerURL());
             environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, Configuration.getJndiServerContextFactory());
             environment.setProperty(Context.URL_PKG_PREFIXES, Configuration.getJndiServerPkgPrefix());
-            Context oCtx = NamingContext.getServerContext(environment);
-            pool = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory", JMSEpr.QUEUE_TYPE);
-            
-            this.queueName = queueName;
-            
-            jmsSession = pool.getQueueSession();
-            boolean clean = true ;
+            Context oCtx = NamingContextPool.getNamingContext(environment);
             try {
+                pool = JmsConnectionPoolContainer.getPool(environment, "ConnectionFactory", JMSEpr.QUEUE_TYPE);
+                
+                this.queueName = queueName;
+                
+                jmsSession = pool.getQueueSession();
+                boolean clean = true ;
                 try {
-                	jmsQueue = (Queue) oCtx.lookup(queueName);
-                } catch (NamingException ne) {
                     try {
-                        oCtx = NamingContext.getFreshServerContext(environment);
-                        jmsQueue = (Queue) oCtx.lookup(queueName);
-                    } catch (NamingException nex) {
-                        //ActiveMQ
-                        jmsQueue = jmsSession.createQueue(queueName);
+                    	jmsQueue = (Queue) oCtx.lookup(queueName);
+                    } catch (NamingException ne) {
+                        try {
+                            oCtx = NamingContextPool.replaceNamingContext(oCtx, environment);
+                            jmsQueue = (Queue) oCtx.lookup(queueName);
+                        } catch (NamingException nex) {
+                            //ActiveMQ
+                            jmsQueue = jmsSession.createQueue(queueName);
+                        }
                     }
+                    jmsProducer = jmsSession.createSender(jmsQueue);
+                    clean = false ;
+                } finally {
+                    if (clean) {
+                        pool.closeSession(jmsSession) ;
+                    }
                 }
-                jmsProducer = jmsSession.createSender(jmsQueue);
-                clean = false ;
             } finally {
-                if (clean) {
-                    pool.closeSession(jmsSession) ;
-                }
+                NamingContextPool.releaseNamingContext(oCtx) ;
             }
-            
         }
         
         public void setDeliveryMode(final int deliveryMode ) throws JMSException

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -88,6 +88,8 @@
 	
 	public static final String PERSISTENT_TAG = "persistent";
 	
+	public static final String TRANSACTED_TAG = "transacted";
+	
 	/**
 	 * JMS Client acknowledgment mode configuration tag
 	 */
@@ -203,6 +205,13 @@
                     } else if (tag.equals(DESTINATION_TYPE_TAG)) { 
                          getAddr().addExtension(DESTINATION_TYPE_TAG, nl.item(i).getTextContent()); 
 	                   } 
+					} else if (tag.equals(TRANSACTED_TAG)) {
+						boolean transacted = false;
+						final String transactedStr = nl.item(i).getTextContent();
+						if ( transactedStr != null )
+							transacted = Boolean.parseBoolean(transactedStr);
+						                 	
+				    	getAddr().addExtension(TRANSACTED_TAG, String.valueOf(transacted));
 				}
 			}
 		}
@@ -298,7 +307,7 @@
 			String destinationName, String connection, Properties environment,
 			String messageSelector, boolean peristent)
 	{
-		this(protocol,destinationType,destinationName,connection,environment,messageSelector,peristent,DEFAULT_ACKNOWLEDGE_MODE);
+		this(protocol, destinationType, destinationName, connection, environment, messageSelector, peristent, DEFAULT_ACKNOWLEDGE_MODE);
 	}
 	
 	/**
@@ -318,15 +327,72 @@
 	 *            reference to the connection factory.
 	 * @param peristent
 	 *            true if messages should be sent persistently
+	 */
+	public JMSEpr(String protocol, String destinationType,
+			String destinationName, String connection, Properties environment,
+			String messageSelector, boolean peristent,
+			boolean transacted)
+	{
+		this(protocol, destinationType, destinationName, connection, environment, messageSelector, peristent, DEFAULT_ACKNOWLEDGE_MODE, transacted);
+	}
+	
+	/**
+	 * Create a new JMS EPR.
+	 * 
+	 * @param protocol
+	 *            the protocol version.
+	 * @param destinationType
+	 *            the type of destination (queue/topic).
+	 * @param destinationName
+	 *            name of the queue/topic.
+	 * @param connection
+	 *            reference to the connection factory.
+	 * @param environment
+	 *            reference to the jndi properties
+	 * @param messageSelector
+	 *            reference to the connection factory.
+	 * @param peristent
+	 *            true if messages should be sent persistently
 	 * @param acknowledgeModeStr
 	 *            JMS client acknowledgement mode
+	 * @param transacted           
+	 *            true if the jms session should be transaction aware
 	 */
 	public JMSEpr(String protocol, String destinationType,
 			String destinationName, String connection, Properties environment,
+			String messageSelector, boolean peristent, String acknowledgeModeStr,
+			boolean transacted)
+	{
+		this( protocol, destinationType, destinationName, connection, environment,
+				messageSelector, peristent, acknowledgeModeStr, null, null, transacted );
+	}
+	
+	/**
+	 * Create a new JMS EPR.
+	 * 
+	 * @param protocol
+	 *            the protocol version.
+	 * @param destinationType
+	 *            the type of destination (queue/topic).
+	 * @param destinationName
+	 *            name of the queue/topic.
+	 * @param connection
+	 *            reference to the connection factory.
+	 * @param environment
+	 *            reference to the jndi properties
+	 * @param messageSelector
+	 *            reference to the connection factory.
+	 * @param peristent
+	 *            true if messages should be sent persistently
+	 * @param acknowledgeModeStr
+	 *            JMS client acknowledgement mode
+	 */
+	public JMSEpr(String protocol, String destinationType,
+			String destinationName, String connection, Properties environment,
 			String messageSelector, boolean peristent, String acknowledgeModeStr)
 	{
 		this( protocol, destinationType, destinationName, connection, environment,
-				messageSelector, peristent, acknowledgeModeStr, null, null );
+				messageSelector, peristent, acknowledgeModeStr, null, null, false );
 	}
 	
 	/**
@@ -349,14 +415,52 @@
 	 * @param acknowledgeModeStr
 	 *            JMS client acknowledgement mode
 	 * @param username
+	 *            username to use when creating JMS connections
+	 * @param password
+	 *            password to use when creating JMS connections
+	 */
+	public JMSEpr(String protocol, String destinationType,
+			String destinationName, String connection, Properties environment,
+			String messageSelector, boolean peristent, String acknowledgeModeStr,
+			String username, String password)
+	{
+		this( protocol, destinationType, destinationName, connection, environment,
+				messageSelector, peristent, acknowledgeModeStr, username, password, false );
+		
+	}
+	
+	/**
+	 * Create a new JMS EPR.
+	 * 
+	 * @param protocol
+	 *            the protocol version.
+	 * @param destinationType
+	 *            the type of destination (queue/topic).
+	 * @param destinationName
+	 *            name of the queue/topic.
+	 * @param connection
+	 *            reference to the connection factory.
+	 * @param environment
+	 *            reference to the jndi properties
+	 * @param messageSelector
+	 *            reference to the connection factory.
+	 * @param peristent
+	 *            true if messages should be sent persistently
+	 * @param acknowledgeModeStr
+	 *            JMS client acknowledgement mode
+	 * @param username
 	 *            JMS destination username
 	 * @param password
 	 *            JMS destination password
+	 * @param transacted           
+	 *            true if the jms session should be transaction aware
+	 *            
 	 */
 	public JMSEpr(String protocol, String destinationType,
 			String destinationName, String connection, Properties environment,
 			String messageSelector, boolean peristent, String acknowledgeModeStr,
-			String username, String password)
+			String username, String password,
+			boolean transacted)
 	{
 		// how many of these do we really need? modify accordingly.
 
@@ -421,6 +525,8 @@
 				
 				if(password != null)
 					addr.addExtension(JMS_SECURITY_CREDENTIAL_TAG, password);
+				
+				addr.addExtension(TRANSACTED_TAG, String.valueOf(transacted));
 					
 			}
 			else
@@ -568,6 +674,14 @@
 		final String password = getAddr().getExtensionValue(JMS_SECURITY_CREDENTIAL_TAG);
 		return password == null || password.equals("null") ? null : password;
 	}
+	
+	/**
+	 * @return the delivery mode
+	 */
+	public final boolean getTransacted()
+	{
+		return Boolean.parseBoolean(getAddr().getExtensionValue(TRANSACTED_TAG));
+	}
 
 	public EPR copy ()
 	{

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/addressing/util/DefaultFaultTo.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/addressing/util/DefaultFaultTo.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/addressing/util/DefaultFaultTo.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -40,15 +40,27 @@
      */
 	public static boolean initialiseReply(final Message message, final Call callDetails)
 	{
-		return DefaultReplyTo.initialiseReply(message, callDetails, getFaultTo(callDetails)) ;
+		return initialiseReply(message, callDetails, false) ;
 	}
+
+    /**
+     * Initialise the message as a reply to the specified call details.
+     * @param message The reply message.
+     * @param callDetails The call details used to generate the reply.
+     * @param oneWay True if this is a one way invocation.
+     * @return true if the message was initialised, false otherwise.
+     */
+    public static boolean initialiseReply(final Message message, final Call callDetails, final boolean oneWay)
+    {
+        return DefaultReplyTo.initialiseReply(message, callDetails, getFaultTo(callDetails, oneWay)) ;
+    }
 	
     /**
      * Get the appropriate faultTo address..
      * @param callDetails The call details used to generate the reply.
      * @return The faultTo address or null if none set.
      */
-	static EPR getFaultTo(final Call callDetails)
+	static EPR getFaultTo(final Call callDetails, final boolean oneWay)
 	{
 		if (callDetails == null)
 		{
@@ -60,9 +72,10 @@
 		{
 			return faultTo ;
 		}
-		else
+		else if (!oneWay)
 		{
 			return DefaultReplyTo.getReplyTo(callDetails) ;
 		}
+		return null ;
 	}
 }
\ No newline at end of file

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -33,6 +33,8 @@
 import org.jboss.soa.esb.addressing.PortReference;
 import org.jboss.soa.esb.addressing.util.DefaultReplyTo;
 import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
 import org.jboss.soa.esb.couriers.Courier;
 import org.jboss.soa.esb.couriers.CourierException;
 import org.jboss.soa.esb.couriers.CourierFactory;
@@ -57,6 +59,13 @@
  * Manages loading of {@link EPR EPRs}, {@link Courier} selection and
  * message delivery. Provides a unified/simplified interface for message
  * delivery.
+ * 
+ * The ServiceInvoker will cache entries from the registry for the relevant
+ * service. This cache will be refreshed under the following conditions:
+ * 
+ * (i) all of the entries fail on a delivery attempt.
+ * (ii) the cache times out (see property org.jboss.soa.esb.registry.cache.life): default is
+ * 60 seconds.
  *
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
@@ -67,6 +76,12 @@
     public static final String DELIVER_TO = "org.jboss.soa.esb.deliver.to";
     
     /**
+     * Remove (suspected) dead EPRs.
+     */
+    
+    private static boolean removeDeadEprs;
+    
+    /**
      * Class logger.
      */
     private static Logger logger = Logger.getLogger(ServiceInvoker.class);
@@ -255,6 +270,7 @@
      */
     private Message post(Message message, EPRInvoker eprInvoker) throws MessageDeliverException, FaultMessageException {
         boolean staleEPRCache = true;
+        boolean initialPass = true;
         //We are removing dead EPRs from the serviceClusterInfo. *Previous* deliveries maybe have
         //removed EPRs that have now come back to life. We should try once more to pull a fresh list of EPRS
         //from the registry before we give up (and fail-over to redelivery at a later time in the care
@@ -265,7 +281,22 @@
         while (staleEPRCache) {
             if ((serviceClusterInfo.getEPRs().size() == 0) || (new Date().after(expirationDate))) {
                 loadServiceClusterInfo();
-                staleEPRCache=false;
+                
+                if (initialPass && (serviceClusterInfo.getEPRs().size() == 0)) // zero from a previoud send
+                {
+                	/*
+                	 * We need to check to see if this instance used up all of it's attempts to deliver
+                	 * in a previous deliver or we'll only refresh the cache once per subsequent send
+                	 * because we will have exhausted the EPRs in the cache, i.e., size==0.
+                	 * 
+                	 * When the instance is originally created we do an initial cache fetch. Until this
+                	 * check, that cache fetch was not being done again after a complete failure. Unlikely
+                	 * to cause problems anyway, but possible.
+                	 */
+                	initialPass = false;
+                }
+                else
+                	staleEPRCache = false;
             }
             Message replyMessage;
             EPR epr;
@@ -281,6 +312,14 @@
 	                    logger.info("Unresponsive EPR: " + epr+" for message: "+message.getHeader());
 	                    
 	                    serviceClusterInfo.removeDeadEPR(epr);
+	                    
+	                    /*
+	                     * So far we've only removed the EPR from the cache. Should we
+	                     * also remove it from the registry?
+	                     */
+	                    
+	                    if (removeDeadEprs)
+	                    	RegistryUtil.unregister(service.getCategory(), service.getName(), epr);
 	                }
             	}
             	catch (MalformedEPRException ex)  // so we can differentiate failure modes, since returning null is limiting
@@ -288,6 +327,10 @@
             		logger.info("Invalid EPR for service (probably ESB-unaware): ignoring for message: "+message.getHeader());
             		
             		serviceClusterInfo.removeDeadEPR(epr);
+            		
+            		/*
+            		 * DO NOT remove from the registry - it is not dead!!
+            		 */
             	}
             }
         }
@@ -499,4 +542,18 @@
             return null;
         }
     }
+    
+    static
+    {
+    	String pruneDead = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE).getProperty(Environment.REMOVE_DEAD_EPR, "false");
+    	
+    	if ("true".equalsIgnoreCase(pruneDead))
+    	{
+    		removeDeadEprs = true;
+    	}
+    	else
+    	{
+    		removeDeadEprs = false;
+    	}
+    }
 }

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/Configuration.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/Configuration.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/Configuration.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -26,12 +26,14 @@
 
 import javax.jms.ConnectionFactory;
 import javax.naming.Context;
+import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
 import org.apache.log4j.Logger;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.helpers.KeyValuePair;
-import org.jboss.soa.esb.helpers.NamingContext;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 
 public class Configuration
 {
@@ -340,43 +342,48 @@
 	 * <p/>
 	 * The module/section parameters are:
 	 * <ol>
-	 * 	<li><b>{@link Context#PROVIDER_URL}</b>: Value defaults to "{@link NamingContext#JBOSS_PROVIDER_URL}".</li>
-	 * 	<li><b>{@link Context#INITIAL_CONTEXT_FACTORY}</b>: Value defaults to "{@link NamingContext#JBOSS_INITIAL_CONTEXT_FACTORY}".</li>
-	 * 	<li><b>{@link Context#URL_PKG_PREFIXES}</b>: Value defaults to "{@link NamingContext#JBOSS_URL_PKG_PREFIX}".</li>
+	 * 	<li><b>{@link Context#PROVIDER_URL}</b>: Value defaults to "{@link Environment#JBOSS_PROVIDER_URL}".</li>
+	 * 	<li><b>{@link Context#INITIAL_CONTEXT_FACTORY}</b>: Value defaults to "{@link Environment#JBOSS_INITIAL_CONTEXT_FACTORY}".</li>
+	 * 	<li><b>{@link Context#URL_PKG_PREFIXES}</b>: Value defaults to "{@link Environment#JBOSS_URL_PKG_PREFIX}".</li>
 	 * </ol>
 	 * 
 	 * @param contextModuleName Conficuration module/section name.
 	 * @return The context instance.
 	 * @throws ConfigurationException Unable to connect to context.
+	 * 
+	 * @deprecated {@link org.jboss.soa.esb.helpers.NamingContextPool}
 	 */
 	public static Context getNamingContext(String contextModuleName) throws ConfigurationException {
-		String providerUrl = ModulePropertyManager.getPropertyManager(contextModuleName).getProperty(Context.PROVIDER_URL, NamingContext.JBOSS_PROVIDER_URL);
-		String initialContextFactory = ModulePropertyManager.getPropertyManager(contextModuleName).getProperty(Context.INITIAL_CONTEXT_FACTORY, NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY);
-		String urlPackagePrefix = ModulePropertyManager.getPropertyManager(contextModuleName).getProperty(Context.URL_PKG_PREFIXES, NamingContext.JBOSS_URL_PKG_PREFIX);
-		Properties environment = new Properties();
-        environment.setProperty(Context.PROVIDER_URL, providerUrl);
-        environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory);
-        environment.setProperty(Context.URL_PKG_PREFIXES, urlPackagePrefix);
+	    final Properties environment = getProperties(contextModuleName) ;
 		
-        Context context = NamingContext.getServerContext(environment);
-		if(context == null) {
-			// Would be nice if NamingContext.getServerContext threw an exception with
-			// details attached.
-			throw new ConfigurationException("Failed to JNDI context [" + contextModuleName + "].");
-		}
-		
-		return context;
+        try {
+            return new InitialContext(environment) ;
+        } catch (final NamingException ne) {
+            throw new ConfigurationException("Failed to create JNDI context [" + contextModuleName + "].");
+        }
 	}
 	
+	private static Properties getProperties(final String contextModuleName)
+	{
+            final String providerUrl = ModulePropertyManager.getPropertyManager(contextModuleName).getProperty(Context.PROVIDER_URL, Environment.JBOSS_PROVIDER_URL);
+            final String initialContextFactory = ModulePropertyManager.getPropertyManager(contextModuleName).getProperty(Context.INITIAL_CONTEXT_FACTORY, Environment.JBOSS_INITIAL_CONTEXT_FACTORY);
+            final String urlPackagePrefix = ModulePropertyManager.getPropertyManager(contextModuleName).getProperty(Context.URL_PKG_PREFIXES, Environment.JBOSS_URL_PKG_PREFIX);
+            final Properties environment = new Properties();
+            environment.setProperty(Context.PROVIDER_URL, providerUrl);
+            environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory);
+            environment.setProperty(Context.URL_PKG_PREFIXES, urlPackagePrefix);
+            return environment ;
+	}
+	
 	/**
 	 * Lookup the JMS Connection Factory based on the connection details outlined
 	 * in the named configuration module/section.
 	 * <p/>
 	 * The module/section parameters are:
 	 * <ol>
-	 * 	<li><b>{@link Context#PROVIDER_URL}</b>: Value defaults to "{@link NamingContext#JBOSS_PROVIDER_URL}".</li>
-	 * 	<li><b>{@link Context#INITIAL_CONTEXT_FACTORY}</b>: Value defaults to "{@link NamingContext#JBOSS_INITIAL_CONTEXT_FACTORY}".</li>
-	 * 	<li><b>{@link Context#URL_PKG_PREFIXES}</b>: Value defaults to "{@link NamingContext#JBOSS_URL_PKG_PREFIX}".</li>
+	 * 	<li><b>{@link Context#PROVIDER_URL}</b>: Value defaults to "{@link Environment#JBOSS_PROVIDER_URL}".</li>
+	 * 	<li><b>{@link Context#INITIAL_CONTEXT_FACTORY}</b>: Value defaults to "{@link Environment#JBOSS_INITIAL_CONTEXT_FACTORY}".</li>
+	 * 	<li><b>{@link Context#URL_PKG_PREFIXES}</b>: Value defaults to "{@link Environment#JBOSS_URL_PKG_PREFIX}".</li>
 	 * 	<li><b>javax.jms.ConnectionFactory</b>: Value defaults to "".</li>
 	 * </ol>
 	 * 
@@ -386,26 +393,26 @@
 	 * lookup the context, or the ConnectionFactory lookup failed.
 	 */
 	public static ConnectionFactory getJmsConnectionFactory(String jmsConnectionFactoryModuleName) throws ConfigurationException {
-		Context context = getNamingContext(jmsConnectionFactoryModuleName);
-		String connectionFactoryRuntime = ModulePropertyManager.getPropertyManager(jmsConnectionFactoryModuleName).getProperty(ConnectionFactory.class.getName(), "ConnectionFactory");
-		ConnectionFactory factory = null;
-		
-		try {
-			factory = (ConnectionFactory) context.lookup(connectionFactoryRuntime);
-		} catch (NamingException e) {
-			throw new ConfigurationException("JNDI lookup of JMS Connection Factory [" + connectionFactoryRuntime + "] failed.", e);
-		} catch (ClassCastException e) {
-			throw new ConfigurationException("JNDI lookup of JMS Connection Factory failed.  Class [" + connectionFactoryRuntime + "] is not an instance of [" + ConnectionFactory.class.getName() + "].", e);
-		} finally {
-            if (context!=null) {
-                try {
-                    context.close();
-                } catch (NamingException ne) {
-                    _logger.error(ne.getMessage(), ne);
-                }
-            }   
+	        final Properties environment = getProperties(jmsConnectionFactoryModuleName) ;
+	        try {
+	            Context context = NamingContextPool.getNamingContext(environment);
+	            try {
+                        String connectionFactoryRuntime = ModulePropertyManager.getPropertyManager(jmsConnectionFactoryModuleName).getProperty(ConnectionFactory.class.getName(), "ConnectionFactory");
+                        ConnectionFactory factory = null;
+                        
+                        try {
+                                factory = (ConnectionFactory) context.lookup(connectionFactoryRuntime);
+                        } catch (NamingException e) {
+                                throw new ConfigurationException("JNDI lookup of JMS Connection Factory [" + connectionFactoryRuntime + "] failed.", e);
+                        } catch (ClassCastException e) {
+                                throw new ConfigurationException("JNDI lookup of JMS Connection Factory failed.  Class [" + connectionFactoryRuntime + "] is not an instance of [" + ConnectionFactory.class.getName() + "].", e);
+                        }
+                        return factory;
+	            } finally {
+	                NamingContextPool.releaseNamingContext(context) ;
+	            }
+	        } catch (final NamingContextException nce) {
+	            throw new ConfigurationException("Unexpected exception while accessing naming context pool", nce) ;
+	        }
         }
-		
-		return factory;
-	}
-}
\ No newline at end of file
+}

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/Environment.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/Environment.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -50,7 +50,7 @@
 	public static final String JMS_SESSION_SLEEP        = "org.jboss.soa.esb.jms.sessionSleep";
 	
 	/*
-	 * Code properties
+	 * Core properties
 	 */
 	public static final String JNDI_SERVER_URL                = "org.jboss.soa.esb.jndi.server.url";
 	public static final String JNDI_SERVER_CONTEXT_FACTORY    = "org.jboss.soa.esb.jndi.server.context.factory";
@@ -61,6 +61,7 @@
     public static final String LOAD_BALANCER_POLICY           = "org.jboss.soa.esb.loadbalancer.policy";
     public static final String REDELIVER_DLS_SERVICE_ON       = "org.jboss.soa.esb.dls.redeliver";
     public static final String REGISTRY_CACHE_LIFE_MILLIES    = "org.jboss.soa.esb.registry.cache.life";
+    public static final String REMOVE_DEAD_EPR                = "org.jboss.soa.esb.failure.detect.removeDeadEPR";
 	/** 
 	 * The Registry Query Manager URI defines the endPoint where registry queries can be made. 
 	 */
@@ -192,4 +193,30 @@
 	
 	public static final String MESSAGE_TRACE = "org.jboss.soa.esb.messagetrace"; // on or off
 	public static final String PER_MESSAGE_TRACE = "org.jboss.soa.esb.permessagetrace"; // on or off
+	
+	// Configuration options for the Naming Context pooling.
+	/**
+	 * The maximum pool size.
+	 */
+	public static final String NAMING_CONTEXT_POOL_SIZE = "org.jboss.soa.esb.namingcontext.poolsize" ;
+	/**
+	 * The maximum sleep period when waiting for a naming context, specified in seconds.
+	 */
+        public static final String NAMING_CONTEXT_SLEEP_PERIOD = "org.jboss.soa.esb.namingcontext.sleepperiod" ;
+        /**
+         * The maximum number of retries when creating a naming context.
+         */
+        public static final String NAMING_CONTEXT_RETRY_COUNT = "org.jboss.soa.esb.namingcontext.retrycount" ;
+        /**
+         * The JBoss JNDI provider URL. 
+         */
+        public static final String JBOSS_PROVIDER_URL = "localhost";
+        /**
+         * The JBoss JNDI initial context factory. 
+         */
+        public static final String JBOSS_INITIAL_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory";
+        /**
+         * The JBoss JNDI URL package prefix. 
+         */
+        public static final String JBOSS_URL_PKG_PREFIX = ""; //"org.jboss.naming:org.jnp.interfaces"
 }

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -27,6 +27,7 @@
 import java.net.URL;
 
 import javax.transaction.Status;
+import javax.transaction.Synchronization;
 import javax.transaction.Transaction;
 import javax.transaction.TransactionManager;
 
@@ -262,6 +263,22 @@
         }
         
         /**
+         * Add a synchronization to the current transaction.
+         * @param sync
+         * @throws TransactionStrategyException
+         */
+        public void registerSynchronization (Synchronization sync) throws TransactionStrategyException
+        {
+            try
+            {
+        	tm.getTransaction().registerSynchronization(sync);
+            }
+            catch (final Throwable th)
+            {
+        	throw new TransactionStrategyException("Problem when registering synchronization: ", th);
+            }
+        }
+        /**
          * Is the currently associated transaction active?
          * @return
          * @throws TransactionStrategyException

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/TransactionStrategy.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/TransactionStrategy.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/common/TransactionStrategy.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -22,6 +22,8 @@
 
 package org.jboss.soa.esb.common;
 
+import javax.transaction.Synchronization;
+
 /**
  * This class represents the transaction strategy that is currently in force
  * within the ESB.  At present there are two strategies employed, a null strategy
@@ -119,6 +121,13 @@
      */
     public abstract void resume (Object tx) throws TransactionStrategyException;
     
+    /**
+     * Add a synchronization to the current transaction.
+     * @param sync
+     * @throws TransactionStrategyException
+     */
+    public abstract void registerSynchronization (Synchronization sync) throws TransactionStrategyException;
+    
     public static void setStrategy (TransactionStrategy txSt)
     {
     	_currentStrategy.set(txSt);
@@ -202,6 +211,15 @@
         }
         
         /**
+         * Add a synchronization to the current transaction.
+         * @param sync
+         * @throws TransactionStrategyException
+         */
+        public void registerSynchronization (Synchronization sync) throws TransactionStrategyException
+        {
+        }
+        
+        /**
          * Is the currently associated transaction active?
          * @return
          * @throws TransactionStrategyException

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContext.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContext.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContext.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -33,6 +33,7 @@
 /**
  * Obtains JNDI naming context.
  * 
+ * @deprecated {@link org.jboss.soa.esb.helpers.NamingContextPool}
  */
 public class NamingContext 
 {

Copied: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextException.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextException.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextException.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextException.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,69 @@
+/*
+ * 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.helpers;
+
+/**
+ * Exception used for Naming Connection Pool errors.
+ */
+public class NamingContextException extends Exception
+{
+    /**
+     * The serial version UID for this exception.
+     */
+    private static final long serialVersionUID = 8246625119667566368L;
+
+    /**
+     * Create a naming context exception.
+     */
+    public NamingContextException()
+    {
+        super() ;
+    }
+
+    /**
+     * Create a naming context exception with the specified message.
+     * @param message The message associated with the exception.
+     */
+    public NamingContextException(final String message)
+    {
+        super(message) ;
+    }
+
+    /**
+     * Create a naming context exception with the specified cause.
+     * @param cause The cause associated with the exception.
+     */
+    public NamingContextException(final Throwable cause)
+    {
+        super(cause) ;
+    }
+
+    /**
+     * Create a naming context exception with the specified message and cause.
+     * @param message The message associated with the exception.
+     * @param cause The cause associated with the exception.
+     */
+    public NamingContextException(final String message, final Throwable cause)
+    {
+        super(message, cause) ;
+    }
+}

Copied: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,522 @@
+/*
+ * 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.helpers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.TreeMap;
+import java.util.Map.Entry;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.lifecycle.LifecyclePriorities;
+import org.jboss.soa.esb.lifecycle.LifecycleResource;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceException;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceFactory;
+
+import com.arjuna.common.util.propertyservice.PropertyManager;
+
+/**
+ * Pool for Naming Contexts.
+ * 
+ * @author <a href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
+ */
+public class NamingContextPool
+{
+    /**
+     * Logger for this class
+     */
+    private static final Logger LOGGER = Logger.getLogger(NamingContextPool.class);
+    /**
+     * Default maximum pool size.
+     */
+    private static final int DEFAULT_POOL_SIZE = 20 ;
+    /**
+     * Default sleep period.
+     */
+    private static final int DEFAULT_SLEEP_PERIOD = 30 ;
+    /**
+     * Default retry count for creating Naming Contexts.
+     */
+    private static final int DEFAULT_RETRY_COUNT = 10 ;
+    /**
+     * Default key for environments.
+     */
+    private static final String DEFAULT_KEY = "<empty key>" ;
+    /**
+     * Maximum pool size.
+     */
+    private static final int POOL_SIZE ;
+    /**
+     * Sleep period.
+     */
+    private static final int SLEEP_PERIOD ;
+    /**
+     * Retry count for creating Naming Contexts.
+     */
+    private static final int RETRY_COUNT ;
+
+    /**
+     * The lifecycle resource factory.
+     */
+    private static final LifecycleResourceFactory<NamingContextPool> lifecycleNamingContextPoolFactory =
+        new NamingContextPoolFactory();
+
+    /**
+     * The lifecycle Naming Context pools.
+     */
+    private static final LifecycleResource<NamingContextPool> lifecycleNamingContextPoolResource =
+        new LifecycleResource<NamingContextPool>(lifecycleNamingContextPoolFactory,
+            LifecyclePriorities.NAMING_CONTEXT_POOL_PRIORITY);
+    
+    /**
+     * The free contexts.
+     */
+    private final Map<String, List<Context>> freeContexts = new HashMap<String, List<Context>>() ;
+    /**
+     * The free contexts in insertion order.
+     */
+    private final Map<Context, String> freeContextOrder = new LinkedHashMap<Context, String>() ;
+    /**
+     * The in use contexts.
+     */
+    private final Map<Context, String> inUseContexts = new HashMap<Context, String>() ;
+    /**
+     * The count of created contexts.
+     */
+    private int numContexts ;
+    /**
+     * True if the pool has been destroyed.
+     */
+    private boolean destroyed ;
+    
+    /**
+     * Private constructor.
+     */
+    private NamingContextPool()
+    {
+    }
+    
+    /**
+     * Get a Naming Context from the pool.
+     * @param env The JNDI environment parameters for the Naming Context.
+     * @return The Naming Context.
+     * @throws NamingContextException for errors obtaining a Naming Context.
+     */
+    Context getContext(final Properties env)
+        throws NamingContextException
+    {
+        final long end = System.currentTimeMillis() + (SLEEP_PERIOD * 1000) ;
+        final String key = getKey(env) ;
+        boolean emitExpiry = LOGGER.isDebugEnabled() ;
+        synchronized(this)
+        {
+            while(true)
+            {
+                if (destroyed)
+                {
+                    throw new NamingContextException("Naming Context Pool has been previosuly destroyed") ;
+                }
+                final Context context = getContext(env, key) ;
+                if (context != null)
+                {
+                    return context ;
+                }
+                if (emitExpiry)
+                {
+                    LOGGER.debug("The Naming Context pool was exhausted, waiting for one to be released.") ;
+                    emitExpiry = false ;
+                }
+                final long now = System.currentTimeMillis() ;
+                final long delay = (end - now) ;
+                if (delay <= 0)
+                {
+                    throw new NamingContextException("Could not obtain a Naming Context from the pool after " + SLEEP_PERIOD + "s.") ;
+                }
+                else
+                {
+                    try
+                    {
+                        wait(delay) ;
+                    }
+                    catch (final InterruptedException ie) {} // ignore
+                }
+            }
+        }
+    }
+    
+    /**
+     * Release the Naming Context back into the pool.
+     * @param context The Naming Context.
+     * @throws NamingContextException for errors releasing the Naming Context.
+     */
+    synchronized void releaseContext(final Context context)
+        throws NamingContextException
+    {
+        if (destroyed)
+        {
+            throw new NamingContextException("Naming Context Pool has been previosuly destroyed") ;
+        }
+        final String key = inUseContexts.remove(context) ;
+        if (key == null)
+        {
+            throw new NamingContextException("Cannot release a context which is not in use.") ;
+        }
+        
+        freeContextOrder.put(context, key) ;
+        final List<Context> contexts = freeContexts.get(key) ;
+        if (contexts != null)
+        {
+            contexts.add(context) ;
+        }
+        else
+        {
+            final List<Context> newContexts = new ArrayList<Context>() ;
+            newContexts.add(context) ;
+            freeContexts.put(key, newContexts) ;
+        }
+        
+        notifyAll() ;
+    }
+    
+    /**
+     * Replace the specified Naming Context.
+     * @param context The Naming Context to replace.
+     * @param env The JNDI environment parameters for the Naming Context.
+     * @return The new Naming Context
+     * @throws NamingContextException for errors releasing the Naming Context.
+     */
+    synchronized Context replaceContext(final Context context, final Properties env)
+        throws NamingContextException
+    {
+        if (destroyed)
+        {
+            throw new NamingContextException("Naming Context Pool has been previosuly destroyed") ;
+        }
+        final String key = inUseContexts.remove(context) ;
+        if (key == null)
+        {
+            throw new NamingContextException("Cannot release a context which is not in use.") ;
+        }
+        
+        numContexts-- ;
+        closeContext(context) ;
+        return createContext(env, key) ;
+    }
+
+    /**
+     * Closes all Contexts, and removes them from the contextCache.
+     */
+    synchronized void closeAllContexts()
+    {
+        closeAllContexts(freeContextOrder.keySet().iterator()) ;
+        if (inUseContexts.size() > 0)
+        {
+            LOGGER.warn("Forcing closure of in-use Naming Contexts") ;
+            closeAllContexts(inUseContexts.keySet().iterator()) ;
+        }
+        inUseContexts.clear() ;
+        freeContextOrder.clear() ;
+        freeContexts.clear() ;
+        destroyed = true ;
+    }
+    
+    /**
+     * Get a Naming Context from the pool.
+     * @param env The JNDI environment parameters for the Naming Context.
+     * @param key The key of the context to locate.
+     * @return The Naming Context.
+     * @throws NamingContextException for errors obtaining a Naming Context.
+     */
+    private Context getContext(final Properties env, final String key)
+        throws NamingContextException
+    {
+        final Context context = getFreeContext(key) ;
+        if (context != null)
+        {
+            return context ;
+        }
+        if (numContexts == POOL_SIZE)
+        {
+            if (freeContextOrder.size() == 0)
+            {
+                return null ;
+            }
+            final Iterator<Entry<Context, String>> freeContextIter = freeContextOrder.entrySet().iterator() ;
+            final Entry<Context, String> freeContextEntry = freeContextIter.next() ;
+            final Context freeContext = freeContextEntry.getKey() ;
+            final String freeContextKey = freeContextEntry.getValue() ;
+            if (LOGGER.isDebugEnabled())
+            {
+                LOGGER.debug("Ejecting Naming Context from pool, key: " + freeContextKey) ;
+            }
+            
+            freeContextOrder.remove(freeContext) ;
+            final List<Context> contexts = freeContexts.get(key) ;
+            contexts.remove(freeContext) ;
+            if (contexts.size() == 0)
+            {
+                freeContexts.remove(key) ;
+            }
+            
+            numContexts-- ;
+            closeContext(freeContext) ;
+        }
+        return createContext(env, key) ;
+    }
+    
+    /**
+     * Get a free Naming Context from the available list
+     * @param key The key of the context to return.
+     * @return The Naming Context or null if none present
+     */
+    private Context getFreeContext(final String key)
+    {
+        final List<Context> contexts = freeContexts.get(key) ;
+        if (contexts != null)
+        {
+            final int size = contexts.size() ;
+            if (size > 0)
+            {
+                final Context context = contexts.remove(size-1) ;
+                freeContextOrder.remove(context) ;
+                inUseContexts.put(context, key) ;
+                return context ;
+            }
+        }
+        return null ;
+    }
+    
+    /**
+     * Create the context with the specified environment and key.
+     * @param env The JNDI environment parameters for the Naming Context.
+     * @param key The key of the context to locate.
+     * @return The Naming Context.
+     * @throws NamingContextException for errors obtaining a Naming Context.
+     */
+    private Context createContext(final Properties env, final String key)
+        throws NamingContextException
+    {
+        NamingException cachedException = null ;
+        
+        for(int count = 0 ; count < RETRY_COUNT ; count++)
+        {
+            final Context context ;
+            try
+            {
+                context = new InitialContext(env) ;
+                
+                try
+                {
+                    context.list("__dummy2@#$%") ;
+                }
+                catch (final NameNotFoundException nfne) {} // Expected
+            }
+            catch (final NamingException ne)
+            {
+                cachedException = ne ;
+                continue ;
+            }
+            
+            inUseContexts.put(context, key) ;
+            numContexts++ ;
+            return context ;
+        }
+        
+        throw new NamingContextException("Failed to create Naming Context", cachedException) ;
+    }
+    
+    /**
+     * Close all the specified contexts.
+     * @param contextIter The iterator of Naming Contexts.
+     */
+    private void closeAllContexts(Iterator<Context> contextIter)
+    {
+        while(contextIter.hasNext())
+        {
+            closeContext(contextIter.next()) ;
+        }
+    }
+    
+    /**
+     * Close the specified Naming Context.
+     * @param context The Naming Context to close.
+     */
+    private void closeContext(final Context context)
+    {
+        try
+        {
+            context.close() ;
+        }
+        catch (final NamingException ne) {} // ignore
+    }
+    
+    static
+    {
+        final PropertyManager prop = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE);
+        POOL_SIZE = getIntProperty(prop, Environment.NAMING_CONTEXT_POOL_SIZE, DEFAULT_POOL_SIZE);
+        SLEEP_PERIOD = getIntProperty(prop, Environment.NAMING_CONTEXT_SLEEP_PERIOD, DEFAULT_SLEEP_PERIOD);
+        RETRY_COUNT = getIntProperty(prop, Environment.NAMING_CONTEXT_RETRY_COUNT, DEFAULT_RETRY_COUNT);
+    }
+    
+    /**
+     * Get a Naming Context from the pool.
+     * @param properties The properties of the JNDI environment.
+     * @return the pooled Naming Context.
+     */
+    public static Context getNamingContext(final Properties properties)
+        throws NamingContextException
+    {
+        return getPool().getContext(properties) ;
+    }
+    
+    /**
+     * Release the Naming Context back into the pool.
+     * @param context The Naming Context to release.
+     */
+    public static void releaseNamingContext(final Context context)
+        throws NamingContextException
+    {
+        getPool().releaseContext(context) ;
+    }
+    
+    /**
+     * Close the Naming Context and remove from the pool.
+     * @param context The Naming Context to close.
+     * @param env The JNDI environment parameters for the Naming Context.
+     */
+    public static Context replaceNamingContext(final Context context, final Properties env)
+        throws NamingContextException
+    {
+        return getPool().replaceContext(context, env) ;
+    }
+    
+    /**
+     * Get the Naming Context pool.
+     * @return The Naming Context pool.
+     * @throws NamingContextException For errors retrieving the Naming Context pool.
+     */
+    private static NamingContextPool getPool()
+        throws NamingContextException
+    {
+        try
+        {
+            return lifecycleNamingContextPoolResource.getLifecycleResource() ;
+        }
+        catch (final LifecycleResourceException lre)
+        {
+            throw new NamingContextException("Unexpected lifecycle resource exception", lre) ;
+        }
+    }
+    
+    /**
+     * Takes properties and serializes this into a long string which is the key
+     * into the contextCache.
+     * 
+     * @param properties -
+     *                property Bag.
+     * @return key into the contextCache.
+     */
+    private static String getKey(Properties properties)
+    {
+        if ((properties == null) || (properties.size() == 0))
+        {
+            return DEFAULT_KEY ;
+        }
+        
+        final TreeMap<String, String> orderedProperties = new TreeMap<String, String>() ;
+        final Iterator<Entry<Object, Object>> entryIter = properties.entrySet().iterator() ;
+        while(entryIter.hasNext())
+        {
+            final Entry<Object, Object> entry = entryIter.next() ;
+            orderedProperties.put(entry.getKey().toString(), entry.getValue().toString()) ;
+        }
+        return orderedProperties.toString() ;
+    }
+    
+    /**
+     * Get the integer value of the specified property.
+     * @param prop The property manager.
+     * @param name The property name.
+     * @param defaultValue The default value.
+     * @return The integer value of the property or the default value.
+     */
+    private static int getIntProperty(final PropertyManager prop, final String name, final int defaultValue)
+    {
+        final String value = prop.getProperty(name) ;
+        if (value != null)
+        {
+            try
+            {
+                return Integer.parseInt(value) ;
+            }
+            catch (final NumberFormatException nfe)
+            {
+                LOGGER.warn("Could not parse value for property: " + name + ", value: " + value) ;
+            }
+        }
+        return defaultValue ;
+    }
+    
+    /**
+     * The factory for creating and destroying lifecycle resources.
+     */
+    private static class NamingContextPoolFactory implements LifecycleResourceFactory<NamingContextPool>
+    {
+        /**
+         * Create a resource object which will be associated with the specified lifecycle identity.
+         * @param lifecycleIdentity The associated lifecycle identity.
+         * @return The lifecycle resource
+         * @throws LifecycleResourceException for errors during construction.
+         */
+        public NamingContextPool createLifecycleResource(final String lifecycleIdentity)
+            throws LifecycleResourceException
+        {
+            return new NamingContextPool() ;
+        }
+        
+        /**
+         * Destroy a resource object which is associated with the specified lifecycle identity.
+         * @param resource The lifecycle resource.
+         * @param lifecycleIdentity The associated lifecycle identity.
+         * @return The lifecycle resource.
+         * @throws LifecycleResourceException for errors during destroy.
+         */
+        public void destroyLifecycleResource(final NamingContextPool resource,
+            final String lifecycleIdentity)
+            throws LifecycleResourceException
+        {
+            resource.closeAllContexts() ;
+        }
+    }
+}

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/persist/JdbcCleanConn.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/persist/JdbcCleanConn.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/helpers/persist/JdbcCleanConn.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -63,6 +63,8 @@
 		{
 			m_conn.commit();
 		}
+		else
+			throw new SQLException("Connection is null!");
 	}
 
 	public void rollback() throws SQLException
@@ -107,6 +109,9 @@
 			{
 			}
 		}
+		else
+			m_oLogger.debug("Connection is null.");
+		
 		m_olPrepSt.clear();
 		m_conn = null;
 	} // __________________________________
@@ -117,6 +122,9 @@
 		if (null == m_conn)
 		{
 			connect();
+			
+			if (m_conn == null)
+				throw new SQLException("Connection is null!");
 		}
 		PreparedStatement PS = m_conn.prepareStatement(p_sSt, p_i1, p_i2);
 		m_olPrepSt.add(PS);
@@ -128,6 +136,9 @@
 		if (null == m_conn)
 		{
 			connect();
+			
+			if (m_conn == null)
+				throw new SQLException("Connection is null!");
 		}
 
 		PreparedStatement PS = m_conn.prepareStatement(p_sSt);
@@ -141,6 +152,9 @@
 		if (null == m_conn)
 		{
 			connect();
+			
+			if (m_conn == null)
+				throw new SQLException("Connection is null!");
 		}
 
 		if (p_PS == null)
@@ -181,6 +195,9 @@
 		if (null == m_conn)
 		{
 			connect();
+			
+			if (m_conn == null)
+				throw new SQLException("Connection is null!");
 		}
 
 		if (p_PS == null)
@@ -225,6 +242,9 @@
 			return;
 		}
 
+		if (m_oDS == null)
+			throw new SQLException("DataSource is null!");
+		
 		SQLException eRet = null;
 		for (int i1 = 0; i1 < 5; i1++)
 		{

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecyclePriorities.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecyclePriorities.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecyclePriorities.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -45,4 +45,9 @@
      * The JMS connection pool priority.
      */
     public static final int JMS_CONNECTION_POOL_PRIORITY = 200000 ;
+    
+    /**
+     * The Naming Context pool priority.
+     */
+    public static final int NAMING_CONTEXT_POOL_PRIORITY = 400000 ;
 }

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -283,7 +283,7 @@
         {
             resourceLock.unlock() ;
         }
-        // Not touching this yet, needs reworking
+        // NamingContext has been replaced by NamingContextPool and is now deprecated
         NamingContext.closeAllContexts() ;
     }
     

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -47,6 +47,7 @@
 	public static final String SERVICE_NAME_TAG			    = "service-name";
 	public static final String SERVICE_DESCRIPTION_TAG      = "service-description";
 	public static final String EPR_DESCRIPTION_TAG          = "epr-description";
+	public static final String REMOVE_OLD_SERVICE           = "remove-old-service";
 
 	/**  Gateways  */
     public static final String TARGET_SERVICE_CATEGORY_TAG	= "target-service-category";

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -152,7 +152,8 @@
 					Boolean.valueOf(tree.getAttribute(JMSEpr.PERSISTENT_TAG)),
 					tree.getAttribute(JMSEpr.ACKNOWLEDGE_MODE_TAG),
 					username,
-					password);
+					password,
+					Boolean.valueOf(tree.getAttribute(JMSEpr.TRANSACTED_TAG)));
 			return epr;
 		}
 		catch (Exception e)

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/RegistryUtil.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/RegistryUtil.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/RegistryUtil.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -117,7 +117,8 @@
     {
         final String category = config.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG) ;
         final String name = config.getAttribute(ListenerTagNames.SERVICE_NAME_TAG) ;
-
+        final String removeOldService = config.getAttribute(ListenerTagNames.REMOVE_OLD_SERVICE);
+        
         if ("eprManager".equalsIgnoreCase(category))
         {
             register(name, epr) ;
@@ -136,9 +137,18 @@
             registryLock.lock();
             try
             {
+            	if ("true".equalsIgnoreCase(removeOldService))            	
+            		registry.unRegisterService(category, name);
+            	
                 registry.registerEPR(category, name,
                     serviceDescription, epr, eprDescription) ;
             }
+            catch (ServiceNotFoundException ex)
+            {
+            	// ignore as it's possible another client just did the removal for us.
+            	
+            	logger.debug("Could not unregister service < "+category+", "+name+" >.");
+            }
             finally
             {
                 registryLock.unlock() ;

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -147,6 +147,7 @@
 		toElement.setAttribute(JMSEpr.ACKNOWLEDGE_MODE_TAG, messageFilter.getAcknowledgeMode());
 		toElement.setAttribute(JMSEpr.JMS_SECURITY_PRINCIPAL_TAG, messageFilter.getJmsSecurityPrincipal());
 		toElement.setAttribute(JMSEpr.JMS_SECURITY_CREDENTIAL_TAG, messageFilter.getJmsSecurityCredential());
+		toElement.setAttribute(JMSEpr.TRANSACTED_TAG, Boolean.toString( messageFilter.getTransacted()));
 	}
 
     private static void mapJmsJcaAttributes(final JmsListener listener,
@@ -191,6 +192,10 @@
         
         final Element activationConfigElement = YADOMUtil.addElement(listenerNode, JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
         addPropertyElement(activationConfigElement, "destination", messageFilter.getDestName()) ;
+        if (jmsJcaProvider.isSetProviderAdapterJNDI())
+        {
+            addPropertyElement(activationConfigElement, "providerAdapterJNDI", jmsJcaProvider.getProviderAdapterJNDI()) ;
+        }
         final int destType = messageFilter.getDestType().intValue() ;
         if (destType == DestType.INT_QUEUE)
         {

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetter.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetter.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetter.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -34,6 +34,7 @@
 import org.apache.log4j.Logger;
 import org.jboss.soa.esb.addressing.eprs.JMSEpr;
 import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.message.Properties;
 import org.jboss.soa.esb.notification.jms.JMSPropertiesSetter;
 
 /**
@@ -45,6 +46,7 @@
  * <li> JMSCorrelationID	-> Call.setRelatesTo	URI = jms:correlationID#YYXX-123456780-GG
  * <li> JMSReplyTo			-> Call.setReplyTo
  * <li> JMSExpiration		-> Properties( key = JMSPropertiesSetter.JMS_EXPIRATION )
+ * <li> JMSRedeliverd		-> Properties( key = JMSPropertiesSetter.JMS_REDELIVERED
  * </lu>
  * Note: JMSCorrelationID is set as a fragment on the URI and can be retrieved like this:
  * correlationURI.getFragment();
@@ -141,6 +143,7 @@
 	{
 		@SuppressWarnings("unchecked")
 		Enumeration<String> properties = fromJMSMessage.getPropertyNames();
+		Properties esbProperties = toESBMessage.getProperties();
 		if (null != properties)
 		{
 			while (properties.hasMoreElements())
@@ -148,9 +151,11 @@
 				String key = properties.nextElement();
 				Object value = fromJMSMessage.getObjectProperty(key);
 				if (null != value)
-					toESBMessage.getProperties().setProperty(key, value);
+					esbProperties.setProperty(key, value);
 			}
 	     }
+		final boolean redelivered = fromJMSMessage.getJMSRedelivered();
+		esbProperties.setProperty( JMSPropertiesSetter.JMS_REDELIVERED, Boolean.valueOf( redelivered ));
 	}
 
 }

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -56,7 +56,8 @@
 import org.jboss.soa.esb.couriers.CourierUtil;
 import org.jboss.soa.esb.filter.FilterManager;
 import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.NamingContext;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 import org.jboss.soa.esb.listeners.ListenerTagNames;
 import org.jboss.soa.esb.listeners.ListenerUtil;
 import org.jboss.soa.esb.listeners.RegistryUtil;
@@ -118,6 +119,10 @@
             throw new ManagedLifecycleException(
                     "Unexpected configuration exception from prepareMessageReceiver",
                     ce);
+        } catch (final NamingContextException nce) {
+            throw new ManagedLifecycleException(
+                    "Unexpected naming context exception from prepareMessageReceiver",
+                    nce);
         }
 
         if (_serviceName != null) {
@@ -146,8 +151,12 @@
             
             if (null != msgIn) {
                 try {
-                    Object obj = _processMethod.invoke(_composer, new Object[]
-                            {msgIn});
+                    Object obj = _processMethod.invoke(_composer, new Object[] {msgIn});
+                    // commit and acknowledge the reception of the message
+                    // this is done after extracting the content of the JMS Message.
+                    if ( jmsSession != null && jmsSession.getTransacted() )
+                    	jmsSession.commit();
+                    	
                     if (null == obj) {
                         _logger.warn("Action class method <"
                                 + _processMethod.getName()
@@ -190,6 +199,8 @@
                         _logger.error("Action class method <"
                                 + _processMethod.getName()
                                 + "> returned a non Message object", e);
+                        
+	                    rollbackJMSTransaction();
                         continue;
                     }
                     catch (CourierException e) {
@@ -198,6 +209,7 @@
                                 + ".deliverAsync(Message) FAILED"
                                 : "NULL courier can't deliverAsync Message";
                         _logger.error(text, e);
+	                    rollbackJMSTransaction();
                         continue;
                     }
                     continue;
@@ -205,13 +217,16 @@
                 catch (InvocationTargetException e) {
                     _logger.error("Problems invoking method <"
                             + _processMethod.getName() + ">", e);
+                    rollbackJMSTransaction();
                 }
                 catch (IllegalAccessException e) {
                     _logger.error("Problems invoking method <"
                             + _processMethod.getName() + ">", e);
+                    rollbackJMSTransaction();
                 }
                 catch (Exception e) {
                     _logger.error("Unexpected problem", e);
+                    rollbackJMSTransaction();
                 }
             }
         }
@@ -228,13 +243,32 @@
     protected void doThreadedDestroy() throws ManagedLifecycleException {
         cleanup();
     }
+    
+    private void rollbackJMSTransaction() 
+    {
+        try
+		{
+			if ( jmsSession != null && jmsSession.getTransacted() )
+				jmsSession.rollback();
+		} catch (JMSException e) {
+			final String errorMsg = "JMSException during jmsSession.rollback()";
+			_logger.error( errorMsg, e );
+		}
+    }
+    
 
     private void cleanup() {
         try {
             if (_serviceName != null) {
                 RegistryUtil.unregister(_serviceCategory, _serviceName, _myEpr);
             }
-        } finally {
+            if ( jmsSession != null && jmsSession.getTransacted() )
+            	jmsSession.rollback();
+        } 
+        catch (JMSException e)
+		{
+			e.printStackTrace();
+		} finally {
             try {
                 if (jmsMessageConsumer != null) {
                     try {
@@ -321,7 +355,7 @@
     } // ________________________________
 
     private void prepareMessageReceiver() throws ConfigurationException,
-            JMSException, ConnectionException {
+            JMSException, ConnectionException, NamingContextException {
         jmsSession = null;
         jmsDestination = null;
 
@@ -345,64 +379,65 @@
                 environment.setProperty(name, _config.getAttribute(name));
             }
         }
-        Context oJndiCtx = NamingContext.getServerContext(environment);
-
-        if (null == oJndiCtx)
-            throw new ConfigurationException("Unable fo obtain jndi context <"
-                    + sJndiURL + "," + sJndiContextFactory + ","
-                    + sJndiPkgPrefix + ">");
-
-        String sFactClass = ListenerUtil.getValue(_config,
-                JMSEpr.CONNECTION_FACTORY_TAG, "ConnectionFactory");
-        if (null == _config.getAttribute(JMSEpr.CONNECTION_FACTORY_TAG))
-            _logger.debug("No value specified for "
-                    + JMSEpr.CONNECTION_FACTORY_TAG + " attribute"
-                    + " -  Using default of: '" + sFactClass + "'");
-        _serviceCategory = _config
-                .getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
-        _serviceName = _config.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
-
-        String destType = _config.getAttribute(JMSEpr.DESTINATION_TYPE_TAG);
-        boolean persistent = Boolean.valueOf( _config.getAttribute(JMSEpr.PERSISTENT_TAG));
-        String acknowledgeMode = _config.getAttribute(JMSEpr.ACKNOWLEDGE_MODE_TAG);
-        
-        final String username =  _config.getAttribute( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG );
-        final String password =  _config.getAttribute( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG );
-        if ( username != null && password != null )
-        {
-	        environment.put( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG, username );
-	        environment.put( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG, password );
-        }
-        
-        _myEpr = (null == _serviceName) ? null : new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, destType,
-            jmsDestinationName, sFactClass, environment, _messageSelector, persistent, acknowledgeMode,
-            username, password);
-        jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment, sFactClass, destType,username, password);
-        	
+        Context oJndiCtx = NamingContextPool.getNamingContext(environment);
         try {
-            jmsSession = _myEpr != null ? jmsConnectionPool.getSession(((JMSEpr)_myEpr).getAcknowledgeMode()):
-            	jmsConnectionPool.getSession(Session.AUTO_ACKNOWLEDGE);
-        		
-        }
-        catch (NamingException ne) {
-            throw new ConfigurationException("Failed to obtain queue session from pool", ne);
-        }
-
-        try {
-            jmsDestination = (Destination) oJndiCtx.lookup(jmsDestinationName);
-        }
-        catch (NamingException nex) {
+            String sFactClass = ListenerUtil.getValue(_config,
+                    JMSEpr.CONNECTION_FACTORY_TAG, "ConnectionFactory");
+            if (null == _config.getAttribute(JMSEpr.CONNECTION_FACTORY_TAG))
+                _logger.debug("No value specified for "
+                        + JMSEpr.CONNECTION_FACTORY_TAG + " attribute"
+                        + " -  Using default of: '" + sFactClass + "'");
+            _serviceCategory = _config
+                    .getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
+            _serviceName = _config.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+    
+            String destType = _config.getAttribute(JMSEpr.DESTINATION_TYPE_TAG);
+            boolean persistent = Boolean.valueOf( _config.getAttribute(JMSEpr.PERSISTENT_TAG));
+            boolean transacted = Boolean.valueOf( _config.getAttribute(JMSEpr.TRANSACTED_TAG));
+            
+            String acknowledgeMode = _config.getAttribute(JMSEpr.ACKNOWLEDGE_MODE_TAG);
+            
+            final String username =  _config.getAttribute( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG );
+            final String password =  _config.getAttribute( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG );
+            if ( username != null && password != null )
+            {
+    	        environment.put( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG, username );
+    	        environment.put( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG, password );
+            }
+            _logger.debug( "JMSGateway isTransacted = " + transacted );
+            
+            _myEpr = (null == _serviceName) ? null : new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, destType,
+                jmsDestinationName, sFactClass, environment, _messageSelector, persistent, acknowledgeMode,
+                username, password, transacted );
+            jmsConnectionPool = JmsConnectionPoolContainer.getPool(environment, sFactClass, destType,username, password, transacted);
+            	
             try {
-                oJndiCtx = NamingContext.getServerContext(environment);
+                jmsSession = _myEpr != null ? jmsConnectionPool.getSession(((JMSEpr)_myEpr).getAcknowledgeMode()):
+                	jmsConnectionPool.getSession(Session.AUTO_ACKNOWLEDGE);
+            		
+            }
+            catch (NamingException ne) {
+                throw new ConfigurationException("Failed to obtain queue session from pool", ne);
+            }
+    
+            try {
                 jmsDestination = (Destination) oJndiCtx.lookup(jmsDestinationName);
             }
-            catch (NamingException ne) {
-                if(jmsSession instanceof QueueSession) {
-                    jmsDestination = jmsSession.createQueue(jmsDestinationName);
-                } else {
-                    jmsDestination = jmsSession.createTopic(jmsDestinationName);
+            catch (NamingException nex) {
+                try {
+                    oJndiCtx = NamingContextPool.replaceNamingContext(oJndiCtx, environment);
+                    jmsDestination = (Destination) oJndiCtx.lookup(jmsDestinationName);
                 }
+                catch (NamingException ne) {
+                    if(jmsSession instanceof QueueSession) {
+                        jmsDestination = jmsSession.createQueue(jmsDestinationName);
+                    } else {
+                        jmsDestination = jmsSession.createTopic(jmsDestinationName);
+                    }
+                }
             }
+        } finally {
+            NamingContextPool.releaseNamingContext(oJndiCtx) ;
         }
 
         if(jmsSession instanceof QueueSession && jmsDestination instanceof Queue) {

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -485,14 +485,17 @@
     protected List<Map<String, Object>> pollForCandidates() {
         List<Map<String, Object>> oResults = new ArrayList<Map<String, Object>>();
         final JdbcCleanConn oConn = getDbConn();
+        
+        ResultSet RS = null;
+        
         try {
-            ResultSet RS = oConn.execQueryWait(_PSscan, 1);
+            RS = oConn.execQueryWait(_PSscan, 1);
             ResultSetMetaData meta = RS.getMetaData();
             while (RS.next()) {
                 Map<String, Object> row = new HashMap<String, Object>();
                 for (int iCurr = 1; iCurr <= meta.getColumnCount(); iCurr++) {
                     String sCol = meta.getColumnName(iCurr);
-                    if (!_inProcessField.equals(sCol))
+                    if (!_inProcessField.equalsIgnoreCase(sCol))
                         row.put(sCol, RS.getObject(iCurr));
                 }
 
@@ -504,6 +507,9 @@
         }
         finally {
             try {
+        	if (RS != null)
+        	    RS.close();
+        	
                 oConn.rollback();
             } catch (final SQLException sqle) {
             	refreshDatasource();
@@ -541,9 +547,16 @@
 					initContext = new InitialContext();
 					oDS = (DataSource) initContext.lookup(_datasource);
 				} catch (NamingException e) {
-					_logger.error("", e);
+					_logger.error("SqlTableGatewayListener.getDbConn failed to lookup datasource.", e);
 				}
         	}
+        	
+        	/*
+        	 * Create JdbcCleanConn even if oDS is null because that will
+        	 * manage the error handling for us by throwing SQLExceptions
+        	 * at the appropriate time.
+        	 */
+        	
             _dbConn = new JdbcCleanConn(oDS);
         } 
       
@@ -551,7 +564,7 @@
         	try {
 				prepareStatements();
 			} catch (SQLException e) {
-				_logger.debug("Exception preparing statements", e);
+				_logger.warn("Exception preparing statements", e);
 			}
         }
 	        

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -457,9 +457,9 @@
 
 	private void faultTo(final Call callDetails, final Message message)
 	{
-		if (!DefaultFaultTo.initialiseReply(message, callDetails))
+		if (!DefaultFaultTo.initialiseReply(message, callDetails, oneWay))
 		{
-		    if (defaultProcessing)
+		    if (defaultProcessing || oneWay)
 		    {
 			LOGGER.warn("No fault address defined for fault message! " + callDetails);
 			sendToDLQ(callDetails, message, MessageType.fault) ;

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -157,13 +157,6 @@
 	 */
 	public static final String TIME_TO_LIVE_ATTR = "time-to-live";
 	
-	/**
-	 * This object holds the JNDI naming context that will be used to obtain a
-	 * JMS destination (javax.jms.Destination) to send/publish the notification
-	 * at sendNotification() time
-	 */
-	protected Context[] contexts;
-
 	private Properties m_oProps = new Properties();
 
 	/**
@@ -189,7 +182,7 @@
 	protected int[] deliveryModes;
 	
 	/**
-	 * Priorities for JMS Messages sen by this notifier
+	 * Priorities for JMS Messages seen by this notifier
 	 */
 	protected int[] priorities;
 	
@@ -231,25 +224,6 @@
     } // __________________________________
 
 	/**
-	 * Performs an orderly release of all JMS resources utilized - Well behaved
-	 * developers should always call this method before unreferencing this
-	 * object
-	 */
-	public void release ()
-	{
-        for (int i=0; i<connectionPools.length; i++) {
-        	connectionPools[i].closeSession(sessions[i]);
-            if (contexts[i]!=null) {
-                try {
-                    contexts[i].close();
-                } catch (NamingException ne) {
-                    log.error(ne.getMessage(), ne);
-                }
-            }
-        }
-	}
-
-	/**
 	 * Send a JMS message using p_o to fill in the message content and the list
 	 * of message properties that will be added to the JMS message header fields
 	 * 
@@ -260,49 +234,60 @@
 	 */
 	public void sendNotification (org.jboss.soa.esb.message.Message esbMessage) throws NotificationException
 	{
-		try
-		{
-			Message jmsMessage = null;
-            Object obj = payloadProxy.getPayload(esbMessage);
+	    try
+	    {
+		Message jmsMessage = null;
+		Object obj = payloadProxy.getPayload(esbMessage);
 
-			if (MessageType.JAVA_SERIALIZED.equals(esbMessage.getType()))
-			{
-                if(obj == null) {
-                    // create a null payload message...
-                    jmsMessage = sessions[0].createObjectMessage(null);
-                } else if(obj instanceof byte[]) {
-                    jmsMessage = sessions[0].createObjectMessage((byte[]) obj);
-                } else {
-                    throw new NotificationException("Expected payload type for '" + MessageType.JAVA_SERIALIZED + "' is byte[].  Recieved '" + obj.getClass().getName() + "'.");
-                }
-			}
-			else
-			{
-                String content = null;
-                if (obj instanceof byte[]) {
-                    content = new String((byte[]) obj);
-                } else if(obj != null) {
-                    content = obj.toString();
-                }
-				jmsMessage = sessions[0].createTextMessage(content);
-			}
-			
-			setJMSProperties( esbMessage, jmsMessage );
-			
-			for (Iterator II = m_oProps.keySet().iterator(); II.hasNext();)
-			{
-				String sKey = (String) II.next();
-				String sVal = m_oProps.getProperty(sKey);
-				jmsMessage.setStringProperty(sKey, sVal);
-			}
-			sendToAll(jmsMessage);
+		if (MessageType.JAVA_SERIALIZED.equals(esbMessage.getType()))
+		{
+		    if(obj == null) {
+			// create a null payload message...
+			jmsMessage = sessions[0].createObjectMessage(null);
+		    } else if(obj instanceof byte[]) {
+			jmsMessage = sessions[0].createObjectMessage((byte[]) obj);
+		    } else {
+			throw new NotificationException("Expected payload type for '" + MessageType.JAVA_SERIALIZED + "' is byte[].  Recieved '" + obj.getClass().getName() + "'.");
+		    }
 		}
-		catch (JMSException ex)
+		else
 		{
-			throw new NotificationException(ex);
-		} catch (MessageDeliverException e) {
-            throw new NotificationException(e);
-        }
+		    String content = null;
+		    if (obj instanceof byte[]) {
+			content = new String((byte[]) obj);
+		    } else if(obj != null) {
+			content = obj.toString();
+		    }
+		    jmsMessage = sessions[0].createTextMessage(content);
+		}
+
+		setJMSProperties( esbMessage, jmsMessage );
+
+		for (Iterator II = m_oProps.keySet().iterator(); II.hasNext();)
+		{
+		    String sKey = (String) II.next();
+		    String sVal = m_oProps.getProperty(sKey);
+		    jmsMessage.setStringProperty(sKey, sVal);
+		}
+		sendToAll(jmsMessage);
+	    }
+	    catch (JMSException ex)
+	    {
+		throw new NotificationException(ex);
+	    } catch (MessageDeliverException e) {
+		throw new NotificationException(e);
+	    }
+            finally
+            {
+        	/*
+        	 * Why do we create multiple pools but only ever use one?
+        	 * 
+        	 * Don't forget to put the session back into the pool!
+        	 */
+        	
+        	if (connectionPools != null)
+        	    connectionPools[0].closeSession(sessions[0]);
+            }
     } // __________________________________
 	
 	/**
@@ -330,8 +315,6 @@
 	 */
 	protected void sendToAll (final Message p_oMsg) throws JMSException
 	{
-		try 
-		{
             final StringBuilder jmsExceptions = new StringBuilder();
 			for (int i1 = 0; i1 < producers.length; i1++)
 			{
@@ -348,11 +331,6 @@
 			}
 			if ( jmsExceptions.length() > 0 )
 				throw new JMSException( jmsExceptions.toString() );
-		}
-		finally
-		{
-			release();
-		}
 	}
 	
 	/**
@@ -371,7 +349,6 @@
 		final int nrQueuesOrTopics = configTrees.length;
 		producers = new MessageProducer[nrQueuesOrTopics];
         connectionPools = new JmsConnectionPool[nrQueuesOrTopics];
-        contexts = new Context[nrQueuesOrTopics];
         sessions = new Session[nrQueuesOrTopics];
         deliveryModes = new int[nrQueuesOrTopics];
         priorities = new int[nrQueuesOrTopics];

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/NotifyQueues.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/NotifyQueues.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/NotifyQueues.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -40,7 +40,8 @@
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.addressing.eprs.JMSEpr;
 import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.NamingContext;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 
 /**
  * This class that implements abstract methods defined in it's superclass
@@ -105,31 +106,40 @@
 		
 		QueueSession queueSession = (QueueSession) session;
 		
-        Context context = NamingContext.getServerContext(environment);
-        Queue queue=null;
-        try 
-        {
-            queue = (Queue) context.lookup(destinationName);
-        } 
-        catch (NamingException ne) 
-        {
-        	if ( context != null ) context.close();
-            context = NamingContext.getFreshServerContext(environment);
-            try 
+	try
+	{
+            Context context = NamingContextPool.getNamingContext(environment);
+            try
             {
-                queue = (Queue) context.lookup(destinationName);
-            } 
-            catch (NamingException nex) 
+                Queue queue=null;
+                try 
+                {
+                    queue = (Queue) context.lookup(destinationName);
+                } 
+                catch (NamingException ne) 
+                {
+                    context = NamingContextPool.replaceNamingContext(context, environment);
+                    try 
+                    {
+                        queue = (Queue) context.lookup(destinationName);
+                    } 
+                    catch (NamingException nex) 
+                    {
+                        //ActiveMQ
+                        queueSession.createTopic(destinationName);
+                    }
+                }
+    		return queueSession.createSender(queue);
+            }
+            finally
             {
-                //ActiveMQ
-                queueSession.createTopic(destinationName);
+                NamingContextPool.releaseNamingContext(context) ;
             }
-        }
-        finally
-        {
-        	if ( context != null ) context.close();
-        }
-		return queueSession.createSender(queue);
 	}
+	catch (final NamingContextException nce)
+	{
+	    throw new ConnectionException("Unexpected exception while accessing Naming Context pool", nce) ;
+	}
+	}
 
 }

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -39,7 +39,8 @@
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.addressing.eprs.JMSEpr;
 import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.helpers.NamingContext;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 /**
  * 
  * KS: It is silly we open and close the jms connection with eash request.
@@ -83,31 +84,40 @@
 		
 		TopicSession topicSession = (TopicSession) session;
 		
-        Context context = NamingContext.getServerContext(environment);
-        Topic topic=null;
-        try 
-        {
-            topic = (Topic) context.lookup(destinationName);
-        } 
-        catch (NamingException ne) 
-        {
-        	if ( context != null ) context.close();
-            context = NamingContext.getFreshServerContext(environment);
-            try 
+	try
+	{
+            Context context = NamingContextPool.getNamingContext(environment);
+            try
             {
-                topic = (Topic) context.lookup(destinationName);
-            } 
-            catch (NamingException nex) 
+                Topic topic=null;
+                try 
+                {
+                    topic = (Topic) context.lookup(destinationName);
+                } 
+                catch (NamingException ne) 
+                {
+                    context = NamingContextPool.replaceNamingContext(context, environment);
+                    try 
+                    {
+                        topic = (Topic) context.lookup(destinationName);
+                    } 
+                    catch (NamingException nex) 
+                    {
+                        //ActiveMQ
+                        topicSession.createTopic(destinationName);
+                    }
+                }
+    		return topicSession.createPublisher(topic);
+            }
+            finally
             {
-                //ActiveMQ
-                topicSession.createTopic(destinationName);
+                NamingContextPool.releaseNamingContext(context) ;
             }
-        }
-        finally
-        {
-        	if ( context != null ) context.close();
-        }
-		return topicSession.createPublisher(topic);
 	}
+	catch (final NamingContextException nce)
+	{
+	    throw new ConnectionException("Unexpected exception while accessing naming context pool", nce) ;
+	}
+	}
 	
 } // ____________________________________________________________________________

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetter.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetter.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetter.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -48,14 +48,15 @@
 {
 	private Logger log = Logger.getLogger( DefaultJMSPropertiesSetter.class );
 	
-        /**
-         * Client JMSX Group ID.
-         */
-        private static final String JMSX_GROUP_ID = "JMSXGroupID" ;
-        /**
-         * Client JMSX Group Seq.
-         */
-        private static final String JMSX_GROUP_SEQ = "JMSXGroupSeq" ;
+    /**
+     * Client JMSX Group ID.
+     */
+    private static final String JMSX_GROUP_ID = "JMSXGroupID" ;
+    /**
+     * Client JMSX Group Seq.
+     */
+    private static final String JMSX_GROUP_SEQ = "JMSXGroupSeq" ;
+    
 	/**
      * Set JMS Header fields on the outgoing JMS Message.
      * </p>

Modified: labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/jms/JMSPropertiesSetter.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/jms/JMSPropertiesSetter.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/src/org/jboss/soa/esb/notification/jms/JMSPropertiesSetter.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -40,6 +40,12 @@
 	String JMS_EXPIRATION = "javax.jms.message.expiration";
 	
 	/**
+	 * Key used when setting the JMSRedelivered as a 
+	 * property on an ESB Message instance.
+	 */
+	String JMS_REDELIVERED = "javax.jms.message.redelivered";
+	
+	/**
      * Sets JMS properties fields on the outgoing JMS Message.
      * </p>
      * 

Copied: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,84 @@
+/*
+ * 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.internal.soa.esb.couriers;
+
+import static org.junit.Assert.*;
+
+import java.util.Properties;
+
+import javax.jms.JMSException;
+import javax.jms.Session;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.couriers.CourierException;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * Unit test for JmsCourier
+ * 
+ * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
+ *
+ */
+public class JmsCourierIntegrationTest
+{
+	@SuppressWarnings("unused")
+	private Logger log = Logger.getLogger( JmsCourierIntegrationTest.class );
+	
+	private JmsCourier jmsCourier;
+	
+	@Test
+	public void getJmsSession() throws CourierException, JMSException
+	{
+		Session jmsSession = jmsCourier.getJmsSession();
+		assertTrue( jmsSession.getTransacted() );
+		jmsCourier.cleanup();
+	}
+	
+	@Before
+	public void createJmsCourierInstance() throws CourierException
+	{
+		final Properties env = null;
+		final String messageSelector = null;
+		final boolean persistent = true;
+		final boolean transacted = true;
+		JMSEpr epr = new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, 
+				JMSEpr.QUEUE_TYPE, 
+				"queue/A",
+				"ConnectionFactory",
+				env,
+				messageSelector,
+				persistent,
+				transacted);
+		jmsCourier = new JmsCourier( epr );
+	}
+	
+	public static junit.framework.Test suite()
+	{
+		return new JUnit4TestAdapter( JmsCourierIntegrationTest.class );
+	}
+
+}

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -74,12 +74,31 @@
 		final String password = "passwd";
 		final Properties env = null;
 		Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE,
-				username, password);
+				username, password, false);
 		assertEquals( username, poolKey.get( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG ) );
 		assertEquals( password, poolKey.get( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG ) );
 	}
 	
+	@Test
+	public void createPoolKey_with_transacted_properties()
+	{
+		final boolean transacted = true;
+		final Properties env = null;
+		Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE,
+				null, null, transacted);
+		assertEquals( transacted, Boolean.valueOf ( poolKey.get( JMSEpr.TRANSACTED_TAG ) ) );
+	}
 	
+	@Test
+	public void createPoolKey_with_non_transacted_properties()
+	{
+		final boolean transacted = false;
+		final Properties env = null;
+		Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE,
+				null, null, transacted);
+		assertEquals( transacted, Boolean.valueOf ( poolKey.get( JMSEpr.TRANSACTED_TAG ) ) );
+	}
+	
 	public static junit.framework.Test suite()
 	{
 		return new JUnit4TestAdapter( JmsConnectionPoolContainerUnitTest.class );

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/actions/AggregatorUnitTest.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/actions/AggregatorUnitTest.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/actions/AggregatorUnitTest.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -73,7 +73,6 @@
         return new JUnit4TestAdapter(AggregatorUnitTest.class);
     }
     
-    
     @BeforeClass
     public static void before() throws Exception {
         MockCourierFactory.install();
@@ -122,11 +121,26 @@
             }
             
 		} catch (Exception e) {
+			e.printStackTrace();
 			assertTrue(false);
 		}
     }
     
     @Test
+	public void aggregateWithoutTimeout()
+    {
+		try {
+			InputStream in = ClassUtil.getResourceAsStream("OtherAggregatorUnitTest.xml", AggregatorUnitTest.class);
+	        String xml = FileUtil.readStream(in);
+	        ConfigTree[] acts = ConfigTree.fromXml(xml).getChildren("action");
+	        
+            Aggregator aggregator = new Aggregator(acts[0]);
+		} catch (Exception e) {
+			assertTrue(false);
+		}
+    }
+    
+    @Test
     public void aggregateTimeoutTest1()
     {
         try {

Copied: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/actions/OtherAggregatorUnitTest.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/rosetta/tests/src/org/jboss/soa/esb/actions/OtherAggregatorUnitTest.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/actions/OtherAggregatorUnitTest.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/actions/OtherAggregatorUnitTest.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,6 @@
+<testActions>
+	<action class="org.jboss.soa.esb.actions.Aggregator" name="Aggregator"
+		service-category="test" service-name="Aggregator" />
+	<action class="org.jboss.soa.esb.actions.Aggregator" name="Aggregator"
+		service-category="test" service-name="Aggregator"/>
+</testActions>

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -208,6 +208,29 @@
 		assertEquals( Session.DUPS_OK_ACKNOWLEDGE, ackMode.getAcknowledgeModeInt() );
 	}
 	
+	@Test
+	public void contstructor_non_transacted() throws CourierException, URISyntaxException
+	{
+		JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
+				expectedConnectionFactory,
+				nullEnvironment, expectedSelector, 
+				NON_PERSISTENT);
+		
+		assertEquals( false, jmsEpr.getTransacted() );
+	}
+	
+	@Test
+	public void contstructor_transacted() throws CourierException, URISyntaxException
+	{
+		final boolean transacted = true;
+		JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
+				expectedConnectionFactory,
+				nullEnvironment, expectedSelector, 
+				NON_PERSISTENT, transacted);
+		
+		assertEquals( transacted, jmsEpr.getTransacted() );
+	}
+	
 	private void assertDefaults(final String destination, final String connectionFactory, final String destinationType)
 	{
 		assertEquals( expectedDestination, destination );

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/common/tests/utils/DrainQueuesAndTopics.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/common/tests/utils/DrainQueuesAndTopics.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/common/tests/utils/DrainQueuesAndTopics.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -38,7 +38,8 @@
 import javax.naming.Context;
 
 import org.apache.log4j.Logger;
-import org.jboss.soa.esb.helpers.NamingContext;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 
 public class DrainQueuesAndTopics
 {
@@ -88,11 +89,11 @@
   QueueReceiver getQueue(String p_sJndi) throws Exception
   {
       Properties environment = new Properties();
-      environment.setProperty(Context.PROVIDER_URL, NamingContext.JBOSS_PROVIDER_URL);
-      environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY);
-      environment.setProperty(Context.URL_PKG_PREFIXES, NamingContext.JBOSS_URL_PKG_PREFIX);
-      Context oCtx = NamingContext.getServerContext(environment);
-      
+      environment.setProperty(Context.PROVIDER_URL, Environment.JBOSS_PROVIDER_URL);
+      environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, Environment.JBOSS_INITIAL_CONTEXT_FACTORY);
+      environment.setProperty(Context.URL_PKG_PREFIXES, Environment.JBOSS_URL_PKG_PREFIX);
+      final Context oCtx = NamingContextPool.getNamingContext(environment);
+      try {
 	QueueConnection oQconn = null;
 	QueueSession 	oQsess = null;
 	QueueConnectionFactory qcf = (QueueConnectionFactory) oCtx
@@ -103,19 +104,22 @@
 			,QueueSession.AUTO_ACKNOWLEDGE);
     Queue oQueue
     	= (Queue) oCtx.lookup(p_sJndi);
-    oCtx.close();
     QueueReceiver oRcv = oQsess.createReceiver(oQueue);
     oQconn.start();
     return oRcv;
+      } finally {
+          NamingContextPool.releaseNamingContext(oCtx) ;
+      }
   } //__________________________________
 
   TopicSubscriber getTopic(String p_sJndi) throws Exception
   {
       Properties environment = new Properties();
-      environment.setProperty(Context.PROVIDER_URL, NamingContext.JBOSS_PROVIDER_URL);
-      environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY);
-      environment.setProperty(Context.URL_PKG_PREFIXES, NamingContext.JBOSS_URL_PKG_PREFIX);
-      Context oCtx = NamingContext.getServerContext(environment);
+      environment.setProperty(Context.PROVIDER_URL, Environment.JBOSS_PROVIDER_URL);
+      environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, Environment.JBOSS_INITIAL_CONTEXT_FACTORY);
+      environment.setProperty(Context.URL_PKG_PREFIXES, Environment.JBOSS_URL_PKG_PREFIX);
+      final Context oCtx = NamingContextPool.getNamingContext(environment);
+      try {
 	TopicConnection oTconn = null;
 	TopicSession 	oTsess = null;
 	TopicConnectionFactory qcf = (TopicConnectionFactory) oCtx
@@ -125,9 +129,11 @@
 	oTsess = oTconn.createTopicSession(false
 			,QueueSession.AUTO_ACKNOWLEDGE);
     Topic oT = (Topic) oCtx.lookup(p_sJndi);
-    oCtx.close();
     TopicSubscriber oRcv = oTsess.createSubscriber(oT);
     oTconn.start();
     return oRcv;
+      } finally {
+          NamingContextPool.releaseNamingContext(oCtx) ;
+      }
   } //__________________________________ 
 } //____________________________________________________________________________

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -30,6 +30,7 @@
 import junit.framework.TestCase;
 
 import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.Environment;
 
 /**
  * AppServerContex unit tests.
@@ -40,19 +41,21 @@
 	private Logger log = Logger.getLogger( AppServerContextUnitTest.class );
 	final String initialContextFactory = MockInitialContextFactory.class.getName() ;
         
-	public void test_AppServerContext() throws NamingException {
+	public void test_AppServerContext() throws NamingException, NamingContextException {
         Properties environment = new Properties();
         environment.setProperty(Context.PROVIDER_URL, "http://localhost:1234");
         environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory);
-        environment.setProperty(Context.URL_PKG_PREFIXES, NamingContext.JBOSS_URL_PKG_PREFIX);
-        Context ctx = NamingContext.getServerContext(environment);
+        environment.setProperty(Context.URL_PKG_PREFIXES, Environment.JBOSS_URL_PKG_PREFIX);
+        Context ctx = NamingContextPool.getNamingContext(environment);
+        try {
 		
 		
 		Hashtable props = ctx.getEnvironment();
 		log.debug(props);
 		assertEquals(initialContextFactory, props.get(Context.INITIAL_CONTEXT_FACTORY));
 		assertEquals("http://localhost:1234", props.get(Context.PROVIDER_URL));
-		
-        ctx.close();
+        } finally {
+            NamingContextPool.releaseNamingContext(ctx) ;
+        }
 	}
 }

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ListenerManagerJDBCUnitTest.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ListenerManagerJDBCUnitTest.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ListenerManagerJDBCUnitTest.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -38,7 +38,6 @@
 import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycle;
 import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController;
 import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.body.content.BytesBody;
 import org.jboss.soa.esb.message.format.MessageFactory;
 
 public class ListenerManagerJDBCUnitTest extends ListenerManagerFileUnitTest
@@ -54,7 +53,6 @@
 
 		clearMessages() ;
 		
-
 		try
 		{
 			Statement stmt = getDbConnection().createStatement();

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/ConfigurationControlerUnitTest.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -49,7 +49,7 @@
 		//Make sure this file exists
 		File configFile = new File(configFileName);
         assertTrue("File '" + configFile + "' doesn't exist.", configFile.exists());
-		//Remove the listener and gateway configuration files if the exist
+		//Remove the listener and gateway configuration files if they exist
 		File currentDir = configFile.getParentFile();
 		if (null==currentDir)
 			currentDir=new File("");

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -5,7 +5,7 @@
 -->
 <jbossesb-listeners parameterReloadSecs="180">
 <Bank-Listener listenerClass="org.jboss.soa.esb.listeners.message.MessageAwareListener" maxThreads="2" service-category="Bank" service-description="Bank Reconciliation Service" service-name="Reconciliation">
-<EPR acknowledge-mode="AUTO_ACKNOWLEDGE" connection-factory="ConnectionFactory" destination-name="queue/B" destination-type="topic" jndi-URL="jnp://localhost:1099" message-selector="service='Reconciliation'" persistent="true" protocol="jms"/>
+<EPR acknowledge-mode="AUTO_ACKNOWLEDGE" connection-factory="ConnectionFactory" destination-name="queue/B" destination-type="topic" jndi-URL="jnp://localhost:1099" message-selector="service='Reconciliation'" persistent="true" protocol="jms" transacted="false"/>
 <action action="TestDefaultRouteAction" class="org.jboss.soa.esb.actions.ContentBasedRouter" propName="propValue">
 						This is some complex..
 						<!-- property -->

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><!--	NOTE: DO NOT MODIFY	This file was auto-generated.--><jbossesb-gateways parameterReloadSecs="180"><Bank-JMS-Gateway acknowledge-mode="AUTO_ACKNOWLEDGE" connection-factory="com.xyz.provider.XYZConnectionFactory" destination-name="queue/A" destination-type="queue" gatewayClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener" is-gateway="true" jndi-URL="xyz://server1:9876" jndi-context-factory="com.xyz.provider.NamingContextFactory" jndi-pkg-prefix="com.xyz" maxThreads="1" message-selector="service='Reconciliation'" persistent="true" protocol="jms" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation"/><Bank-HTTP-Gateway gatewayClass="org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener" is-gateway="true" jbr-serverBindAddress="192.168.1.111" jbr-serverBindPort="8765" jbr-serverProtocol="http" maxThreads="1" service-description="Bank Reconciliation Serv!
 ice" target-service-category="Bank" target-service-name="Reconciliation"/></jbossesb-gateways>
+<?xml version="1.0" encoding="UTF-8"?><!--	NOTE: DO NOT MODIFY	This file was auto-generated.--><jbossesb-gateways parameterReloadSecs="180"><Bank-JMS-Gateway acknowledge-mode="AUTO_ACKNOWLEDGE" connection-factory="com.xyz.provider.XYZConnectionFactory" destination-name="queue/A" destination-type="queue" gatewayClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener" is-gateway="true" jndi-URL="xyz://server1:9876" jndi-context-factory="com.xyz.provider.NamingContextFactory" jndi-pkg-prefix="com.xyz" maxThreads="1" message-selector="service='Reconciliation'" persistent="true" protocol="jms" service-description="Bank Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation" transacted="false"/><Bank-HTTP-Gateway gatewayClass="org.jboss.soa.esb.listeners.gateway.JBossRemotingGatewayListener" is-gateway="true" jbr-serverBindAddress="192.168.1.111" jbr-serverBindPort="8765" jbr-serverProtocol="http" maxThreads="1" service-description="Bank !
 Reconciliation Service" target-service-category="Bank" target-service-name="Reconciliation"/></jbossesb-gateways>

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -13,6 +13,7 @@
 				<property name="message-selector" value="service='Reconciliation'"/>
 				<property name="persistent" value="true" />
 				<property name="acknowledge-mode" value="AUTO_ACKNOWLEDGE" />
+				<property name="transacted" value="false" />
 			</bus>
 		</bus-provider>
 		
@@ -29,6 +30,7 @@
 				<property name="message-selector" value="service='Reconciliation'" />
 				<property name="persistent" value="true" />
 				<property name="acknowledge-mode" value="AUTO_ACKNOWLEDGE" />
+				<property name="transacted" value="false" />
 			</bus>
 		</bus-provider>
 		

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetterUnitTest.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetterUnitTest.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetterUnitTest.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -128,6 +128,17 @@
 		assertEquals( propertyValue, toESBMessage.getProperties().getProperty( propertyKey )) ;
 	}
 	
+	@Test
+	public void setPropertiesFromJMSMessage_withJMSRedelivererdProperty_false() throws JMSException
+	{
+		boolean redelivered = false;
+		fromJMSTextMessage.setJMSRedelivered( redelivered );
+		
+		strategy.setPropertiesFromJMSMessage( fromJMSTextMessage , toESBMessage );
+		
+		assertEquals( redelivered, toESBMessage.getProperties().getProperty( JMSPropertiesSetter.JMS_REDELIVERED )) ;
+	}
+	
 	@Before
 	public void setup()
 	{

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -25,46 +25,29 @@
 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.nio.ByteBuffer;
 
-import javax.jms.BytesMessage;
 import javax.jms.DeliveryMode;
-import javax.jms.Destination;
 import javax.jms.ExceptionListener;
 import javax.jms.JMSException;
-import javax.jms.MapMessage;
 import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
 import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
 import javax.jms.QueueConnection;
-import javax.jms.QueueSender;
-import javax.jms.Session;
-import javax.jms.StreamMessage;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
 import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
 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.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.body.content.BytesBody;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 import org.jboss.soa.esb.message.format.MessageFactory;
 import org.jboss.soa.esb.message.format.MessageType;
 import org.junit.After;
@@ -72,7 +55,6 @@
 import org.junit.Test;
 import org.mockejb.jms.MockQueue;
 import org.mockejb.jms.MockTopic;
-import org.mockejb.jms.ObjectMessageImpl;
 import org.mockejb.jms.QueueConnectionFactoryImpl;
 import org.mockejb.jndi.MockContextFactory;
 
@@ -94,10 +76,16 @@
 	@Before
 	public void setUp() {
         try {
-    		MockContextFactory.setAsInitial();		
-    		Context ctx = new InitialContext();
-    		ctx.rebind(NotifyQueues.CONNECTION_FACTORY, new MockQueueConnectionFactory());
-    		ctx.close();
+    		MockContextFactory.setAsInitial();
+                final Context ctx = NamingContextPool.getNamingContext(null);
+                try
+                {
+                    ctx.rebind(NotifyQueues.CONNECTION_FACTORY, new MockQueueConnectionFactory());
+                }
+                finally
+                {
+                    NamingContextPool.releaseNamingContext(ctx) ;
+                }
     		rootEl = new ConfigTree("rootEl");
     
     		addMessagePropertyConfigs(rootEl);
@@ -115,9 +103,6 @@
 	
 	@After
 	public void tearDown() throws Exception {
-        if(notifyQueues != null) {
-            notifyQueues.release();
-        }
         MockContextFactory.revertSetAsInitial();
 	}
 	
@@ -172,12 +157,6 @@
 		assertEquals( 600l, notifyQueues.timeToLives[0] );
 	}
 	
-	@Test
-	public void release() 
-	{
-		notifyQueues.release();
-	}
-	
 	private void checkQueueTextMessage(MockQueue mockQueue, int messageIdx, String expectedText) throws JMSException {
 		assertTrue(mockQueue.getMessages().size() > messageIdx);		
 		Message message = mockQueue.getMessageAt(0);
@@ -220,22 +199,34 @@
 		queueEl.setAttribute(NotifyJMS.ATT_DEST_NAME, queueName);
 	}
 
-	private MockQueue createAndBindQueue(String queueName) throws NamingException {
+	private MockQueue createAndBindQueue(String queueName) throws NamingException, NamingContextException {
 		MockQueue mockQueue = new MockQueue(queueName);
 				
-		Context ctx = new InitialContext();
-		ctx.rebind(queueName, mockQueue);
-		ctx.close();
+                final Context ctx = NamingContextPool.getNamingContext(null);
+                try
+                {
+                    ctx.rebind(queueName, mockQueue);
+                }
+                finally
+                {
+                    NamingContextPool.releaseNamingContext(ctx) ;
+                }
 		return mockQueue;
 	}
 
 	@SuppressWarnings("unused")
-	private MockTopic createAndBindTopic(String topicName) throws NamingException {
+	private MockTopic createAndBindTopic(String topicName) throws NamingException, NamingContextException {
 		MockTopic mockTopic = new MockTopic(topicName);
 		
-		Context ctx = new InitialContext();
-		ctx.rebind(topicName, mockTopic);
-		ctx.close();
+		final Context ctx = NamingContextPool.getNamingContext(null);
+		try
+		{
+		    ctx.rebind(topicName, mockTopic);
+		}
+		finally
+		{
+		    NamingContextPool.releaseNamingContext(ctx) ;
+		}
 		return mockTopic;
 	}
         

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -34,7 +34,6 @@
 import javax.jms.TextMessage;
 import javax.jms.TopicConnection;
 import javax.naming.Context;
-import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
 import junit.framework.TestCase;
@@ -42,7 +41,8 @@
 import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.body.content.BytesBody;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 import org.jboss.soa.esb.message.format.MessageFactory;
 import org.jboss.soa.esb.message.format.MessageType;
 import org.mockejb.jms.MockTopic;
@@ -60,10 +60,16 @@
 	private NotifyTopics notifyTopics;
 	
 	protected void setUp() throws Exception {
-		MockContextFactory.setAsInitial();		
-		Context ctx = new InitialContext();
-		ctx.rebind(NotifyTopics.CONNECTION_FACTORY, new MockTopicConnectionFactory());
-		ctx.close();
+		MockContextFactory.setAsInitial();
+                final Context ctx = NamingContextPool.getNamingContext(null);
+                try
+                {
+                    ctx.rebind(NotifyTopics.CONNECTION_FACTORY, new MockTopicConnectionFactory());
+                }
+                finally
+                {
+                    NamingContextPool.releaseNamingContext(ctx) ;
+                }
 		ConfigTree rootEl = new ConfigTree("rootEl");
 
 		addMessagePropertyConfigs(rootEl);
@@ -76,7 +82,6 @@
 	}
 
 	protected void tearDown() throws Exception {
-		notifyTopics.release();
 		MockContextFactory.revertSetAsInitial();		
 	}
 
@@ -162,12 +167,18 @@
 		topicEl.setAttribute(NotifyJMS.ATT_DEST_NAME, topicName);
 	}
 
-	private MockTopic createAndBindTopic(String topicName) throws NamingException {
+	private MockTopic createAndBindTopic(String topicName) throws NamingException, NamingContextException {
 		MockTopic mockTopic = new MockTopic(topicName);
 		
-		Context ctx = new InitialContext();
-		ctx.rebind(topicName, mockTopic);
-		ctx.close();
+		final Context ctx = NamingContextPool.getNamingContext(null) ;
+		try
+		{
+		    ctx.rebind(topicName, mockTopic);
+		}
+		finally
+		{
+		    NamingContextPool.releaseNamingContext(ctx) ;
+		}
 		return mockTopic;
 	}
         

Modified: labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -33,10 +33,8 @@
 import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
 import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPoolContainer;
 import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.jboss.soa.esb.helpers.NamingContext;
-import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
+import org.jboss.soa.esb.common.Environment;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
@@ -194,9 +192,9 @@
     public Properties getEnvironment()
     {
     	  Properties environment = new Properties();
-          environment.setProperty(Context.PROVIDER_URL, NamingContext.JBOSS_PROVIDER_URL);
-          environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY);
-          environment.setProperty(Context.URL_PKG_PREFIXES, NamingContext.JBOSS_URL_PKG_PREFIX);
+          environment.setProperty(Context.PROVIDER_URL, Environment.JBOSS_PROVIDER_URL);
+          environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, Environment.JBOSS_INITIAL_CONTEXT_FACTORY);
+          environment.setProperty(Context.URL_PKG_PREFIXES, Environment.JBOSS_URL_PKG_PREFIX);
           return environment;
     }
     

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration1/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration1/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration1/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -38,22 +38,15 @@
   <target name="runtest">
     <echo message="This target is not implemented for this quickstart. Please run 'ant deployProcess' and 'ant startProcess'"/>
   </target>
-
-  <target name="refreshProcess" description="Moves the changed process definition to the server without restarting all the services">
-    <echo>Moves the changed process definition to the server without restarting all the services</echo>
-    <copy overwrite="true" 
-        file="${project.process.dir}/processdefinition.xml"
-	    tofile="${org.jboss.esb.server.deploy.dir}/${ant.project.name}.esb/processdefinition.xml"/>
-  </target>
 	
-  <target name="deployProcess" depends="compile" description="Sends a message to deploy the process definition">
-    <echo>Sends a message to deploy the process definition</echo>
-	<java fork="yes" classname="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration1.test.SendTestMessage" failonerror="true">
-		<arg value="${jbossesb.inputdir}"/>
-		<arg value=".deployProcessGW"/> <!-- file ext -->
-		<arg value="Go Deploy It"/> <!-- the file contents -->
-		<classpath refid="exec-classpath"/>
-	</java>
+  <target name="deployProcess" description="deploys the process definition" depends="jbossesb-dependencies">
+    <echo>Deploy the process definition</echo>
+	<taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
+		<classpath refid="exec-classpath"/>
+	</taskdef>
+	<deployToServer>
+		<fileset dir="${basedir}/processDefinition" includes="*"/>
+	</deployToServer>
   </target>
       
   <target name="startProcess" depends="compile" description="Sends a message to start the process instance">

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration1/jboss-esb-unfiltered.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration1/jboss-esb-unfiltered.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration1/jboss-esb-unfiltered.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -75,27 +75,6 @@
       </providers>
 
       <services>
-        <service category="BPM_Orchestration_Deploy_Service" name="Deploy_Service"
-                 description="BPM Orchestration Sample 1: Use this service to deploy a process instance">
-            <listeners>
-                <fs-listener name="Gateway" busidref="deployGwChannel"
-                    maxThreads="1"
-                    is-gateway="true" />
-                <fs-listener name="ESB-Listener" busidref="deployEsbChannel"
-                maxThreads="1"/>
-            </listeners>
-              <actions>
-		<action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore">
-			<property name="logSuccess" value="true"/>
-		</action>
-                <action name="DeployFromFile" 
-                  class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor">
-                  <property name="command" value="DeployProcessDefinition" />
-                  <property name="process-definition-file" value="/processdefinition.xml" />
-                </action>
-
-              </actions>
-        </service>
         
         <service category="BPM_Orchestration_Starter_Service" name="Starter_Service"
                  description="BPM Orchestration Sample 1: Use this service to start a process instance">

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration1/processDefinition/processdefinition.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration1/processDefinition/processdefinition.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration1/processDefinition/processdefinition.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
   
 <process-definition
-  xmlns="urn:jbpm.org:jpdl-3.2" name="processDefinition2">
+  name="processDefinition2">
    <start-state name="start">
       <event type="node-leave">
          <action name="action1" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration1.process_actions.MyBPMActionHandler" config-type="bean"></action>
       </event>
-      <transition name="" to="node1"></transition>
+      <transition to="node1"></transition>
    </start-state>
 
    <node name="node1">
@@ -20,7 +20,7 @@
          	<mapping esb="BODY_CONTENT" bpm="theBody" />
          </esbToBpmVars>
       </action>
-      <transition name="" to="node2"></transition>
+      <transition to="node2"></transition>
    </node>
    <node name="node2">
       <action name="action2" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
@@ -34,7 +34,7 @@
          	<mapping esb="BODY_CONTENT" bpm="theBody"/>
          </esbToBpmVars>
       </action>
-      <transition name="" to="node3"></transition>
+      <transition to="node3"></transition>
    </node>
    <node name="node3">
       <action name="action2" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
@@ -47,7 +47,7 @@
          	<mapping esb="BODY_CONTENT" bpm="theBody"/>
          </esbToBpmVars>
       </action>
-      <transition name="" to="Send Results"></transition>
+      <transition to="Send Results"></transition>
    </node>
    <end-state name="end1"></end-state>
    <node name="Send Results">
@@ -65,6 +65,6 @@
          </esbToBpmVars>
       </action>
    
-      <transition name="" to="end1"></transition>
+      <transition to="end1"></transition>
    </node>
 </process-definition>

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -31,12 +31,14 @@
 	<echo>Use "ant deployProcess" followed by "ant startProcess"</echo>
   </target>
 	
-  <target name="deployProcess" depends="compile" description="Sends a message to deploy the process definition">
-    <echo>Sends a message to deploy the process definition</echo>
-    <java fork="yes" classname="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration2.test.SendJMSMessageDeploy" failonerror="true">
-      <arg value="Hello World: Deploy the process def"/>
-      <classpath refid="exec-classpath"/>
-    </java>
+  <target name="deployProcess" description="deploys the process definition" depends="jbossesb-dependencies">
+    <echo>Deploy the process definition</echo>
+	<taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
+		<classpath refid="exec-classpath"/>
+	</taskdef>
+	<deployToServer>
+		<fileset dir="${basedir}/processDefinition" includes="*"/>
+	</deployToServer>
   </target>
       
   <target name="startProcess" depends="compile" description="Sends a message to start the process instance">

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/jboss-esb.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/jboss-esb.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -62,30 +62,8 @@
       </providers>
 
       <services>
-        <service category="BPM_Orchestration2_Deploy_Service" name="Deploy_Service"
-                 description="BPM Orchestration Sample 2: Use this service to deploy a process instance">
-            <listeners>
-                <jms-listener name="JMS-Gateway" busidref="deployGwChannel"
-                    maxThreads="1"
-                    is-gateway="true" />
-                <jms-listener name="ESB-Listener" busidref="deployEsbChannel"
-                maxThreads="1"/>
-            </listeners>
-              <actions>
-                <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore">
-                    <property name="logSuccess" value="true"/>
-                </action>
-                <action name="DeployFromFile" 
-                  class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor">
-                  <property name="command" value="DeployProcessDefinition" />
-                  <property name="process-definition-file" value="/processDefinition/processdefinition.xml" />
-                </action>
-				<action name="deployed-message" class="org.jboss.soa.esb.actions.SystemPrintln">
-					<property name="message" value="Process Definition Deployed" />
-				</action>                
-	</actions>
-     </service>
         
+        
         <service category="BPM_Orchestration2_Starter_Service" name="Starter_Service"
                  description="BPM Orchestration Sample 2: Use this service to start a process instance">
             <listeners>
@@ -95,7 +73,7 @@
                 <jms-listener name="ESB-Listener" busidref="startEsbChannel"
                 maxThreads="1"/>
             </listeners>
-            <actions>
+            <actions mep="OneWay">
                 <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
 				<action name="dump1" class="org.jboss.soa.esb.actions.SystemPrintln">
                    		<property name="printfull" value="true"/>

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/processDefinition/processdefinition.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/processDefinition/processdefinition.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/processDefinition/processdefinition.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <process-definition
-  xmlns="urn:jbpm.org:jpdl-3.1"  name="bpm_orchestration2Process">
+    name="bpm_orchestration2Process">
    <start-state name="start">
       <transition name="" to="Receive Order"></transition>
    </start-state>

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/readme.txt
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/readme.txt	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration2/readme.txt	2008-02-28 16:09:28 UTC (rev 18617)
@@ -70,53 +70,46 @@
 
     esb-name maps to Message.getBody().get("esbMsgVar1")
     "BODY_CONTENT" maps to Message.getBody()
+
+Sample Output from "ant deployProcess": 
+======================================
+13:14:07,359 INFO  [CommandExecutor] Process Definition 'bpm_orchestration2Process' is deployed.
+13:14:07,396 INFO  [STDOUT] Process Definition Deployed: 
+13:14:07,396 INFO  [STDOUT] [Hello World: Deploy the process def].
 
 Sample Output from "ant startProcess":
-======================================
-11:18:50,656 INFO  [STDOUT] ** Begin Receive Order - Service 1 **
-11:18:50,765 INFO  [STDOUT] In: Getting Started
-11:18:50,765 INFO  [STDOUT] Out: Getting Started 'Receive Order'
-11:18:50,765 INFO  [STDOUT] ** End Receive Order - Service 1 **
-11:18:51,640 INFO  [STDOUT] ** Begin Credit Check - Service 3 **
-11:18:51,640 INFO  [STDOUT] In: Getting Started 'Receive Order'
-11:18:51,640 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'
-
-11:18:51,640 INFO  [STDOUT] ** End Credit Check - Service 3 **
-11:18:52,312 INFO  [STDOUT] ** Begin Validate Order - Service 2 **
-11:18:52,312 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'
-
-11:18:52,312 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'
-  'Validate Order'
-11:18:52,312 INFO  [STDOUT] ** End Validate Order - Service 2 **
-11:18:52,828 INFO  [STDOUT] ** Begin Inventory Check - Service 4 **
-11:18:52,828 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'
- 'Validate Order'
-11:18:52,828 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'
-  'Validate Order'  'Inventory Check'
-11:18:52,828 INFO  [STDOUT] ** End Inventory Check - Service 4 **
-11:18:53,359 INFO  [STDOUT] ** Begin Atlanta - Service 7 **
-11:18:53,359 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'
- 'Validate Order'  'Inventory Check'
-11:18:53,359 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'
-  'Validate Order'  'Inventory Check'  'Atlanta'
-11:18:53,359 INFO  [STDOUT] ** End Atlanta - Service 7 **
-11:18:53,734 INFO  [STDOUT] ** Begin Dallas - Service 6 **
-11:18:53,734 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'
- 'Validate Order'  'Inventory Check'  'Atlanta'
-11:18:53,734 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'
-  'Validate Order'  'Inventory Check'  'Atlanta'  'Dallas'
-11:18:53,734 INFO  [STDOUT] ** End Dallas - Service 6 **
-11:18:54,078 INFO  [STDOUT] ** Begin Los Angeles - Service 5 **
-11:18:54,093 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'
- 'Validate Order'  'Inventory Check'  'Atlanta'  'Dallas'
-11:18:54,093 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'
-  'Validate Order'  'Inventory Check'  'Atlanta'  'Dallas'  'Los Angeles'
-11:18:54,093 INFO  [STDOUT] ** End Los Angeles - Service 5 **
-11:18:54,234 INFO  [STDOUT] Very simple BPM Process ActionHandler
-11:18:54,453 INFO  [MessageSpy] Body: Getting Started 'Receive Order'  'Credit C
-heck'  'Validate Order'  'Inventory Check'  'Atlanta'  'Dallas'  'Los Angeles'
-11:18:54,640 INFO  [STDOUT] SUCCESS!:
-11:18:54,640 INFO  [STDOUT] [Getting Started 'Receive Order'  'Credit Check'  'V
-alidate Order'  'Inventory Check'  'Atlanta'  'Dallas'  'Los Angeles' ].
-11:18:54,937 INFO  [MessageSpy] Body: Getting Started 'Receive Order'  'Credit C
-heck'  'Validate Order'  'Inventory Check'  'Atlanta'  'Dallas'  'Los Angeles'
\ No newline at end of file
+======================================
+13:18:38,451 INFO  [STDOUT] ** Begin Receive Order - Service 1 **
+13:18:38,451 INFO  [STDOUT] In: Getting Started
+13:18:38,451 INFO  [STDOUT] Out: Getting Started 'Receive Order' 
+13:18:38,451 INFO  [STDOUT] ** End Receive Order - Service 1 **
+13:18:38,553 INFO  [STDOUT] ** Begin Credit Check - Service 3 **
+13:18:38,554 INFO  [STDOUT] In: Getting Started 'Receive Order' 
+13:18:38,554 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check' 
+13:18:38,554 INFO  [STDOUT] ** End Credit Check - Service 3 **
+13:18:38,651 INFO  [STDOUT] ** Begin Validate Order - Service 2 **
+13:18:38,651 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check' 
+13:18:38,651 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'  'Validate Order' 
+13:18:38,651 INFO  [STDOUT] ** End Validate Order - Service 2 **
+13:18:38,736 INFO  [STDOUT] ** Begin Inventory Check - Service 4 **
+13:18:38,736 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'  'Validate Order' 
+13:18:38,736 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check' 
+13:18:38,736 INFO  [STDOUT] ** End Inventory Check - Service 4 **
+13:18:38,847 INFO  [STDOUT] ** Begin Los Angeles - Service 5 **
+13:18:38,847 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check' 
+13:18:38,848 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'  'Los Angeles' 
+13:18:38,848 INFO  [STDOUT] ** End Los Angeles - Service 5 **
+13:18:38,891 INFO  [STDOUT] ** Begin Atlanta - Service 7 **
+13:18:38,892 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check' 
+13:18:38,892 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'  'Atlanta' 
+13:18:38,893 INFO  [STDOUT] ** End Atlanta - Service 7 **
+13:18:38,949 INFO  [STDOUT] ** Begin Dallas - Service 6 **
+13:18:38,949 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check' 
+13:18:38,950 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'  'Dallas' 
+13:18:38,950 INFO  [STDOUT] ** End Dallas - Service 6 **
+13:18:39,105 INFO  [STDOUT] ***** Ship It *****
+13:18:39,106 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'  'Dallas' 
+13:18:39,106 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'  'Dallas'  'Shipped' 
+13:18:39,106 INFO  [STDOUT] ***** End Ship It *****
+13:18:39,113 INFO  [STDOUT] SUCCESS!: 
+13:18:39,113 INFO  [STDOUT] [Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'  'Dallas'  'Shipped' ].
\ No newline at end of file

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -35,17 +35,17 @@
 	<echo>Use "ant deployProcess" followed by "ant startProcess"</echo>
   </target>
 	
-  <target name="deployProcess" depends="compile" description="Sends a message to deploy the process definition">
-    <echo>Sends a message to deploy the process definition</echo>
-     <java fork="yes" classname="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration3.test.SendJMSMessage" failonerror="true">
-       <arg value="queue/quickstart_bpm_orchestration3_deploy_Request_gw"/>       
-     	 <arg value="Hello Deploy"/>
-		   <classpath refid="exec-classpath"/>
-     </java>
-  </target> 
+  <target name="deployProcess" description="deploys the process definition" depends="jbossesb-dependencies">
+    <echo>Deploy the process definition</echo>
+	<taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
+		<classpath refid="exec-classpath"/>
+	</taskdef>
+	<deployToServer>
+		<fileset dir="${basedir}/processDefinition" includes="*"/>
+	</deployToServer>
+  </target>
   
   <target name="startProcess" depends="compile" description="Sends a message to start a new process instance">
-	<echo>TOKEN=$token</echo>
     <echo>Sends a message to start a new process instance</echo>
      <java fork="yes" classname="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration3.test.SendJMSMessage" failonerror="true">
        <arg value="queue/quickstart_bpm_orchestration3_start_Request_gw"/>       
@@ -65,7 +65,7 @@
        <arg value="queue/quickstart_bpm_orchestration3_signal_Request_gw"/>      
      	 <arg value="Hello Signal"/>
      	 <arg value="${token}"/>
-		   <classpath refid="exec-classpath"/>
+	  <classpath refid="exec-classpath"/>
      </java>
   </target> 
 	

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -48,29 +48,6 @@
       </providers>
 
       <services>
-        <service category="BPM_Orchestration3_Deploy_Service" name="Deploy_Service"
-                 description="BPM Orchestration Sample 3: Use this service to deploy a process instance">
-            <listeners>
-                <jms-listener name="JMS-Gateway" busidref="deployGwChannel"
-                    maxThreads="1"
-                    is-gateway="true" />
-                <jms-listener name="ESB-Listener" busidref="deployEsbChannel"
-                maxThreads="1"/>
-            </listeners>
-              <actions>
-                <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore">
-                    <property name="logSuccess" value="true"/>
-                </action>
-                <action name="DeployFromFile" 
-                  class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor">
-                  <property name="command" value="DeployProcessDefinition" />
-                  <property name="process-definition-file" value="/processDefinition/processdefinition.xml" />
-                </action>
-		<action name="deployed-message" class="org.jboss.soa.esb.actions.SystemPrintln">
-			<property name="message" value="Process Definition Deployed" />
-		</action>           
-              </actions>
-        </service>
         
         <service category="BPM_Orchestration3_Starter_Service" name="Starter_Service"
                  description="BPM Orchestration Sample 3: Use this service to start a process instance">
@@ -81,7 +58,7 @@
                 <jms-listener name="ESB-Listener" busidref="startEsbChannel"
                 maxThreads="1"/>
             </listeners>
-            <actions>
+            <actions mep="OneWay">
                  <action name="setupKey" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration3.esb_actions.SetupKey">
                  </action>                    
                  <action name="dump2" class="org.jboss.soa.esb.actions.SystemPrintln">
@@ -111,7 +88,7 @@
                 <jms-listener name="ESB-Listener" busidref="signalEsbChannel"
                 maxThreads="1"/>
             </listeners>
-            <actions>
+            <actions mep="OneWay">
                  <!--
                  <action name="dump1" class="org.jboss.soa.esb.actions.SystemPrintln">
                       <property name="message" value="SIGNAL" />
@@ -146,7 +123,7 @@
                 <jms-listener name="ESB-Listener" busidref="service1EsbChannel"
                 maxThreads="1"/>
             </listeners>
-            <actions>
+            <actions mep="OneWay">
 								 <!--
                  <action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln">
                    	<property name="printfull" value="true"/>

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/processDefinition/processdefinition.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/processDefinition/processdefinition.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/processDefinition/processdefinition.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<process-definition xmlns="" name="bpm_orchestration3Process">
+<process-definition name="bpm_orchestration3Process">
 
 
 	<start-state name="start-state1">

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/readme.txt
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/readme.txt	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/readme.txt	2008-02-28 16:09:28 UTC (rev 18617)
@@ -19,41 +19,41 @@
      'Process Definition Deployed:' to appear on the console.
   3. In Window1, type 'ant startProcess -Dtoken=Demo1'
      Switch back to Application/ESB Server console and look for
-     [STDOUT] ** Begin Service 1 **
-		 [STDOUT] In: Hello start
-		 [STDOUT] jbpmTokenId: 12
-		 [STDOUT] Out: Hello start 'Service 1'
-		 [STDOUT] ** End Service 1 **
-		 Note: "12" will be unique to your installation and will change with each process instance you start
-		 It is important to remember this number as it is used in the next step .
-  4. In Window1, type 'ant signalProcess -Dtoken=12'
+     [STDOUT] ** Begin Service 1 **
+     [STDOUT] In : Hello start
+     [STDOUT] Out: Hello start 'Service 1' 
+     [STDOUT] ** End Service 1 **
+
+  4. Enter the jBPM console (http://localhost:8080/jbpm-console/sa/processes.jsf), and
+     login.   Once logged in, examine each process that you see using the "Examine" link 
+     and find the "Instance ID" for the process that has a Key of "Demo1". 
+  5. In Window1, if the Instance ID you found in Step 4 was 1, 
+     type 'ant -Dtoken=1 signalProcess'
+     Substitute whatever number you found for an instance id in the environment variable 
+     part of that statement (-Dtoken=[Instance ID]).
      Switch back to Application/ESB Server console and look for:
-     [SetupSignal] --------------------------------
-     [SetupSignal] jbpmTokenId: 12
-     [SetupSignal] Body: Hello Signal
-     [SetupSignal] --------------------------------
-     [STDOUT] ** Begin Service 2 **
-     [STDOUT] In: Hello Signal
-		 [STDOUT] jbpmTokenId: 12
-		 [STDOUT] Out: Hello Signal 'Service 2'
-     [STDOUT] ** End Service 2 **
+     [SetupSignal] --------------------------------
+     [SetupSignal] jbpmTokenId: 1
+     [SetupSignal] Body: Hello Signal
+     [SetupSignal] --------------------------------
+     [STDOUT] ** Begin Service 2 **
+     [STDOUT] In: Hello Signal
+     [STDOUT] Out: Hello Signal 'Service 2' 
+     [STDOUT] ** End Service 2 **
+     [STDOUT] ** Begin Service 3 **
+     [STDOUT] In: Hello Signal 'Service 2' 
+     [STDOUT] Out: Hello Signal 'Service 2'  'Service 3' 
+     [STDOUT] ** End Service 3 **
+     [SetupSignal] --------------------------------
+     [SetupSignal] jbpmTokenId: 1
+     [SetupSignal] Body: Hello Signal
+     [SetupSignal] --------------------------------
+
      Note: The STDOUT messages are from the 3 groovy scripts representing the logic of
      each service.
-  5. In Window1, type 'ant signalProcess -Dtoken=12'
-     Switch back to Application/ESB Server console and look for:
-     [SetupSignal] --------------------------------
-		 [SetupSignal] jbpmTokenId: 12
-     [SetupSignal] Body: Hello Signal
-     [SetupSignal] --------------------------------
-     [STDOUT] ** Begin Service 3 **
-     [STDOUT] In: Hello Signal
-     [STDOUT] Out: Hello Signal 'Service 3'
-     [STDOUT] ** End Service 3 **
-     Note: this is the final service call and the process instance now waits at node 3.  
-     The next signal moves it to the end state.
-  6. In Window1, type 'ant signalProcess -Dtoken=12'  
-  7. To undeploy the esb archive, type 'ant undeploy' ("Window1").
 
+  6. To undeploy the esb archive, type 'ant undeploy' ("Window1").
+
 Things to Consider:
 ===================
    - Review the process definition, specifically one of the nodes like Service 1:
@@ -82,10 +82,6 @@
 	 
 	The secret to being able to wake up a sleeping process instance is the tokenid.
 	
-	When the process instance invokes an ESB Service it embeds "jbpmTokenId"
-	into the message.  It can be retrieved in a custom action or in this example's
-	case groovy with - message.body.get("jbpmTokenId")
-	
 	This example uses two custom actions to prepare the content needed to properly
 	interact with the jBPM business process. SetupKey.java and SetupSignal.java are
 	used to peel the businessKey and/or the token id out of the JMS message and place
@@ -99,8 +95,7 @@
 	
 	Tip: If you use the jbpm-console (http://localhost:8080) and the Graphical Process
 	Designer provided by Red Hat Developer Studio then you can visually "see" the process
-	moving from step to step to step with each command line signal.
+	moving from step to step to step with each command line signal.	
 	
 	
-	
 	
\ No newline at end of file

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy	2008-02-28 16:09:28 UTC (rev 18617)
@@ -3,7 +3,6 @@
 println "** Begin Service 1 **"
 
 println "In: " + message.getBody().get()
-println "jbpmTokenId: " + message.body.get("jbpmTokenId")
 
 message.getBody().add(message.getBody().get() + " 'Service 1' ")
 

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy	2008-02-28 16:09:28 UTC (rev 18617)
@@ -3,7 +3,6 @@
 println "** Begin Service 2 **"
 
 println "In: " + message.getBody().get()
-println "jbpmTokenId: " + message.body.get("jbpmTokenId")
 
 message.getBody().add(message.getBody().get() + " 'Service 2' ")
 

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/conf/base-build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/conf/base-build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/conf/base-build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -24,7 +24,7 @@
 	<!-- Are we embedded in a jbossesb distribution hierarchy? -->
 	<condition property="hierarchy.jbossesb">
 		<and>
-			<available file="${product.dir}/JBossORG-EULA.txt"/>
+			<available file="${product.dir}/JEMS-EULA.txt"/>
 			<not>
 				<or>
 					<available file="${product.dir}/server/default"/>
@@ -36,7 +36,7 @@
 	<!-- Are we embedded in a jbossesb-server distribution hierarchy? -->
 	<condition property="hierarchy.jbossesb-server">
 		<and>
-			<available file="${product.dir}/JBossORG-EULA.txt"/>
+			<available file="${product.dir}/JEMS-EULA.txt"/>
 			<or>
 				<available file="${product.dir}/server/default"/>
 				<available file="${product.dir}/server/production"/>
@@ -175,6 +175,18 @@
 
 	<target name="jbossesb-source-dependencies"
 		depends="jbossesb-quickstart-override" if="build.jbossesb">
+		<condition 
+			property="org.jboss.esb.server.config" 
+			value="${quickstart.org.jboss.esb.server.config}">
+			<isset property="quickstart.org.jboss.esb.server.config"/>
+		</condition>
+
+		<condition
+			property="org.jboss.esb.server.home"  
+			value="${quickstart.org.jboss.esb.server.home}">
+			<isset property="quickstart.org.jboss.esb.server.home"/>
+		</condition>
+		
 		<!-- check for installation deployment.properties -->
 		<property name="install.dir" value="${product.dir}/install"/>
 		<property file="${install.dir}/deployment.properties" prefix="install" />
@@ -237,7 +249,9 @@
 <!-- compile-classpath, exec-classpath                                    -->
 <!-- ==================================================================== -->
 
-	<target name="dependencies" depends="messaging-dependencies, jbossmq-dependencies, quickstart-specific-dependencies">
+	<target name="dependencies" depends="classpath-dependencies, quickstart-specific-checks"/>
+
+	<target name="classpath-dependencies" depends="messaging-dependencies, jbossmq-dependencies, quickstart-specific-dependencies">
     	
 		<path id="compile-classpath">
 			<path refid="quickstart-dependencies-classpath" />
@@ -247,6 +261,7 @@
 			<path refid="deployment-classpath" />
 			<fileset dir="${org.jboss.esb.server.home}/client" includes="*.jar" /> <!-- Required for JMS Client Code. -->
 		</path>
+		<property name="compile-classpath" refid="compile-classpath"/>
 
 		<path id="exec-classpath">
 			<pathelement location="." />
@@ -260,6 +275,7 @@
 			<path refid="compile-classpath" />
             <pathelement location="${pwd}/anttasks/classes" />
 		</path>
+		<property name="exec-classpath" refid="exec-classpath"/>
 	</target>
 
 <!-- ==================================================================== -->
@@ -277,8 +293,8 @@
 
         <mkdir dir="${pwd}/anttasks/classes" />
         <javac srcdir="${pwd}/anttasks/src" destdir="${pwd}/anttasks/classes" debug="true">
-            <classpath refid="compile-classpath" />
-        </javac>
+			<classpath refid="compile-classpath" />			
+		</javac>
 	</target>
 	
 	<target name="run" depends="compile,config">
@@ -447,7 +463,7 @@
 <!-- supports JBossWS or EJB.                                             -->
 <!-- ==================================================================== -->
 
-    <target name="assert-ws-available">
+    <target name="assert-ws-available" depends="jbossesb-dependencies">
         <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"/>
     	
@@ -481,7 +497,7 @@
         <fail unless="quickstart.ftp.config" message="Please configure ftp properties in quickstart.properties"/>
     </target>
 
-    <target name="assert-jbossremoting-version">
+    <target name="assert-jbossremoting-version" depends="classpath-dependencies">
         <java fork="yes" classname="org.jboss.remoting.Version" failonerror="true" outputproperty="jbr-version-string">
             <classpath refid="exec-classpath"/>
         </java>
@@ -510,6 +526,8 @@
     	<path id="quickstart-dependencies-classpath"/>
     </target>
 
+    <target name="quickstart-specific-checks"/>
+
     <target name="quickstart-specific-assemblies">
         <echo message="No Quickstart specific assembly tasks." />
     </target>

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -13,8 +13,9 @@
           			status-column="STATUS_COL"
 				order-by="DATA_COLUMN"	
 				where-condition="DATA_COLUMN like 'data%'"
-
+					message-column="message"
           			message-id-column="UNIQUE_ID"
+          			insert-timestamp-column="TIMESTAMP_COL"
           		/>
           	</sql-bus>
           </sql-provider>

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted)

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/build.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/build.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,70 +0,0 @@
-<project name="Quickstart_JMS_Transacted" default="deploy" basedir=".">
-	
-	<description> 
-		${ant.project.name}
-		${line.separator}
-	</description>
-
-	<property name="additional.deploys" value="jbossesb-service.xml" />
-	
-	<!-- Import the base Ant build script... -->
-	<import file="../conf/base-build.xml"/>
-
-	<target name="quickstart-specific-deploys">
-		<copy file="quickstart-ds.xml" 
-			todir="${org.jboss.esb.server.deploy.dir}"
-			overwrite="false"/>
-	</target>
-	
-	<target name="quickstart-specific-undeploys">
-		<delete file="${org.jboss.esb.server.deploy.dir}/quickstart-ds.xml"/> 
-	</target>
-
-	<target name="runtest" depends="compile" 
-		description="sends a JMS message to queue/quickstart_jms_transacted_Request_gw">
-		<echo>Runs Test JMS Sender</echo>
-		<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.SendJMSMessage" failonerror="true">
-			<arg value="Hello Transacted JMS World]"/>
-			<classpath refid="exec-classpath"/>
-		</java>
-	</target>  
-
-	 <target name="select" depends="dependencies" description="select * from jsm_transacted_table">
-        <property name="hsqldb.jar"
-            value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
-        <echo>Select * from jms_transacted_table</echo>
-        <sql
-            print="true"
-            driver="org.hsqldb.jdbcDriver"
-            url="jdbc:hsqldb:hsql://localhost:1703"
-            userid="sa"
-            autocommit="true"
-            password="">
-            <classpath>
-                <pathelement path="${hsqldb.jar}"/>
-            </classpath>
-            <transaction>
-            select data_column from jms_transacted_table
-            </transaction>
-            </sql>
-
-    </target>
-
-	<target name="truncate" depends="dependencies" description="delete from jms_transacted_table">
-        <property name="hsqldb.jar"
-            value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
-        <echo>Delete from jms_transacted_table </echo>
-        <sql
-            print="true"
-            driver="org.hsqldb.jdbcDriver"
-            url="jdbc:hsqldb:hsql://localhost:1703"
-            userid="sa"
-            autocommit="true"
-            password="">
-            <classpath>
-                <pathelement path="${hsqldb.jar}"/>
-            </classpath>
-            <transaction>delete from jms_transacted_table</transaction>
-            </sql>
-    </target>
-</project>

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/build.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/build.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/build.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,70 @@
+<project name="Quickstart_JMS_Transacted" default="deploy" basedir=".">
+	
+	<description> 
+		${ant.project.name}
+		${line.separator}
+	</description>
+
+	<property name="additional.deploys" value="jbossesb-service.xml" />
+	
+	<!-- Import the base Ant build script... -->
+	<import file="../conf/base-build.xml"/>
+
+	<target name="quickstart-specific-deploys">
+		<copy file="quickstart-ds.xml" 
+			todir="${org.jboss.esb.server.deploy.dir}"
+			overwrite="false"/>
+	</target>
+	
+	<target name="quickstart-specific-undeploys">
+		<delete file="${org.jboss.esb.server.deploy.dir}/quickstart-ds.xml"/> 
+	</target>
+
+	<target name="runtest" depends="compile" 
+		description="sends a JMS message to queue/quickstart_jms_transacted_Request_gw">
+		<echo>Runs Test JMS Sender</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.SendJMSMessage" failonerror="true">
+			<arg value="Hello Transacted JMS World]"/>
+			<classpath refid="exec-classpath"/>
+		</java>
+	</target>  
+
+	 <target name="select" depends="dependencies" description="select * from jsm_transacted_table">
+        <property name="hsqldb.jar"
+            value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
+        <echo>Select * from jms_transacted_table</echo>
+        <sql
+            print="true"
+            driver="org.hsqldb.jdbcDriver"
+            url="jdbc:hsqldb:hsql://localhost:1703"
+            userid="sa"
+            autocommit="true"
+            password="">
+            <classpath>
+                <pathelement path="${hsqldb.jar}"/>
+            </classpath>
+            <transaction>
+            select data_column from jms_transacted_table
+            </transaction>
+            </sql>
+
+    </target>
+
+	<target name="truncate" depends="dependencies" description="delete from jms_transacted_table">
+        <property name="hsqldb.jar"
+            value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/lib/hsqldb.jar"/>
+        <echo>Delete from jms_transacted_table </echo>
+        <sql
+            print="true"
+            driver="org.hsqldb.jdbcDriver"
+            url="jdbc:hsqldb:hsql://localhost:1703"
+            userid="sa"
+            autocommit="true"
+            password="">
+            <classpath>
+                <pathelement path="${hsqldb.jar}"/>
+            </classpath>
+            <transaction>delete from jms_transacted_table</transaction>
+            </sql>
+    </target>
+</project>

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/deployment.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/deployment.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/deployment.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +0,0 @@
-<jbossesb-deployment>
-  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb</depends>
-  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw</depends>
-</jbossesb-deployment>

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/deployment.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/deployment.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/deployment.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/deployment.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,4 @@
+<jbossesb-deployment>
+  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb</depends>
+  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw</depends>
+</jbossesb-deployment>

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw"
-    xmbean-dd="xmdesc/Queue-xmbean.xml">
-    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-	<depends>jboss.messaging:service=PostOffice</depends>
-  </mbean>
-
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb"
-    xmbean-dd="xmdesc/Queue-xmbean.xml">
-	<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-	<depends>jboss.messaging:service=PostOffice</depends>
-  </mbean>
-
-</server>

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+	<depends>jboss.messaging:service=PostOffice</depends>
+  </mbean>
+
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+	<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+	<depends>jboss.messaging:service=PostOffice</depends>
+  </mbean>
+
+</server>

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
-  </mbean>
-
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
-  </mbean>
-</server>

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+  </mbean>
+
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+  </mbean>
+</server>

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jboss-esb.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/jboss-esb.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jboss-esb.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,71 +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-jca-provider name="JBossMessaging" connection-factory="XAConnectionFactory"
-                        jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-                        jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-                      
-              <jms-bus busid="quickstartGwChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/quickstart_jms_transacted_Request_gw"
-					  transacted="true"
-                   />
-              </jms-bus>
-              <jms-bus busid="quickstartEsbChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/quickstart_jms_transacted_Request_esb"
-					  transacted="true"
-                  />
-              </jms-bus>
-
-          </jms-jca-provider>
-      </providers>
-      
-      <services>
-        <service 
-        	category="JMSSecuredESB" 
-        	name="SimpleListener" 
-        	description="JMS Secured quickstart sample">
-            <listeners>
-                <jms-listener name="JMS-Gateway"
-                    busidref="quickstartGwChannel"
-                    maxThreads="1"
-                    is-gateway="true"
-                />
-                <jms-listener name="jmssecured"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1"/>
-            </listeners>
-            <actions mep="OneWay">
-            
-				<action name="printMessage" class="org.jboss.soa.esb.actions.SystemPrintln">
-					<property name="message" value="JMS Transacted Quickstart start..."/>
-					<property name="printfull" value="false"/>
-				</action>
-
-				<action name="insertDBAction" class="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.DBInsertAction">
-					<property name="datasource-name" value="java:QuickstartDS"/>
-					<property name="db-insert-sql" value="insert into jms_transacted_table(data_column) values(?)"/>
-				</action>
-                    
-				<!-- 
-					Will throw an Exception upon every other first. This should trigger the transaction to be 
-					rolledback and the message placed back onto the JMS queue.
-				-->
-				<action name="throwExceptionAction" class="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction"/>
-				
-				<action name="printMessageDone" class="org.jboss.soa.esb.actions.SystemPrintln">
-					<property name="message" value="JMS Transacted Quickstart processed sucessfully"/>
-					<property name="printfull" value="false"/>
-				</action>
-				                    
-				<!-- The next action is for Continuous Integration testing -->
-				<action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
-            </actions>
-        </service>
-      </services>
-     
-</jbossesb>

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jboss-esb.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/jboss-esb.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jboss-esb.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jboss-esb.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,71 @@
+<?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-jca-provider name="JBossMessaging" connection-factory="XAConnectionFactory"
+                        jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+                        jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
+                      
+              <jms-bus busid="quickstartGwChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/quickstart_jms_transacted_Request_gw"
+					  transacted="true"
+                   />
+              </jms-bus>
+              <jms-bus busid="quickstartEsbChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/quickstart_jms_transacted_Request_esb"
+					  transacted="true"
+                  />
+              </jms-bus>
+
+          </jms-jca-provider>
+      </providers>
+      
+      <services>
+        <service 
+        	category="JMSSecuredESB" 
+        	name="SimpleListener" 
+        	description="JMS Secured quickstart sample">
+            <listeners>
+                <jms-listener name="JMS-Gateway"
+                    busidref="quickstartGwChannel"
+                    maxThreads="1"
+                    is-gateway="true"
+                />
+                <jms-listener name="jmssecured"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"/>
+            </listeners>
+            <actions mep="OneWay">
+            
+				<action name="printMessage" class="org.jboss.soa.esb.actions.SystemPrintln">
+					<property name="message" value="JMS Transacted Quickstart start..."/>
+					<property name="printfull" value="false"/>
+				</action>
+
+				<action name="insertDBAction" class="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.DBInsertAction">
+					<property name="datasource-name" value="java:QuickstartDS"/>
+					<property name="db-insert-sql" value="insert into jms_transacted_table(data_column) values(?)"/>
+				</action>
+                    
+				<!-- 
+					Will throw an Exception upon every other first. This should trigger the transaction to be 
+					rolledback and the message placed back onto the JMS queue.
+				-->
+				<action name="throwExceptionAction" class="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction"/>
+				
+				<action name="printMessageDone" class="org.jboss.soa.esb.actions.SystemPrintln">
+					<property name="message" value="JMS Transacted Quickstart processed sucessfully"/>
+					<property name="printfull" value="false"/>
+				</action>
+				                    
+				<!-- The next action is for Continuous Integration testing -->
+				<action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  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,
-  @author JBoss Inc.
--->
-<!-- $Id: jbossesb-unittest-properties.xml $ -->
-<!--
-  These options are described in the JBossESB manual.
-  Defaults are provided here for convenience only.
- 
-  Please read through this file prior to using the system, and consider
-  updating the specified entries.
--->
-<esb
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
-    <properties name="core">
-		<property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
-		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
-		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
-    </properties>
-    <properties name="registry">      
-    	<property name="org.jboss.soa.esb.registry.queryManagerURI"     		
-    		value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>    		
-    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"     		
-    		value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
-    	<property name="org.jboss.soa.esb.registry.implementationClass" 
-    		value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.factoryClass" 
-    		value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.user" 
-    		value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.registry.password" 
-    	  value="password"/>
-    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
-    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" 
-    		value="org.apache.ws.scout.transport.RMITransport"/>
-    </properties>
-    <properties name="transports" depends="core">
-    	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
-    	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
-    	<property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
-    </properties>
-    <properties name="connection">
-    	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
-    	<property name="blocking-timeout-millis" value="5000"/>
-    	<property name="abandoned-connection-timeout" value="10000"/>
-    	<property name="abandoned-connection-time-interval" value="30000"/>
-    </properties>
-    <properties name="dbstore">
-		<property name="org.jboss.soa.esb.persistence.db.connection.url" 	value="jdbc:hsqldb:hsql://localhost:9001/"/>
-		<property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		value="org.hsqldb.jdbcDriver"/>
-		<property name="org.jboss.soa.esb.persistence.db.user" 			value="sa"/>
-		<property name="org.jboss.soa.esb.persistence.db.pwd" 			value=""/>		
-		<property name="org.jboss.soa.esb.persistence.db.pool.initial.size"	value="2"/>
-		<property name="org.jboss.soa.esb.persistence.db.pool.min.size"	value="2"/>
-		<property name="org.jboss.soa.esb.persistence.db.pool.max.size"	value="5"/>
-		<!--table managed by pool to test for valid connections - created by pool automatically -->
-		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
-		<!-- # of milliseconds to timeout waiting for a connection from pool -->
-		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
-                <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
-    </properties>
-    <properties name="messagerouting">
-    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
-    </properties>
-</esb>

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  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,
+  @author JBoss Inc.
+-->
+<!-- $Id: jbossesb-unittest-properties.xml $ -->
+<!--
+  These options are described in the JBossESB manual.
+  Defaults are provided here for convenience only.
+ 
+  Please read through this file prior to using the system, and consider
+  updating the specified entries.
+-->
+<esb
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
+    <properties name="core">
+		<property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
+		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
+		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+    </properties>
+    <properties name="registry">      
+    	<property name="org.jboss.soa.esb.registry.queryManagerURI"     		
+    		value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>    		
+    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"     		
+    		value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
+    	<property name="org.jboss.soa.esb.registry.implementationClass" 
+    		value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.factoryClass" 
+    		value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.user" 
+    		value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.registry.password" 
+    	  value="password"/>
+    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" 
+    		value="org.apache.ws.scout.transport.RMITransport"/>
+    </properties>
+    <properties name="transports" depends="core">
+    	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
+    	<property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
+    </properties>
+    <properties name="connection">
+    	<property name="min-pool-size" value="5"/>
+    	<property name="max-pool=size" value="10"/>
+    	<property name="blocking-timeout-millis" value="5000"/>
+    	<property name="abandoned-connection-timeout" value="10000"/>
+    	<property name="abandoned-connection-time-interval" value="30000"/>
+    </properties>
+    <properties name="dbstore">
+		<property name="org.jboss.soa.esb.persistence.db.connection.url" 	value="jdbc:hsqldb:hsql://localhost:9001/"/>
+		<property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		value="org.hsqldb.jdbcDriver"/>
+		<property name="org.jboss.soa.esb.persistence.db.user" 			value="sa"/>
+		<property name="org.jboss.soa.esb.persistence.db.pwd" 			value=""/>		
+		<property name="org.jboss.soa.esb.persistence.db.pool.initial.size"	value="2"/>
+		<property name="org.jboss.soa.esb.persistence.db.pool.min.size"	value="2"/>
+		<property name="org.jboss.soa.esb.persistence.db.pool.max.size"	value="5"/>
+		<!--table managed by pool to test for valid connections - created by pool automatically -->
+		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
+		<!-- # of milliseconds to timeout waiting for a connection from pool -->
+		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
+                <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
+    </properties>
+    <properties name="messagerouting">
+    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+    </properties>
+</esb>

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/jbossesb-service.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-service.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
-   <mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
-       name="jboss.esb:service=QuickstartDatabaseInitializer">
-      <attribute name="Datasource">java:/QuickstartDS</attribute>
-      <attribute name="ExistsSql">select * from jms_transacted_table</attribute>
-      <attribute name="SqlFiles">
-	hsqldb/create.sql
-      </attribute>
-      <depends>jboss.jca:name=QuickstartDS,service=DataSourceBinding</depends>
-   </mbean>
-</server>

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-service.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/jbossesb-service.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-service.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jbossesb-service.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+   <mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
+       name="jboss.esb:service=QuickstartDatabaseInitializer">
+      <attribute name="Datasource">java:/QuickstartDS</attribute>
+      <attribute name="ExistsSql">select * from jms_transacted_table</attribute>
+      <attribute name="SqlFiles">
+	hsqldb/create.sql
+      </attribute>
+      <depends>jboss.jca:name=QuickstartDS,service=DataSourceBinding</depends>
+   </mbean>
+</server>

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jndi.properties
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/jndi.properties	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jndi.properties	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,5 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jndi.properties (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/jndi.properties)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jndi.properties	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/jndi.properties	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/juddi.properties
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/juddi.properties	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/juddi.properties	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,69 +0,0 @@
-# jUDDI Registry Properties (used by RegistryServer)
-# see http://www.juddi.org for more information
-
-# The UDDI Operator Name
-juddi.operatorName = jUDDI.org
-
-# The i18n locale default codes
-juddi.i18n.languageCode = en
-juddi.i18n.countryCode = US
-
-# The UDDI DiscoveryURL Prefix
-juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
-
-# The UDDI Operator Contact Email Address
-juddi.operatorEmailAddress = admin at juddi.org
-
-# The maximum name size and maximum number
-# of name elements allows in several of the
-# FindXxxx and SaveXxxx UDDI functions.
-juddi.maxNameLength=255
-juddi.maxNameElementsAllowed=5
-
-# The maximum number of UDDI artifacts allowed
-# per publisher. A value of '-1' indicates any 
-# number of artifacts is valid (These values can be
-# overridden at the individual publisher level).
-juddi.maxBusinessesPerPublisher=25
-juddi.maxServicesPerBusiness=20
-juddi.maxBindingsPerService=10
-juddi.maxTModelsPerPublisher=100
-
-# jUDDI Authentication module to use
-juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
-
-# jUDDI DataStore module currently to use
-juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
-
-# use a dataSource (if set to false a direct 
-# jdbc connection will be used.
-juddi.isUseDataSource=false
-juddi.jdbcDriver=com.mysql.jdbc.Driver
-juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
-juddi.jdbcUsername=root
-juddi.jdbcPassword=admin
-# jUDDI DataSource to use
-# juddi.dataSource=java:comp/env/jdbc/MySqlDS
-
-# jUDDI UUIDGen implementation to use
-juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
-
-# jUDDI Cryptor implementation to use
-juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
- 
-# jUDDI Validator to use
-juddi.validator=org.apache.juddi.validator.DefaultValidator
-
-# jUDDI Proxy Properties (used by RegistryProxy)
-juddi.proxy.adminURL = http://localhost:8080/juddi/admin
-juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
-juddi.proxy.publishURL = http://localhost:8080/juddi/publish
-juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
-juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
-juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
-
-# JNDI settings (used by RMITransport)
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-  

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/juddi.properties (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/juddi.properties)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/juddi.properties	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/juddi.properties	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,69 @@
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=com.mysql.jdbc.Driver
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/log4j.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/log4j.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/log4j.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Log4j Configuration                                                  -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
-
-<!--
-   | For more configuration infromation and examples see the Jakarta Log4j
-   | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
-   <!-- ============================== -->
-   <!-- Append messages to the console -->
-   <!-- ============================== -->
-
-   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-      <param name="Target" value="System.out"/>
-      <param name="Threshold" value="INFO"/>
-
-      <layout class="org.apache.log4j.PatternLayout">
-         <!-- The default pattern: Date Priority [Category] Message\n -->
-         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
-      </layout>
-   </appender>
-
-   <!-- ================================= -->
-   <!-- Preserve messages in a local file -->
-   <!-- ================================= -->
-
-   <!-- A size based file rolling appender -->
-   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
-     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-     <param name="File" value="./listener.log"/>
-     <param name="Append" value="false"/>
-     <param name="MaxFileSize" value="500KB"/>
-     <param name="MaxBackupIndex" value="1"/>
-
-     <layout class="org.apache.log4j.PatternLayout">
-       <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
-     </layout>	    
-   </appender>
-
-   <!-- ================ -->
-   <!-- Limit categories -->
-   <!-- ================ -->
-
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
-   </category>
-   <category name="quickstart">
-      <priority value="DEBUG"/>
-   </category>
-   <!-- ======================= -->
-   <!-- Setup the Root category -->
-   <!-- ======================= -->
-
-   <root>
-      <appender-ref ref="CONSOLE"/>
-      <appender-ref ref="FILE"/>
-   </root>
-
-</log4j:configuration>

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/log4j.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/log4j.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/log4j.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/log4j.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="Target" value="System.out"/>
+      <param name="Threshold" value="INFO"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
+      </layout>
+   </appender>
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A size based file rolling appender -->
+   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="File" value="./listener.log"/>
+     <param name="Append" value="false"/>
+     <param name="MaxFileSize" value="500KB"/>
+     <param name="MaxBackupIndex" value="1"/>
+
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
+     </layout>	    
+   </appender>
+
+   <!-- ================ -->
+   <!-- Limit categories -->
+   <!-- ================ -->
+
+   <category name="org.jboss">
+      <priority value="WARN"/>
+   </category>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="quickstart">
+      <priority value="DEBUG"/>
+   </category>
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <appender-ref ref="CONSOLE"/>
+      <appender-ref ref="FILE"/>
+   </root>
+
+</log4j:configuration>

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/quickstart-ds.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/quickstart-ds.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/quickstart-ds.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<datasources>
-   <local-tx-datasource>
-      <jndi-name>QuickstartDS</jndi-name>
-      <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1703</connection-url>
-      <driver-class>org.hsqldb.jdbcDriver</driver-class>
-      <user-name>sa</user-name>
-      <password></password>
-      <min-pool-size>5</min-pool-size>
-      <max-pool-size>20</max-pool-size>
-      <idle-timeout-minutes>0</idle-timeout-minutes>
-      <depends>jboss:service=Hypersonic</depends>	
-      <prepared-statement-cache-size>32</prepared-statement-cache-size>
-   </local-tx-datasource>
-
-   <!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
-   <mbean code="org.jboss.jdbc.HypersonicDatabase"
-     name="jboss:service=Hypersonic">
-     <attribute name="Port">1703</attribute>
-     <attribute name="BindAddress">${jboss.bind.address}</attribute> 
-     <attribute name="Database">QuickstartDB</attribute>
-     <attribute name="Silent">true</attribute>
-     <attribute name="Trace">false</attribute>
-     <attribute name="No_system_exit">true</attribute>
-   </mbean>
-</datasources>

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/quickstart-ds.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/quickstart-ds.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/quickstart-ds.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/quickstart-ds.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<datasources>
+   <local-tx-datasource>
+      <jndi-name>QuickstartDS</jndi-name>
+      <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1703</connection-url>
+      <driver-class>org.hsqldb.jdbcDriver</driver-class>
+      <user-name>sa</user-name>
+      <password></password>
+      <min-pool-size>5</min-pool-size>
+      <max-pool-size>20</max-pool-size>
+      <idle-timeout-minutes>0</idle-timeout-minutes>
+      <depends>jboss:service=Hypersonic</depends>	
+      <prepared-statement-cache-size>32</prepared-statement-cache-size>
+   </local-tx-datasource>
+
+   <!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
+   <mbean code="org.jboss.jdbc.HypersonicDatabase"
+     name="jboss:service=Hypersonic">
+     <attribute name="Port">1703</attribute>
+     <attribute name="BindAddress">${jboss.bind.address}</attribute> 
+     <attribute name="Database">QuickstartDB</attribute>
+     <attribute name="Silent">true</attribute>
+     <attribute name="Trace">false</attribute>
+     <attribute name="No_system_exit">true</attribute>
+   </mbean>
+</datasources>

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/readme.txt
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/readme.txt	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/readme.txt	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,111 +0,0 @@
-Overview:
-=========
-  The purpose of the jms_transacted quickstart is to show how the JMS transport 
-  in the ESB can be configured to use transactions and how redelivery can be 
-  accomplished by taking advantage of the JMS transport.
-
-  This quickstart consists of a single service that contains 4 actions:
-  1. Log a statement that we have entered the quickstart.
-  2. Insert the contents of the ESB Message object to a database table
-  3. Call a custom action that throws an exception if the message has not
-	 been redelivered. (more on this later)
-  4. Log a statement that we are about to exit the quickstart.
-
-  The main thing to look for is that the first time we enter the action processing
-  pipleline, we insert a row into the database, but since the commit is not done
-  until the whole pipeline has been executed (as we are using the jms-jca-provider)
-  the commit for this insert is not performed. The same goes for the message 
-  acknowledement of the JMS Message, which in turn causes the JMS message to be
-  put back onto the queue.
-
-  For more details about how this quickstart works look at the 
-  "What to look at in this Quckstart" section below.
-
-  This quickstart uses jms-jca-provider and more information about jms jca can
-  be found here: http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingJCAWithJBossESB
-  
-Running this quickstart:
-========================
-  Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
-  and a more detailed descripton of the different ways to run the quickstarts.
-
-To Run '.esb' archive mode:
-===========================
-  1. In a command terminal window in this folder ("Window1"), type:
-	 'ant deploy'
-	 This will deploy the quickstart
-  2. Open another command terminal window in this folder ("Window2"), type:
-     'ant runtest'
-  3. Switch back to Application Server console to see the output from the ESB
-  4. In this folder ("Window1"), type:
-	 'ant select'
-	 This will display the content of the database table
-  5. [optional] In this folder ("Window1"), type:
-	 'ant truncate'
-	 This will delete the content of the database table.
-  6. In this folder ("Window1"), type:
-	 'ant undeploy'
-	 This will undeploy the quickstart.
-
-What to look at in this Quickstart:
-===================================
-  1. DBInsertAction
-	 Inserts the contents of the ESB Message object into the database table 
-	 by using the sql statement defined in the property 'db-insert-sql'.
-	 This class contains a counter that is incremented for each call. This 
-	 counter is added to the text inserted into the table. The string looks 
-	 like this:
-		[Hello Transacted JMS World] counter[1]] // counter == 1;
-	 This is done to seperate the inserts and visually verify that the correct
-	 data is committed to the database. In a normal run, when the counter is
-	 '1', the counter should be 2 indicating that only the second commit succeeded.
-	  
-  2. ThrowExceptionAction
-	 Checks if the ESB Messae property 'javax.jms.message.redelivered' 
-	 is false, in which case an IllegalArgumentException will be thrown.
-	 This will will cause the message to be redelivered by JMS transaction handling.
-
-  3. jboss-esb.xml
-     The message-filter for the jms-bus-filter now specifies 'transacted' attribute.
-
-  4. 'ant select'
-	 Ant target that will display all the rows in the database table.
-
-  5. 'ant truncate'
-	 Ant target that will delete all the rows in the database table.
-	 Useful to clear the table after multiple runs.
-
-
-Inside look:
-============
-  1. Transactions with JMSGateway
-
-	 Lets walk through a client publishing a message to a queue. The queue
-	 will be the queue that our gateway is configured to listen on.
-
-	 1. Client publishes message to JMS queue. It can use a JMS session that
-	 	is transacted to do so or not. It does not matter.
-	 2. The gateway listener will create a JMS session, or use an existing
-		session from the pool, that is transacted. While the JMS Listener
-		is running it will consume a JMS message from the queue, package the 
-		contents of that JMS message into an ESB Message, and use a courier to 
-		pass the message on to the action pipeline.
-
-		Commit:
-	    When the message has be sent to the courier, and no exception has
-		been thrown, the transaction will commit and acknowledge that it
-		has accepted the JMS Message. 
-
-		Rollback:
-		But if an exception has occurred, the transaction will be rolled-back 
-		and the JMS message will not be acknowledged, hence it will be put 
-		back on the queue. 
-
-		Usecase for transactions in JMSGateway
-		Now, this situation may seem far fetched, but one usecase for 
-		it might be that the task of packaging the content of the JMS 
-		Message into the ESB Message is a memory intensive process. 
-		Lets say that one of your machines is under more heavy load then others 
-		which could cause it to throw an OutOfMemory Exception. In this case the 
-		message could be picked up by another ESB instance, which hopefully 
-		can deal with the message.

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/readme.txt (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/readme.txt)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/readme.txt	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/readme.txt	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,111 @@
+Overview:
+=========
+  The purpose of the jms_transacted quickstart is to show how the JMS transport 
+  in the ESB can be configured to use transactions and how redelivery can be 
+  accomplished by taking advantage of the JMS transport.
+
+  This quickstart consists of a single service that contains 4 actions:
+  1. Log a statement that we have entered the quickstart.
+  2. Insert the contents of the ESB Message object to a database table
+  3. Call a custom action that throws an exception if the message has not
+	 been redelivered. (more on this later)
+  4. Log a statement that we are about to exit the quickstart.
+
+  The main thing to look for is that the first time we enter the action processing
+  pipleline, we insert a row into the database, but since the commit is not done
+  until the whole pipeline has been executed (as we are using the jms-jca-provider)
+  the commit for this insert is not performed. The same goes for the message 
+  acknowledement of the JMS Message, which in turn causes the JMS message to be
+  put back onto the queue.
+
+  For more details about how this quickstart works look at the 
+  "What to look at in this Quckstart" section below.
+
+  This quickstart uses jms-jca-provider and more information about jms jca can
+  be found here: http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingJCAWithJBossESB
+  
+Running this quickstart:
+========================
+  Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
+  and a more detailed descripton of the different ways to run the quickstarts.
+
+To Run '.esb' archive mode:
+===========================
+  1. In a command terminal window in this folder ("Window1"), type:
+	 'ant deploy'
+	 This will deploy the quickstart
+  2. Open another command terminal window in this folder ("Window2"), type:
+     'ant runtest'
+  3. Switch back to Application Server console to see the output from the ESB
+  4. In this folder ("Window1"), type:
+	 'ant select'
+	 This will display the content of the database table
+  5. [optional] In this folder ("Window1"), type:
+	 'ant truncate'
+	 This will delete the content of the database table.
+  6. In this folder ("Window1"), type:
+	 'ant undeploy'
+	 This will undeploy the quickstart.
+
+What to look at in this Quickstart:
+===================================
+  1. DBInsertAction
+	 Inserts the contents of the ESB Message object into the database table 
+	 by using the sql statement defined in the property 'db-insert-sql'.
+	 This class contains a counter that is incremented for each call. This 
+	 counter is added to the text inserted into the table. The string looks 
+	 like this:
+		[Hello Transacted JMS World] counter[1]] // counter == 1;
+	 This is done to seperate the inserts and visually verify that the correct
+	 data is committed to the database. In a normal run, when the counter is
+	 '1', the counter should be 2 indicating that only the second commit succeeded.
+	  
+  2. ThrowExceptionAction
+	 Checks if the ESB Messae property 'javax.jms.message.redelivered' 
+	 is false, in which case an IllegalArgumentException will be thrown.
+	 This will will cause the message to be redelivered by JMS transaction handling.
+
+  3. jboss-esb.xml
+     The message-filter for the jms-bus-filter now specifies 'transacted' attribute.
+
+  4. 'ant select'
+	 Ant target that will display all the rows in the database table.
+
+  5. 'ant truncate'
+	 Ant target that will delete all the rows in the database table.
+	 Useful to clear the table after multiple runs.
+
+
+Inside look:
+============
+  1. Transactions with JMSGateway
+
+	 Lets walk through a client publishing a message to a queue. The queue
+	 will be the queue that our gateway is configured to listen on.
+
+	 1. Client publishes message to JMS queue. It can use a JMS session that
+	 	is transacted to do so or not. It does not matter.
+	 2. The gateway listener will create a JMS session, or use an existing
+		session from the pool, that is transacted. While the JMS Listener
+		is running it will consume a JMS message from the queue, package the 
+		contents of that JMS message into an ESB Message, and use a courier to 
+		pass the message on to the action pipeline.
+
+		Commit:
+	    When the message has be sent to the courier, and no exception has
+		been thrown, the transaction will commit and acknowledge that it
+		has accepted the JMS Message. 
+
+		Rollback:
+		But if an exception has occurred, the transaction will be rolled-back 
+		and the JMS message will not be acknowledged, hence it will be put 
+		back on the queue. 
+
+		Usecase for transactions in JMSGateway
+		Now, this situation may seem far fetched, but one usecase for 
+		it might be that the task of packaging the content of the JMS 
+		Message into the ESB Message is a memory intensive process. 
+		Lets say that one of your machines is under more heavy load then others 
+		which could cause it to throw an OutOfMemory Exception. In this case the 
+		message could be picked up by another ESB instance, which hopefully 
+		can deal with the message.

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src)

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/hsqldb (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/hsqldb)

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,5 +0,0 @@
-create table jms_transacted_table
-(
-unique_id INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,
-data_column VARCHAR(255) NOT NULL
-);

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,5 @@
+create table jms_transacted_table
+(
+unique_id INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,
+data_column VARCHAR(255) NOT NULL
+);

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org)

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org/jboss)

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org/jboss/soa)

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb)

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples)

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart)

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted)

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test)

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,106 +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.samples.quickstart.jmstransacted.test;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-
-import javax.naming.InitialContext;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.sql.DataSource;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.actions.ActionLifecycle;
-import org.jboss.soa.esb.actions.ActionLifecycleException;
-import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
- *
- */
-public class DBInsertAction implements ActionLifecycle
-{
-	private Logger log = Logger.getLogger( DBInsertAction.class );
-	
-	private String sql;
-	private String dataSourceName;
-	
-	private int counter = 1;
-	
-	public DBInsertAction(final ConfigTree config) throws ConfigurationException 
-	{
-		dataSourceName = config.getRequiredAttribute( "datasource-name" );
-		sql = config.getRequiredAttribute( "db-insert-sql" );
-		
-	}
-	
-	public Message process( final Message message ) throws ActionProcessingException
-	{
-		Connection con = null;
-		PreparedStatement stmnt = null;
-		final String inputText = message.getBody().get() + " counter[" + counter + "]";
-		try
-		{
-			con = getConnection();
-			stmnt = con.prepareStatement( sql );
-			stmnt.setString( 1, inputText );
-			int executeUpdate = stmnt.executeUpdate();
-			
-			if ( executeUpdate == 1 )
-				log.info("Successfully inserted [" + inputText + "] into jms_transacted_table");
-			else 
-				log.info("Failed to inserted [" + inputText + "] into jms_transacted_table");
-			
-			counter++;
-		}
-		catch (Exception e)
-		{
-			log.error( "Exception " , e );
-			throw new ActionProcessingException( e );
-		}
-		finally
-		{
-			if (stmnt != null) 	try { stmnt.close();} 	catch (SQLException e) { log.warn( e ); /* ignore */ }
-			if (con != null) 	try { con.close();  } 	catch (SQLException e) { log.warn( e ); /* ignore */ }
-		}
-
-		return message;
-	}
-
-	public void destroy() throws ActionLifecycleException { }
-
-	public void initialise() throws ActionLifecycleException { }
-	
-	private Connection getConnection() throws NamingException, SQLException
-	{
-		Context ctx = new InitialContext();
-		DataSource ds = (DataSource)ctx.lookup( dataSourceName );
-		return ds.getConnection();
-	}
-
-}

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,106 @@
+/*
+ * 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.samples.quickstart.jmstransacted.test;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+import javax.naming.InitialContext;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.actions.ActionLifecycle;
+import org.jboss.soa.esb.actions.ActionLifecycleException;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * 
+ * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
+ *
+ */
+public class DBInsertAction implements ActionLifecycle
+{
+	private Logger log = Logger.getLogger( DBInsertAction.class );
+	
+	private String sql;
+	private String dataSourceName;
+	
+	private int counter = 1;
+	
+	public DBInsertAction(final ConfigTree config) throws ConfigurationException 
+	{
+		dataSourceName = config.getRequiredAttribute( "datasource-name" );
+		sql = config.getRequiredAttribute( "db-insert-sql" );
+		
+	}
+	
+	public Message process( final Message message ) throws ActionProcessingException
+	{
+		Connection con = null;
+		PreparedStatement stmnt = null;
+		final String inputText = message.getBody().get() + " counter[" + counter + "]";
+		try
+		{
+			con = getConnection();
+			stmnt = con.prepareStatement( sql );
+			stmnt.setString( 1, inputText );
+			int executeUpdate = stmnt.executeUpdate();
+			
+			if ( executeUpdate == 1 )
+				log.info("Successfully inserted [" + inputText + "] into jms_transacted_table");
+			else 
+				log.info("Failed to inserted [" + inputText + "] into jms_transacted_table");
+			
+			counter++;
+		}
+		catch (Exception e)
+		{
+			log.error( "Exception " , e );
+			throw new ActionProcessingException( e );
+		}
+		finally
+		{
+			if (stmnt != null) 	try { stmnt.close();} 	catch (SQLException e) { log.warn( e ); /* ignore */ }
+			if (con != null) 	try { con.close();  } 	catch (SQLException e) { log.warn( e ); /* ignore */ }
+		}
+
+		return message;
+	}
+
+	public void destroy() throws ActionLifecycleException { }
+
+	public void initialise() throws ActionLifecycleException { }
+	
+	private Connection getConnection() throws NamingException, SQLException
+	{
+		Context ctx = new InitialContext();
+		DataSource ds = (DataSource)ctx.lookup( dataSourceName );
+		return ds.getConnection();
+	}
+
+}

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,83 +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,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.jmstransacted.test;
-
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-/**
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
- *
- */
-public class SendJMSMessage 
-{
-    private QueueConnection connection;
-    private QueueSession session;
-    private Queue queue;
-    
-    public void setupConnection() throws JMSException, NamingException
-    {
-		InitialContext iniCtx = new InitialContext();
-
-    	QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
-    	
-    	connection = queueConnectionFactory.createQueueConnection();
-    	
-    	queue = (Queue) iniCtx.lookup("queue/quickstart_jms_transacted_Request_gw");
-    	session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	connection.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        connection.stop();
-        session.close();
-        connection.close();
-    }
-    
-    public void sendAMessage(String msg) throws JMSException {
-    	
-        QueueSender sender = session.createSender(queue);        
-        ObjectMessage objectMsg = session.createObjectMessage(msg);
-        
-        sender.send(objectMsg);        
-        sender.close();
-    }
-       
-    
-    public static void main(String args[]) throws Exception
-    {        	    	
-    	SendJMSMessage sm = new SendJMSMessage();
-    	sm.setupConnection();
-    	sm.sendAMessage(args[0]); 
-    	sm.stop();
-    }
-    
-}

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,83 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.jmstransacted.test;
+
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+/**
+ * 
+ * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
+ *
+ */
+public class SendJMSMessage 
+{
+    private QueueConnection connection;
+    private QueueSession session;
+    private Queue queue;
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+		InitialContext iniCtx = new InitialContext();
+
+    	QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
+    	
+    	connection = queueConnectionFactory.createQueueConnection();
+    	
+    	queue = (Queue) iniCtx.lookup("queue/quickstart_jms_transacted_Request_gw");
+    	session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	connection.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        connection.stop();
+        session.close();
+        connection.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender sender = session.createSender(queue);        
+        ObjectMessage objectMsg = session.createObjectMessage(msg);
+        
+        sender.send(objectMsg);        
+        sender.close();
+    }
+       
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	sm.sendAMessage(args[0]); 
+    	sm.stop();
+    }
+    
+}

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,71 +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,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.jmstransacted.test;
-
-import static org.jboss.soa.esb.notification.jms.JMSPropertiesSetter.JMS_REDELIVERED;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.actions.ActionLifecycle;
-import org.jboss.soa.esb.actions.ActionLifecycleException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * ThrowExceptionAction is a simple action that throws an exception <br>
- * if the message has not been redelivered (first call to this action). 
- * </p>
- * Note that this class in only intended to be used with the
- * jms_transacted quickstart.
- * </p>
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
- *
- */
-public class ThrowExceptionAction implements ActionLifecycle
-{
-	private Logger log = Logger .getLogger( ThrowExceptionAction.class );
-	
-	public ThrowExceptionAction( final ConfigTree config ) { }
-	
-	/**
-	 * Checks if the ESB Messae property 'javax.jms.message.redelivered' 
-	 * is false, in which case an IllegalArgumentException will be thrown. <br>
-	 * This will will cause the message to be redelivered by JMS transaction 
-	 * handling.
-	 * 
-	 * @param message		- ESB Message object
-	 * @return Message		- unchanged ESB Message Object
-	 */
-	public Message process( final Message message )
-	{
-		final Boolean redelivered = (Boolean) message.getProperties().getProperty( JMS_REDELIVERED );
-		log.info("[" +JMS_REDELIVERED + ":" + redelivered + "]" );
-		
-		if ( redelivered )
-			return message;
-		else
-			throw new IllegalStateException( "[Throwing Exception to trigger a transaction rollback]");
-	}
-	
-	public void processException(final Message message, final Throwable th)   {  }
-	public void destroy() throws ActionLifecycleException {}
-	public void initialise() throws ActionLifecycleException {}
-	
-}

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,71 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.jmstransacted.test;
+
+import static org.jboss.soa.esb.notification.jms.JMSPropertiesSetter.JMS_REDELIVERED;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.actions.ActionLifecycle;
+import org.jboss.soa.esb.actions.ActionLifecycleException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * ThrowExceptionAction is a simple action that throws an exception <br>
+ * if the message has not been redelivered (first call to this action). 
+ * </p>
+ * Note that this class in only intended to be used with the
+ * jms_transacted quickstart.
+ * </p>
+ * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
+ *
+ */
+public class ThrowExceptionAction implements ActionLifecycle
+{
+	private Logger log = Logger .getLogger( ThrowExceptionAction.class );
+	
+	public ThrowExceptionAction( final ConfigTree config ) { }
+	
+	/**
+	 * Checks if the ESB Messae property 'javax.jms.message.redelivered' 
+	 * is false, in which case an IllegalArgumentException will be thrown. <br>
+	 * This will will cause the message to be redelivered by JMS transaction 
+	 * handling.
+	 * 
+	 * @param message		- ESB Message object
+	 * @return Message		- unchanged ESB Message Object
+	 */
+	public Message process( final Message message )
+	{
+		final Boolean redelivered = (Boolean) message.getProperties().getProperty( JMS_REDELIVERED );
+		log.info("[" +JMS_REDELIVERED + ":" + redelivered + "]" );
+		
+		if ( redelivered )
+			return message;
+		else
+			throw new IllegalStateException( "[Throwing Exception to trigger a transaction rollback]");
+	}
+	
+	public void processException(final Message message, final Throwable th)   {  }
+	public void destroy() throws ActionLifecycleException {}
+	public void initialise() throws ActionLifecycleException {}
+	
+}

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -8,8 +8,13 @@
 	<!-- Import the base Ant build script... -->
 	<import file="../conf/base-build.xml" />
 
+	<target name="quickstart-specific-clean">
+		<delete dir="load_generator_classes"/>
+	</target>
+
 	<target name="init-groovy" depends="dependencies">
 		<path id="groovy.classpath">
+			<pathelement path="build/classes"/>
 			<fileset dir="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deploy">
 				<include name="jboss-aop-jdk50**/*.jar"/>
 			</fileset>
@@ -43,15 +48,30 @@
 	</target>
 
 	<target name="load-report" depends="compile-churn" description="Test the report agent script/settings">
-		<java classname="LoadReport">
-			<classpath refid="groovy.classpath" />
-			<classpath location="load_generator_classes" />
-			<arg value="load_generator_classes/load.xml" />
+		<java classname="LoadReport" fork="true">
+			<classpath location="${org.jboss.esb.server.home}/client"/>
+			<classpath location="build/classes"/>
+			<classpath refid="groovy.classpath"/>
+			<classpath location="load_generator_classes"/>
+			<arg value="load_generator_classes/load.xml"/>
 		</java>
 	</target>
 
+        <target name="load-report-secure" depends="compile-churn" description="Test the report agent script/settings">
+                <java classname="LoadReport" fork="true">
+                        <classpath location="${org.jboss.esb.server.home}/client"/>
+                        <classpath location="build/classes"/>
+                        <classpath refid="groovy.classpath"/>
+                        <classpath location="load_generator_classes"/>
+                        <arg line="load_generator_classes/load.xml admin admin"/>
+                </java>
+        </target>
+
 	<target name="runtest" depends="compile-churn,load-agent,load-report" description="Run the agent in background thread and report script in console">
 		
 	</target>
 
+	<target name="runtest-secure" depends="compile-churn,load-agent,load-report-secure" description="Run the agent in background thread and report script in console">
+	</target>
+
 </project>

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/readme.txt
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/readme.txt	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/readme.txt	2008-02-28 16:09:28 UTC (rev 18617)
@@ -9,28 +9,34 @@
   Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
   and a more detailed descripton of the different ways to run the quickstarts.
 
+Protected JMX 
+=======================
+  If access to JMX is secured on your server, run the "ant runtest-secure" target, 
+  which takes a username and a password.
+
 To Run standalone mode:
 =======================
   1. In a command terminal window in the quickstart folder type
      'ant deploy-jms-dests'.
   2. In a command terminal window in this folder ("Window1"), type 'ant run'.
   3. Open another command terminal window in this folder ("Window2"), type
-     'ant runtest'.
+     'ant runtest' or 'ant runtest-secure'.
   4. Switch back to "Window1" to see the output from the ESB
   5. When finished, interrupt the ESB using Ctrl-C and, in this folder
      ("Window1"), type 'ant undeploy-jms-dests'.
 
 To Run '.esb' archive mode:
 ===========================
-  1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
+  1. In a command terminal window in this folder ("Window1"), type 'ant deploy-jms-dests' and then 'ant deploy'.
   2. Open another command terminal window in this folder ("Window2"), type
-     'ant runtest'.
+     'ant runtest' or 'ant runtest-secure'.
   3. Switch back to Application Server console to see the output from the ESB
-  4. In this folder ("Window1"), type 'ant undeploy'.
-  
+  4. In this folder ("Window1"), type 'ant undeploy' and then 'ant undeploy-jms-dests'.
+
 Load Test Targets
 ===========================
 runtest - Runs the load agent to simulate load and the load reporter to report on load
+runtest-secure - Runs the load agent to simulate load, and the load reporter authenticates to secure http
 load-agent - Simulates load only
 load-report - Report on load only
 

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/scripts/LoadReport.groovy
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/scripts/LoadReport.groovy	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/scripts/LoadReport.groovy	2008-02-28 16:09:28 UTC (rev 18617)
@@ -43,7 +43,7 @@
 
 class LoadReport
 {
-	LoadUtil util = new LoadUtil()
+	LoadUtil util
 	def loadConfigFile
 	InitialContext ctx
 	MBeanServerConnection server
@@ -52,11 +52,13 @@
 	def svcReportLog
 	def queueReportLog
 		
-	LoadReport(aLoadConfigFile)
+	LoadReport(aLoadConfigFile, user, password)
 	{
 		loadConfigFile = aLoadConfigFile
 		ctx = new InitialContext(); // From jndi.properties
 		server = (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor")
+		util = new LoadUtil(user, password)
+		println "USER=$user PASSWORD=$password"
 	}
 
    public generateMetrics()
@@ -169,7 +171,12 @@
 
 	static void main(args)
 	{
-		LoadReport reporter = new LoadReport(args[0])
+		LoadReport reporter = null
+		if (args.size() == 3) {
+			 reporter = new LoadReport(args[0], args[1], args[2])
+		} else {
+			 reporter = new LoadReport(args[0], null, null)
+		}
 		reporter.generateMetrics()	
 	}
 

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/scripts/LoadUtil.groovy
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/scripts/LoadUtil.groovy	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/scripts/LoadUtil.groovy	2008-02-28 16:09:28 UTC (rev 18617)
@@ -3,6 +3,8 @@
 import javax.naming.InitialContext
 import javax.naming.NamingException
 
+import org.jboss.soa.esb.samples.quickstart.jmx.*;
+
 /**
  * Simple Groovy load script that will provide TPS statistics for a ESB service call and JMS Queues.
  *
@@ -13,22 +15,38 @@
 {
    InitialContext ctx
    MBeanServerConnection server	
+   String user
+   String password
    
    public LoadUtil()
    {
-   		initContext()
+	user = null
+	password = null
    }
-	
-   private initContext()
+
+   public LoadUtil(f_user, f_password)
    {
-   		ctx = new InitialContext(); // From jndi.properties
-		server = (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor")
-   }   
+	user = f_user
+	password = f_password
+   }
 
+   public Long getLongAttribute (ObjectName on, String an) {
+        Long val = null
+		JMXAttributeFinder jf = new JMXAttributeFinder(user, password)
+		val = (Long) jf.query(on, an)
+		return val
+   }
+
+   public Integer getIntegerAttribute (ObjectName on, String an) {
+		Integer val = null
+		JMXAttributeFinder jf = new JMXAttributeFinder(user, password)
+		val = (Integer) jf.query(on, an)
+   }
+
    public float getEsbServiceTps(serviceReportBean)
    {
    		def serviceMessageCount = {
-   			server.getAttribute(new ObjectName("jboss.esb:service-name=$serviceReportBean.serviceName,deployment=$serviceReportBean.esbArchiveName,category=MessageCounter"), "overall service message count").toLong()
+			getLongAttribute(new ObjectName("jboss.esb:service-name=$serviceReportBean.serviceName,deployment=$serviceReportBean.esbArchiveName,category=MessageCounter"), "overall service message count")
    		}
    		
    		def processedMsgsBefore = serviceMessageCount()
@@ -55,9 +73,9 @@
    		def queueDepthCount = {
 			def temp = 0
 			try {
-				temp = server.getAttribute(new ObjectName("$queue"), "QueueDepth").toLong()
+				temp = getLongAttribute(new ObjectName("$queue"), "QueueDepth")
 			} catch (javax.management.AttributeNotFoundException e) {
-				temp = server.getAttribute(new ObjectName("$queue"), "MessageCount").toInteger()
+				temp = getIntegerAttribute(new ObjectName("$queue"), "MessageCount")
 			}
 			if (temp == null) {
 				return 0

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx)

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/JMXAttributeFinder.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/JMXAttributeFinder.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/JMXAttributeFinder.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,127 +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.samples.quickstart.jmx;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Properties;
-
-import javax.management.AttributeNotFoundException;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanException;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.management.ReflectionException;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.login.LoginContext;
-import javax.security.auth.login.LoginException;
-
-/**
- * Facade for querying JMX.     If user and password have a value other than null,
- * try to authenticate to secure HTTP before querying JMX.     
- *
- * @author <a href="tcunning at redhat.com">Tom Cunningham</a>
- */
-public class JMXAttributeFinder {
-
-	LoginContext loginContext = null;
-	String user;
-	String password;
-
-	public JMXAttributeFinder() {
-		user = null;
-		password = null;
-	}
-
-	public JMXAttributeFinder(String f_user, String f_password) {
-		user = f_user;
-		password = f_password;
-	}
-
-	public String getResourceURL(String resource) throws MalformedURLException {
-		ClassLoader loader = Thread.currentThread().getContextClassLoader();
-		URL resURL = loader.getResource(resource);
-		return resURL != null ? resURL.toString() : null;
-	}
-
-	public void login() {
-		if ((user != null) && (password != null)) {
-			try {
-				CallbackHandler handler = new LGCallbackHandler(user,password);
-				String authConf = getResourceURL("auth.conf");
-				System.setProperty("java.security.auth.login.config", authConf);			
-				LoginContext loginContext = new LoginContext("jboss_jaas",  handler);
-				loginContext.login();
-			} catch (Exception e) {
-			}
-		}
-	}
-
-	public Object query(ObjectName oname, String attname) throws AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException, IOException {
-		Object att = null;
-		login();
-		Properties env = new Properties();
-		String url = new String("http://localhost:8080/invoker/JNDIFactory");
-		env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.HttpNamingContextFactory");
-		env.setProperty(Context.PROVIDER_URL,url);
-		env.setProperty("java.naming.factory.url.pkgs","org.jboss.naming.client");
-		Context ctx;
-		MBeanServerConnection server = null;
-		try {
-			ctx = new InitialContext(env);
-			server = (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor");
-		} catch (NamingException e1) {
-			e1.printStackTrace();
-		}
-	
-		att = server.getAttribute(oname, attname);
-	
-		try {
-			logout();
-		} catch (LoginException e) {
-			e.printStackTrace();
-		}
-		return att;
-	}
-
-	public void logout() throws LoginException {
-		if (loginContext != null) {
-			loginContext.logout();
-		}
-	}
-
-	public static void main (String args[]) {
-		try {
-			JMXAttributeFinder t = new JMXAttributeFinder();
-			Object val = t.query(new ObjectName("jboss.esb:gateway-name=JMS-Gateway"), "LifeCycleState");	
-			System.out.println(val);
-			t.logout();
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-}
-

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/JMXAttributeFinder.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/JMXAttributeFinder.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/JMXAttributeFinder.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/JMXAttributeFinder.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,127 @@
+/*
+* 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.samples.quickstart.jmx;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import javax.management.AttributeNotFoundException;
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.ReflectionException;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
+
+/**
+ * Facade for querying JMX.     If user and password have a value other than null,
+ * try to authenticate to secure HTTP before querying JMX.     
+ *
+ * @author <a href="tcunning at redhat.com">Tom Cunningham</a>
+ */
+public class JMXAttributeFinder {
+
+	LoginContext loginContext = null;
+	String user;
+	String password;
+
+	public JMXAttributeFinder() {
+		user = null;
+		password = null;
+	}
+
+	public JMXAttributeFinder(String f_user, String f_password) {
+		user = f_user;
+		password = f_password;
+	}
+
+	public String getResourceURL(String resource) throws MalformedURLException {
+		ClassLoader loader = Thread.currentThread().getContextClassLoader();
+		URL resURL = loader.getResource(resource);
+		return resURL != null ? resURL.toString() : null;
+	}
+
+	public void login() {
+		if ((user != null) && (password != null)) {
+			try {
+				CallbackHandler handler = new LGCallbackHandler(user,password);
+				String authConf = getResourceURL("auth.conf");
+				System.setProperty("java.security.auth.login.config", authConf);			
+				LoginContext loginContext = new LoginContext("jboss_jaas",  handler);
+				loginContext.login();
+			} catch (Exception e) {
+			}
+		}
+	}
+
+	public Object query(ObjectName oname, String attname) throws AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException, IOException {
+		Object att = null;
+		login();
+		Properties env = new Properties();
+		String url = new String("http://localhost:8080/invoker/JNDIFactory");
+		env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.HttpNamingContextFactory");
+		env.setProperty(Context.PROVIDER_URL,url);
+		env.setProperty("java.naming.factory.url.pkgs","org.jboss.naming.client");
+		Context ctx;
+		MBeanServerConnection server = null;
+		try {
+			ctx = new InitialContext(env);
+			server = (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor");
+		} catch (NamingException e1) {
+			e1.printStackTrace();
+		}
+	
+		att = server.getAttribute(oname, attname);
+	
+		try {
+			logout();
+		} catch (LoginException e) {
+			e.printStackTrace();
+		}
+		return att;
+	}
+
+	public void logout() throws LoginException {
+		if (loginContext != null) {
+			loginContext.logout();
+		}
+	}
+
+	public static void main (String args[]) {
+		try {
+			JMXAttributeFinder t = new JMXAttributeFinder();
+			Object val = t.query(new ObjectName("jboss.esb:gateway-name=JMS-Gateway"), "LifeCycleState");	
+			System.out.println(val);
+			t.logout();
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+}
+

Deleted: labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/LGCallbackHandler.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/LGCallbackHandler.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/LGCallbackHandler.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,56 +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.samples.quickstart.jmx; 
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-/**
- * Simple callback class for load_generator.      
- *
- * @author <a href="tcunning at redhat.com">Tom Cunningham</a>
- */
-public class LGCallbackHandler implements CallbackHandler {
-	String username;
-	String password;
-
-	public LGCallbackHandler (String username, String password) {
-		this.username = username;
-		this.password = password;
-	}
-
-	public void handle(Callback[] callbacks) throws java.io.IOException, UnsupportedCallbackException {
-		for (int i = 0; i < callbacks.length; i++) {
-			Callback callback = callbacks[i];
-			if (callback instanceof NameCallback) {
-				((NameCallback) callback).setName(username);
-			} else if (callback instanceof PasswordCallback) {
-				((PasswordCallback) callback).setPassword(password.toCharArray());
-			} else {
-				throw new UnsupportedCallbackException(callback, "Unsupported Callback");
-			}
-		}
-	}
-}

Copied: labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/LGCallbackHandler.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/LGCallbackHandler.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/LGCallbackHandler.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/load_generator/src/org/jboss/soa/esb/samples/quickstart/jmx/LGCallbackHandler.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,56 @@
+/*
+* 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.samples.quickstart.jmx; 
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+/**
+ * Simple callback class for load_generator.      
+ *
+ * @author <a href="tcunning at redhat.com">Tom Cunningham</a>
+ */
+public class LGCallbackHandler implements CallbackHandler {
+	String username;
+	String password;
+
+	public LGCallbackHandler (String username, String password) {
+		this.username = username;
+		this.password = password;
+	}
+
+	public void handle(Callback[] callbacks) throws java.io.IOException, UnsupportedCallbackException {
+		for (int i = 0; i < callbacks.length; i++) {
+			Callback callback = callbacks[i];
+			if (callback instanceof NameCallback) {
+				((NameCallback) callback).setName(username);
+			} else if (callback instanceof PasswordCallback) {
+				((PasswordCallback) callback).setPassword(password.toCharArray());
+			} else {
+				throw new UnsupportedCallbackException(callback, "Unsupported Callback");
+			}
+		}
+	}
+}

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_bpel/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_bpel/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_bpel/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -28,7 +28,9 @@
         </javac>
 	</target>
 
-    <target name="quickstart-specific-assemblies" depends="assert-ws-available">
+    <target name="quickstart-specific-checks" depends="assert-ws-available"/>
+
+    <target name="quickstart-specific-assemblies">
         <!-- Overriden from the target of the same name in base-build.xml. -->
         <!-- Called by the "deploy" target.  Don't call directly!! -->
 
@@ -52,13 +54,13 @@
         </copy>
 
         <!-- Deploy the ActiveBPEL components. -->
-        <!--copy overwrite="true" todir="${env.CATALINA_HOME}/bpr">
+        <copy overwrite="true" todir="${env.CATALINA_HOME}/bpr">
             <fileset dir="bpel" includes="order_process.bpr" />
             <fileset dir="bpel/resources/supportServices/Customer" includes="customer.bpr" />
         </copy>
         <copy overwrite="true" todir="${env.CATALINA_HOME}/shared/classes">
             <fileset dir="bpel/tomcat-configs" includes="*.wsdd" />
-        </copy-->
+        </copy>
     </target>
 
     <target name="quickstart-specific-undeploys"

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_bpel/readme.txt
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_bpel/readme.txt	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_bpel/readme.txt	2008-02-28 16:09:28 UTC (rev 18617)
@@ -5,7 +5,7 @@
 
   It also demonstrates a number of other features of the ESB:
   1. Exposing a Webservice interface for a Service that doesn't have a
-     Webservice interface (using the JBossWSAdapter action).  In this example,
+     Webservice interface (using the SOAPProcessor action).  In this example,
      the Service being exposed is a legacy EJB based Order Management Service.
   2. How to use a jaxb-intros.xml config to "Introduce" JAXB Annotations on a
      Java interface/typeset that isn't annotated for use with JAXB and how to
@@ -32,9 +32,13 @@
   The ActiveBPEL Engine (v3.1) must now be installed on an instance of Tomcat on your
   system.  The processes in this Quickstart are pre-built to run on version 3.1 of
   the ActiveBPEl Engine.  If you are running on a newer version of the ActiveBPEL
-  Engine, you may need to redeploy these processes.  Version 3.1 of the ActiveBpel Engine
-  can be downloaded from:
+  Engine, you may need to redeploy these processes.  
+  
+  Version 3.1 of the ActiveBpel Engine can be downloaded from:
      http://www.active-endpoints.com/active-bpel-engine-download.htm#final31
+
+  ActiveBPEL Installation Guide:
+     http://www.active-endpoints.com/installation-guide.htm
   
   Setting up ActiveBPEL:
   1. Ensure that the value of the 'directory' attribute on the

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_consumer1/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_consumer1/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_consumer1/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -10,7 +10,9 @@
 
     <property name="war.build.dir" location="${build.dir}/war/classes"/>
 
-    <target name="quickstart-specific-assemblies" depends="assert-ws-available, makewar"/>
+    <target name="quickstart-specific-checks" depends="assert-ws-available"/>
+
+    <target name="quickstart-specific-assemblies" depends="makewar"/>
 
     <target name="makewar" description="make war">
         <!-- Compile... -->

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_consumer2/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_consumer2/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_consumer2/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -10,8 +10,10 @@
 
     <property name="war.build.dir" location="${build.dir}/war/classes"/>
 
-    <target name="quickstart-specific-assemblies" depends="assert-ws-available, makewar"/>
+    <target name="quickstart-specific-checks" depends="assert-ws-available"/>
 
+    <target name="quickstart-specific-assemblies" depends="makewar"/>
+
     <target name="makewar" description="make war">
         <!-- Compile... -->
         <mkdir dir="${war.build.dir}" />

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_consumer2/readme.txt
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_consumer2/readme.txt	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_consumer2/readme.txt	2008-02-28 16:09:28 UTC (rev 18617)
@@ -88,7 +88,7 @@
 	
 	org.jboss.soa.esb.actions.soap.SOAPClient
 	This class is used to make the call to the webservice. It will take the
-	parameters that MyRequestAction set in "paramsLocation", call the webservice, then place
+	parameters that MyRequestAction set in the default location, call the webservice, then place
 	the response in the default location. 
 	
 	src/../MyResponseAction.java

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_mtom/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_mtom/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_mtom/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -8,7 +8,9 @@
 	<!-- Import the base Ant build script... -->
 	<import file="../conf/base-build.xml"/>
 
-    <target name="quickstart-specific-dependencies" depends="assert-ws-available,assert-jbossremoting-version">
+    <target name="quickstart-specific-checks" depends="assert-ws-available,assert-jbossremoting-version"/>
+
+    <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" />
         </path>

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_producer/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_producer/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_producer/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -8,7 +8,9 @@
 	<!-- Import the base Ant build script... -->
 	<import file="../conf/base-build.xml"/>
 
-    <target name="quickstart-specific-dependencies" depends="assert-ws-available">
+    <target name="quickstart-specific-checks" depends="assert-ws-available"/>
+
+    <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" />
         </path>

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_wsaddressing/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_wsaddressing/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_wsaddressing/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -8,7 +8,9 @@
 	<!-- Import the base Ant build script... -->
 	<import file="../conf/base-build.xml"/>
 
-    <target name="quickstart-specific-dependencies" depends="assert-ws-available,assert-jbossremoting-version">
+    <target name="quickstart-specific-checks" depends="assert-ws-available,assert-jbossremoting-version"/>
+
+    <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" />
         </path>

Modified: labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_wssecurity/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_wssecurity/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/samples/quickstarts/webservice_wssecurity/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -8,7 +8,9 @@
     <!-- Import the base Ant build script... -->
     <import file="../conf/base-build.xml"/>
 
-    <target name="quickstart-specific-dependencies" depends="assert-ws-available,assert-jbossremoting-version">
+    <target name="quickstart-specific-checks" depends="assert-ws-available,assert-jbossremoting-version"/>
+
+    <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"/>
         </path>

Modified: labs/jbossesb/workspace/chharris/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -225,18 +225,41 @@
 		try
 		{
 			conn = mgr.getConnection();
-			Statement stmt;
-			ResultSet rs;
-			stmt = conn.createStatement();
-			rs = stmt.executeQuery(sql);
-			
-			while (rs.next()) {
-				URI uid = new URI(rs.getString(1));
-				Message msg = getMessage(uid);
-				messages.put(uid, msg);
+			Statement stmt = null;
+			ResultSet rs = null;
+			try
+			{
+        			stmt = conn.createStatement();
+        			rs = stmt.executeQuery(sql);
+        			
+        			while (rs.next()) {
+        				URI uid = new URI(rs.getString(1));
+        				Message msg = getMessage(uid);
+        				messages.put(uid, msg);
+        			}
 			}
-			rs.close();
-			stmt.close();
+			finally
+			{
+			    try
+			    {
+        			    if (rs != null)
+        				rs.close();
+			    }
+			    catch (final Exception ex)
+			    {
+				logger.warn("Could not close ResultSet.", ex);
+			    }
+			    
+			    try
+			    {
+        			    if (stmt != null)
+        				stmt.close();
+			    }
+			    catch (final Exception ex)
+			    {
+				logger.warn("Could not close Statement.", ex);
+			    }
+			}
 
 		}
 		catch (Exception e)
@@ -268,19 +291,42 @@
         try
         {
             conn = mgr.getConnection();
-            Statement stmt;
-            ResultSet rs;
-            stmt = conn.createStatement();
-            rs = stmt.executeQuery(sql);
+            Statement stmt = null;
+            ResultSet rs = null;
             
-            while (rs.next()) {
-                URI uid = new URI(rs.getString(1));
-                Message msg = Util.deserialize((Serializable) Encoding.decodeToObject( rs.getString(2)));
-                messages.put(uid, msg);
+            try
+            {
+                stmt = conn.createStatement();
+                rs = stmt.executeQuery(sql);
+                
+                while (rs.next()) {
+                    URI uid = new URI(rs.getString(1));
+                    Message msg = Util.deserialize((Serializable) Encoding.decodeToObject( rs.getString(2)));
+                    messages.put(uid, msg);
+                }
             }
-            rs.close();
-            stmt.close();
-
+            finally
+            {
+        	try
+		    {
+			    if (rs != null)
+				rs.close();
+		    }
+		    catch (final Exception ex)
+		    {
+			logger.warn("Could not close ResultSet.", ex);
+		    }
+		    
+		    try
+		    {
+			    if (stmt != null)
+				stmt.close();
+		    }
+		    catch (final Exception ex)
+		    {
+			logger.warn("Could not close Statement.", ex);
+		    }
+            }
         }
         catch (Exception e)
         {
@@ -401,18 +447,45 @@
     {
         Message message=null;
         String selectSql = "select * from "+tableName+" where uuid=?";
-        PreparedStatement selectStmt = connection.prepareStatement(selectSql);
-        selectStmt.setObject(1, uid.toString());
-        ResultSet rs = selectStmt.executeQuery();
-        if (rs.next()) {
-            try {
-                message = Util.deserialize((Serializable) Encoding.decodeToObject(rs.getString("message")));
-            } catch (Exception e) {
-                throw new MessageStoreException(e);
+        PreparedStatement selectStmt = null;
+        ResultSet rs = null;
+        
+        try
+        {
+            selectStmt = connection.prepareStatement(selectSql);
+            selectStmt.setObject(1, uid.toString());
+            rs = selectStmt.executeQuery();
+            
+            if (rs.next()) {
+                try {
+                    message = Util.deserialize((Serializable) Encoding.decodeToObject(rs.getString("message")));
+                } catch (Exception e) {
+                    throw new MessageStoreException(e);
+                }
             }
         }
-        rs.close();
-        selectStmt.close();
+        finally
+        {
+            try
+	    {
+		    if (rs != null)
+			rs.close();
+	    }
+	    catch (final Exception ex)
+	    {
+		logger.warn("Could not close ResultSet.", ex);
+	    }
+	    
+	    try
+	    {
+		    if (selectStmt != null)
+			selectStmt.close();
+	    }
+	    catch (final Exception ex)
+	    {
+		logger.warn("Could not close Statement.", ex);
+	    }
+        }
         return message;
     }
     
@@ -421,19 +494,46 @@
     {
         Message message=null;
         String selectSql = "select * from "+tableName+" where uuid=? and classification=?";
-        PreparedStatement selectStmt = connection.prepareStatement(selectSql);
-        selectStmt.setObject(1, uid.toString());
-        selectStmt.setObject(2, classification);
-        ResultSet rs = selectStmt.executeQuery();
-        if (rs.next()) {
-            try {
-                message = Util.deserialize((Serializable) Encoding.decodeToObject(rs.getString("message")));
-            } catch (Exception e) {
-                throw new MessageStoreException(e);
+        PreparedStatement selectStmt = null;
+        ResultSet rs = null;
+        
+        try
+        {
+            selectStmt = connection.prepareStatement(selectSql);
+            selectStmt.setObject(1, uid.toString());
+            selectStmt.setObject(2, classification);
+            rs = selectStmt.executeQuery();
+            
+            if (rs.next()) {
+                try {
+                    message = Util.deserialize((Serializable) Encoding.decodeToObject(rs.getString("message")));
+                } catch (Exception e) {
+                    throw new MessageStoreException(e);
+                }
             }
         }
-        rs.close();
-        selectStmt.close();
+        finally
+        {
+            try
+	    {
+		    if (rs != null)
+			rs.close();
+	    }
+	    catch (final Exception ex)
+	    {
+		logger.warn("Could not close ResultSet.", ex);
+	    }
+	    
+	    try
+	    {
+		    if (selectStmt != null)
+			selectStmt.close();
+	    }
+	    catch (final Exception ex)
+	    {
+		logger.warn("Could not close Statement.", ex);
+	    }
+        }
         return message;
     }
     
@@ -441,11 +541,30 @@
         throws SQLException
     {
         String deleteSql = "delete from "+tableName+" where uuid=? and classification=?";
-        PreparedStatement stmt = connection.prepareStatement(deleteSql);
-        stmt.setObject(1, uid.toString());
-        stmt.setObject(2, classification);
-        int result = stmt.executeUpdate();
-        stmt.close();
+        PreparedStatement stmt = null;
+        int result;
+        
+        try
+        {
+            stmt = connection.prepareStatement(deleteSql);
+            
+            stmt.setObject(1, uid.toString());
+            stmt.setObject(2, classification);
+            result = stmt.executeUpdate();
+        }
+        finally
+        {
+            try
+            {
+                if (stmt != null)
+            		stmt.close();
+            }
+            catch (final Exception ex)
+            {
+        	logger.warn("Could not close Statement.", ex);
+            }
+        }
+        
         return result;
     }
     
@@ -453,20 +572,28 @@
         throws SQLException, MessageStoreException
     {
         String sql = "insert into "+tableName+"(uuid, type, message, delivered, classification) values(?,?,?,?,?)";
-        PreparedStatement ps = conn.prepareStatement(sql);
+        PreparedStatement ps = null;
         
-        ps.setString(1, uid.toString());
-        ps.setString(2, message.getType().toString());
-        try {
-            String messageString = Encoding.encodeObject(Util.serialize(message));
-            ps.setString(3, messageString);
-        } catch (Exception e) {
-            throw new MessageStoreException(e);
+        try
+        {
+            ps = conn.prepareStatement(sql);
+            ps.setString(1, uid.toString());
+            ps.setString(2, message.getType().toString());
+            try {
+                String messageString = Encoding.encodeObject(Util.serialize(message));
+                ps.setString(3, messageString);
+            } catch (Exception e) {
+                throw new MessageStoreException(e);
+            }
+            ps.setString(4, "TRUE");
+            ps.setString(5, classification);
+            ps.execute();
         }
-        ps.setString(4, "TRUE");
-        ps.setString(5, classification);
-        ps.execute();
-        ps.close();
+        finally
+        {
+            if (ps != null)
+        	ps.close();
+        }
     }
     
 

Modified: labs/jbossesb/workspace/chharris/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/jcr/JCRConnectionManager.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/jcr/JCRConnectionManager.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/jcr/JCRConnectionManager.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -39,7 +39,8 @@
 import org.apache.jackrabbit.core.TransientRepository;
 import org.apache.jackrabbit.core.config.RepositoryConfig;
 import org.jboss.soa.esb.common.Configuration;
-import org.jboss.soa.esb.helpers.NamingContext;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 import org.jboss.system.server.ServerConfig;
 import org.jboss.system.server.ServerConfigLocator;
 
@@ -109,12 +110,18 @@
 						Configuration.getJndiServerContextFactory());
 				environment.setProperty(Context.URL_PKG_PREFIXES,
 						Configuration.getJndiServerPkgPrefix());
-				Context context = NamingContext.getServerContext(environment);
 				try {
-					repository = (Repository) context.lookup(Configuration.getJcrStoreJNDIPath());
-				} catch (NamingException e) {
-					throw new RepositoryException(e);
-				}
+        				Context context = NamingContextPool.getNamingContext(environment);
+        				try {
+        					repository = (Repository) context.lookup(Configuration.getJcrStoreJNDIPath());
+        				} catch (NamingException e) {
+        					throw new RepositoryException(e);
+        				} finally {
+        				    NamingContextPool.releaseNamingContext(context) ;
+        				}
+                                } catch (NamingContextException nce) {
+                                    throw new RepositoryException(nce);
+                                }
 			}
 			// If no JNDI path is specified, init the repository with default
 			// settings based on the respository.xml in the conf directory.

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task)

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/build)

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/classes (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/build/classes)

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/classes/org (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/build/classes/org)

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/classes/org/jbpm (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/build/classes/org/jbpm)

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build/classes/org/jbpm/ant (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/build/classes/org/jbpm/ant)

Deleted: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/build.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,20 +0,0 @@
-<project name="jbpm-ant-task" default="build-task" basedir=".">
-
-        <path id="classpath">
-            <pathelement location="src/test/resources"/>
-                <pathelement location="build/classes" />
-                <pathelement location="build/test/classes" />
-        </path>
-
-
-        <target name="build-task">
-		<mkdir dir="build/classes"/>
-                <javac srcdir="src" destdir="build/classes"
-			debug="on" >
-                        <classpath refid="classpath" />
-                </javac>
-		<jar basedir="build/classes" destfile="build/jbpm-ant.jar"
-			includes="**/*.class"/>
-	</target>
-
-</project>

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/build.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,20 @@
+<project name="jbpm-ant-task" default="build-task" basedir=".">
+
+        <path id="classpath">
+            <pathelement location="src/test/resources"/>
+                <pathelement location="build/classes" />
+                <pathelement location="build/test/classes" />
+        </path>
+
+
+        <target name="build-task">
+		<mkdir dir="build/classes"/>
+                <javac srcdir="src" destdir="build/classes"
+			debug="on" >
+                        <classpath refid="classpath" />
+                </javac>
+		<jar basedir="build/classes" destfile="build/jbpm-ant.jar"
+			includes="**/*.class"/>
+	</target>
+
+</project>

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/src)

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/src/org)

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/src/org/jbpm)

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/src/org/jbpm/ant)

Deleted: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,217 +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.jbpm.ant;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.ConnectException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.taskdefs.MatchingTask;
-import org.apache.tools.ant.types.FileSet;
-
-/**
- * ant task for deploying process archives to the deployment servlet.
- * 
- * @author kurt stam
- */
-public class DeployProcessToServerTask extends MatchingTask {
-
-    private static final String boundary = "AaB03x";
-    
-    String serverName = "localhost";
-    String serverPort = "8080";
-    String serverDeployer = "/jbpm-console/upload";
-    String debug = null;
-    File process = null;
-    List fileSets = new ArrayList();
-
-    public void setServerDeployer(String serverDeployer) {
-        this.serverDeployer = serverDeployer;
-    }
-
-    public void setServerName(String serverName) {
-        this.serverName = serverName;
-    }
-
-    public void setServerPort(String serverPort) {
-        this.serverPort = serverPort;
-    }
-    
-    public void setProcess(File process) {
-        this.process = process;
-    }
-    
-    public void setDebug(String debug) {
-        this.debug = debug;
-    }
-
-    public void execute() throws BuildException {
-        try {
-            if (pingServerOK()) {
-                //if attribute par is set, deploy the par file
-                if (process!=null) {
-                    log( "deploying par "+process.getAbsolutePath()+" ..." );
-                    FileInputStream in = new FileInputStream(process);
-                    ByteArrayOutputStream out = new ByteArrayOutputStream();
-                    byte[] buf = new byte[1024];
-                    int len;
-                    while ((len = in.read(buf)) > 0) {
-                        out.write(buf, 0, len);
-                    }
-                    out.flush();
-                    if (debug!=null) {
-                        saveParFile("debug.par", out.toByteArray());
-                    }
-                    deployProcessWithServlet(serverName, serverPort, serverDeployer, out.toByteArray());
-                    in.close();
-                    log("deployment complete.");
-                }
-                //if attribute fileSets is set, deploy the fileSets too
-                if (fileSets.size()>0) {
-                    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
-                    ZipOutputStream zipOutputStream = new ZipOutputStream(byteArrayOutputStream);
-    
-                    // loop over all files that are specified in the filesets
-                    Iterator iter = fileSets.iterator();
-                    while (iter.hasNext()) {
-                        FileSet fileSet = (FileSet) iter.next();
-                        DirectoryScanner dirScanner = fileSet.getDirectoryScanner(getProject());
-                        String[] fileSetFiles = dirScanner.getIncludedFiles();
-    
-                        for (int i = 0; i < fileSetFiles.length; i++) {
-                            String fileName = fileSetFiles[i];
-                            File file = new File(fileName);
-                            if ( !file.isFile() ) {
-                                file = new File( dirScanner.getBasedir(), fileName );
-                            }
-                            // deploy the file, specified in a fileset element
-                            log( "adding to process archive "+file+" ..." );
-                            addFile(zipOutputStream, file);
-                        }
-                    }
-                    zipOutputStream.close();
-                    log( "deploying par ..." );
-                    if (debug!=null) {
-                        saveParFile("debug.par", byteArrayOutputStream.toByteArray());
-                    }
-                    deployProcessWithServlet(serverName, serverPort, serverDeployer, byteArrayOutputStream.toByteArray());
-                    log("deployment complete.");
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw new BuildException( "couldn't deploy process archives : " + e.getMessage() );
-        }
-    }
-
-    public void addFileset(FileSet fileSet) {
-        this.fileSets.add(fileSet);
-    }
-
-    public void deployProcessWithServlet(String serverName, String serverPort, String serverDeployer, byte[] parBytes) throws Exception {
-        URL url = new URL("http://" + serverName + ":" + serverPort + serverDeployer);
-        URLConnection urlConnection = url.openConnection();
-        urlConnection.setDoInput(true);
-        urlConnection.setDoOutput(true);
-        urlConnection.setUseCaches(false);
-        urlConnection.setRequestProperty("Content-Type",
-        "multipart/form-data; boundary=AaB03x");
-        DataOutputStream dataOutputStream = new DataOutputStream(urlConnection
-                .getOutputStream());
-        dataOutputStream.writeBytes("--" + boundary + "\r\n");
-        dataOutputStream.writeBytes("Content-Disposition: form-data; name=\"definition\"; filename=\"dummy.par\"\r\n");
-        dataOutputStream.writeBytes("Content-Type: application/x-zip-compressed\r\n\r\n");
-
-        dataOutputStream.write(parBytes);
-
-        dataOutputStream.writeBytes("\r\n--" + boundary + "--\r\n");
-        dataOutputStream.flush();
-        dataOutputStream.close();
-        InputStream inputStream = urlConnection.getInputStream();
-        StringBuffer result = new StringBuffer();
-        int read;
-        while ((read = inputStream.read()) != -1) {
-            result.append((char)read);
-        }
-    }
-
-    public void addFile(ZipOutputStream zos, File file)
-    throws IOException 
-    {
-        byte[] buff = new byte[256];
-        if (!file.exists()) return;
-        InputStream is = new FileInputStream(file);
-        zos.putNextEntry(new ZipEntry(file.getName()));
-        int read;
-        while ((read = is.read(buff)) != -1) {
-            zos.write(buff, 0, read);
-        }
-    }
-    
-    private void saveParFile(String fileName, byte[] parBytes) throws IOException {
-        File file = new File(fileName);
-        if (!file.exists()) {
-            file.createNewFile();
-        }
-        FileOutputStream fos = new FileOutputStream(file);
-        fos.write(parBytes);
-        fos.close();
-    }
-    
-    public boolean pingServerOK() {
-        URL url = null;
-        try {
-            url = new URL("http://" + serverName + ":" + serverPort + serverDeployer);
-            URLConnection urlConnection = url.openConnection();
-            urlConnection.setDoOutput(true);
-            InputStream inputStream = urlConnection.getInputStream();
-            StringBuffer result = new StringBuffer();
-            int read;
-            while ((read = inputStream.read()) != -1) {
-                result.append((char)read);
-            }
-            return true;
-        }
-        catch (ConnectException e) {
-            log("The server (" + url + ") could not be reached.");
-            return false;
-        }
-        catch (Exception e) {
-            log("An unexpected exception happened while testing the server (" + url + ") connection.");
-            return false;
-        }
-    }
-}
\ No newline at end of file

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,217 @@
+/*
+ * 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.jbpm.ant;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.ConnectException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.taskdefs.MatchingTask;
+import org.apache.tools.ant.types.FileSet;
+
+/**
+ * ant task for deploying process archives to the deployment servlet.
+ * 
+ * @author kurt stam
+ */
+public class DeployProcessToServerTask extends MatchingTask {
+
+    private static final String boundary = "AaB03x";
+    
+    String serverName = "localhost";
+    String serverPort = "8080";
+    String serverDeployer = "/jbpm-console/upload";
+    String debug = null;
+    File process = null;
+    List fileSets = new ArrayList();
+
+    public void setServerDeployer(String serverDeployer) {
+        this.serverDeployer = serverDeployer;
+    }
+
+    public void setServerName(String serverName) {
+        this.serverName = serverName;
+    }
+
+    public void setServerPort(String serverPort) {
+        this.serverPort = serverPort;
+    }
+    
+    public void setProcess(File process) {
+        this.process = process;
+    }
+    
+    public void setDebug(String debug) {
+        this.debug = debug;
+    }
+
+    public void execute() throws BuildException {
+        try {
+            if (pingServerOK()) {
+                //if attribute par is set, deploy the par file
+                if (process!=null) {
+                    log( "deploying par "+process.getAbsolutePath()+" ..." );
+                    FileInputStream in = new FileInputStream(process);
+                    ByteArrayOutputStream out = new ByteArrayOutputStream();
+                    byte[] buf = new byte[1024];
+                    int len;
+                    while ((len = in.read(buf)) > 0) {
+                        out.write(buf, 0, len);
+                    }
+                    out.flush();
+                    if (debug!=null) {
+                        saveParFile("debug.par", out.toByteArray());
+                    }
+                    deployProcessWithServlet(serverName, serverPort, serverDeployer, out.toByteArray());
+                    in.close();
+                    log("deployment complete.");
+                }
+                //if attribute fileSets is set, deploy the fileSets too
+                if (fileSets.size()>0) {
+                    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+                    ZipOutputStream zipOutputStream = new ZipOutputStream(byteArrayOutputStream);
+    
+                    // loop over all files that are specified in the filesets
+                    Iterator iter = fileSets.iterator();
+                    while (iter.hasNext()) {
+                        FileSet fileSet = (FileSet) iter.next();
+                        DirectoryScanner dirScanner = fileSet.getDirectoryScanner(getProject());
+                        String[] fileSetFiles = dirScanner.getIncludedFiles();
+    
+                        for (int i = 0; i < fileSetFiles.length; i++) {
+                            String fileName = fileSetFiles[i];
+                            File file = new File(fileName);
+                            if ( !file.isFile() ) {
+                                file = new File( dirScanner.getBasedir(), fileName );
+                            }
+                            // deploy the file, specified in a fileset element
+                            log( "adding to process archive "+file+" ..." );
+                            addFile(zipOutputStream, file);
+                        }
+                    }
+                    zipOutputStream.close();
+                    log( "deploying par ..." );
+                    if (debug!=null) {
+                        saveParFile("debug.par", byteArrayOutputStream.toByteArray());
+                    }
+                    deployProcessWithServlet(serverName, serverPort, serverDeployer, byteArrayOutputStream.toByteArray());
+                    log("deployment complete.");
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new BuildException( "couldn't deploy process archives : " + e.getMessage() );
+        }
+    }
+
+    public void addFileset(FileSet fileSet) {
+        this.fileSets.add(fileSet);
+    }
+
+    public void deployProcessWithServlet(String serverName, String serverPort, String serverDeployer, byte[] parBytes) throws Exception {
+        URL url = new URL("http://" + serverName + ":" + serverPort + serverDeployer);
+        URLConnection urlConnection = url.openConnection();
+        urlConnection.setDoInput(true);
+        urlConnection.setDoOutput(true);
+        urlConnection.setUseCaches(false);
+        urlConnection.setRequestProperty("Content-Type",
+        "multipart/form-data; boundary=AaB03x");
+        DataOutputStream dataOutputStream = new DataOutputStream(urlConnection
+                .getOutputStream());
+        dataOutputStream.writeBytes("--" + boundary + "\r\n");
+        dataOutputStream.writeBytes("Content-Disposition: form-data; name=\"definition\"; filename=\"dummy.par\"\r\n");
+        dataOutputStream.writeBytes("Content-Type: application/x-zip-compressed\r\n\r\n");
+
+        dataOutputStream.write(parBytes);
+
+        dataOutputStream.writeBytes("\r\n--" + boundary + "--\r\n");
+        dataOutputStream.flush();
+        dataOutputStream.close();
+        InputStream inputStream = urlConnection.getInputStream();
+        StringBuffer result = new StringBuffer();
+        int read;
+        while ((read = inputStream.read()) != -1) {
+            result.append((char)read);
+        }
+    }
+
+    public void addFile(ZipOutputStream zos, File file)
+    throws IOException 
+    {
+        byte[] buff = new byte[256];
+        if (!file.exists()) return;
+        InputStream is = new FileInputStream(file);
+        zos.putNextEntry(new ZipEntry(file.getName()));
+        int read;
+        while ((read = is.read(buff)) != -1) {
+            zos.write(buff, 0, read);
+        }
+    }
+    
+    private void saveParFile(String fileName, byte[] parBytes) throws IOException {
+        File file = new File(fileName);
+        if (!file.exists()) {
+            file.createNewFile();
+        }
+        FileOutputStream fos = new FileOutputStream(file);
+        fos.write(parBytes);
+        fos.close();
+    }
+    
+    public boolean pingServerOK() {
+        URL url = null;
+        try {
+            url = new URL("http://" + serverName + ":" + serverPort + serverDeployer);
+            URLConnection urlConnection = url.openConnection();
+            urlConnection.setDoOutput(true);
+            InputStream inputStream = urlConnection.getInputStream();
+            StringBuffer result = new StringBuffer();
+            int read;
+            while ((read = inputStream.read()) != -1) {
+                result.append((char)read);
+            }
+            return true;
+        }
+        catch (ConnectException e) {
+            log("The server (" + url + ") could not be reached.");
+            return false;
+        }
+        catch (Exception e) {
+            log("An unexpected exception happened while testing the server (" + url + ") connection.");
+            return false;
+        }
+    }
+}
\ No newline at end of file

Deleted: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -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.jbpm.ant;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.util.List;
-import java.util.zip.ZipOutputStream;
-
-/**
- * ProcessDeployer deploys as a PAR and uses the functionality of DeployProcessToServerTask without requiring the use of ant.
- * 
- * @author kurt stam
- * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
- */
-public class ProcessDeployer {
-    public void execute (String serverName, String serverPort, String serverDeployer, List<File> fileList) throws Exception {
-    	ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
-    	ZipOutputStream zipOutputStream = new ZipOutputStream(byteArrayOutputStream);
-    	DeployProcessToServerTask dptt = new DeployProcessToServerTask();
-    	
-    	dptt.setServerName(serverName);
-    	dptt.setServerPort(serverPort);
-    	dptt.setServerDeployer(serverDeployer);
-    	
-    	for (File file : fileList) {
-    		dptt.addFile(zipOutputStream, file);
-    	}
-    	
-    	zipOutputStream.close();
-    	
-    	dptt.deployProcessWithServlet(serverName, serverPort, serverDeployer, byteArrayOutputStream.toByteArray());
-    }   
-}

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -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.jbpm.ant;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.util.List;
+import java.util.zip.ZipOutputStream;
+
+/**
+ * ProcessDeployer deploys as a PAR and uses the functionality of DeployProcessToServerTask without requiring the use of ant.
+ * 
+ * @author kurt stam
+ * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
+ */
+public class ProcessDeployer {
+    public void execute (String serverName, String serverPort, String serverDeployer, List<File> fileList) throws Exception {
+    	ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+    	ZipOutputStream zipOutputStream = new ZipOutputStream(byteArrayOutputStream);
+    	DeployProcessToServerTask dptt = new DeployProcessToServerTask();
+    	
+    	dptt.setServerName(serverName);
+    	dptt.setServerPort(serverPort);
+    	dptt.setServerDeployer(serverDeployer);
+    	
+    	for (File file : fileList) {
+    		dptt.addFile(zipOutputStream, file);
+    	}
+    	
+    	zipOutputStream.close();
+    	
+    	dptt.deployProcessWithServlet(serverName, serverPort, serverDeployer, byteArrayOutputStream.toByteArray());
+    }   
+}

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/lib/ext/jbpm-ant.jar (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/lib/ext/jbpm-ant.jar)
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/Constants.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/Constants.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/Constants.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -100,9 +100,9 @@
 
 	public enum OpCode
 	{
-        CallbackCommand,
-		DeployProcessDefinition
-//		AbstractCancelCommand
+        CallbackCommand
+//		,DeployProcessDefinition
+//		,AbstractCancelCommand
 //		,AbstractGetObjectBaseCommand
 //		,AsynchronousCommand
 		,CancelProcessInstanceCommand

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbActionHandler.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbActionHandler.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbActionHandler.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -36,6 +36,7 @@
 import org.jboss.soa.esb.services.jbpm.actions.JBpmCallback;
 import org.jbpm.graph.def.ActionHandler;
 import org.jbpm.graph.exe.ExecutionContext;
+import org.jbpm.graph.exe.Token;
 /**
  * 
  * Send messages to ESB services from jBPM applications, and leaves the node
@@ -43,9 +44,7 @@
  * 
  * <li/>esbCategoryName - for ESB registry lookup 
  * <li/>esbServiceName - for ESB registry lookup
- * <li>millisToWaitForResponse - if a value > 0 is supplied, a response will be
- * expected from the ESB service and maximum wait time will be set accordingly.
- * If response is not received, a CourierTimeoutException will be thrown </li>
+ * <li>millisToWaitForResponse - deprecated, please use a jBPM Timer </li>
  * 
  * @author <a href="mailto:schifest at heuristica.com.ar">Esteban</a>
  * @author <a href="mailto:kstam at jboss.com">Kurt T Stam</a>
@@ -148,7 +147,8 @@
         if (globalProcessScope!=null) {
             portReference.addExtension(Constants.PROCESS_SCOPE_ATTR, globalProcessScope.toString());
         }
-        final long tokenId = executionContext.getToken().getId();
+        final Token token = executionContext.getToken() ;
+        final long tokenId = token.getId();
         portReference.addExtension(Constants.TOKEN_ID, String.valueOf(tokenId));
         String nodeId = "";
         if (executionContext.getNode()!=null) {
@@ -166,7 +166,7 @@
             counter = 0l;
         }
         //Adding to the jBPM variableMap
-        executionContext.setVariable(counterName, counter.toString());
+        executionContext.getContextInstance().setVariableLocally(counterName, counter.toString(), token);
         //Adding same value to the message
         portReference.addExtension(counterName, counter.toString());
         return replyTo;

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/AsyncProcessSignal.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/AsyncProcessSignal.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/AsyncProcessSignal.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/AsyncProcessSignal.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,347 @@
+/*
+ * 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.services.jbpm.cmd;
+
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.transaction.Synchronization;
+import javax.transaction.Transaction;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.TransactionStrategy;
+import org.jbpm.JbpmContext;
+import org.jbpm.JbpmException;
+import org.jbpm.command.SignalCommand;
+import org.jbpm.context.exe.ContextInstance;
+import org.jbpm.graph.def.Action;
+import org.jbpm.graph.def.ActionHandler;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ExecutionContext;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.instantiation.Delegation;
+import org.jbpm.job.ExecuteActionJob;
+import org.jbpm.job.executor.JobExecutor;
+import org.jbpm.msg.MessageService;
+import org.jbpm.svc.Services;
+
+/**
+ * Handle the asynchronous signalling of a process instance task.
+ * 
+ * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+class AsyncProcessSignal
+{
+    /**
+     * The logger for this class.
+     */
+    private static Logger logger = Logger.getLogger(AsyncProcessSignal.class);
+    
+    /**
+     * The name of the ESB asynchronous signal action.
+     */
+    private static final String ESB_ASYNC_SIGNAL_ACTION_NAME = "ESB_ASYNC_SIGNAL_ACTION" ;
+    /**
+     * The base name of the ESB asynchronous signal context variable.
+     */
+    private static final String ESB_ASYNC_SIGNAL_VARIABLE_NAME = "ESB_ASYNC_SIGNAL_VARIABLE_" ;
+    /**
+     * The name of the ESB asynchronous signal transition variable.
+     */
+    private static final String ESB_ASYNC_SIGNAL_TRANSITION_VARIABLE_NAME = ESB_ASYNC_SIGNAL_VARIABLE_NAME + "TRANSITION_" ;
+    /**
+     * The name of the ESB asynchronous signal actor variable.
+     */
+    private static final String ESB_ASYNC_SIGNAL_ACTOR_VARIABLE_NAME = ESB_ASYNC_SIGNAL_VARIABLE_NAME + "ACTOR_" ;
+    /**
+     * The name of the ESB asynchronous signal variable count.
+     */
+    private static final String ESB_ASYNC_SIGNAL_VARIABLE_COUNT = ESB_ASYNC_SIGNAL_VARIABLE_NAME + "COUNT_" ;
+    /**
+     * The name of the ESB asynchronous signal variable names.
+     */
+    private static final String ESB_ASYNC_SIGNAL_VARIABLE_NAMES = ESB_ASYNC_SIGNAL_VARIABLE_NAME + "NAME_" ;
+    /**
+     * Map of active synchronisations.
+     */
+    private static final ConcurrentHashMap<Transaction, Synchronization> SYNCHRONISATIONS = new ConcurrentHashMap<Transaction, Synchronization>() ;
+    
+    /**
+     * Create an asynchronous signal job for the specified token and transition.
+     * @param token The token to signal.
+     * @param transitionName The transition to signal or null if the default transition is to be used.
+     * @param actor The actor to use.
+     * @param variables Any variables to update.
+     */
+    static void createSignalJob(final JbpmContext jbpmContext, final Token token, final String transitionName, final String actor, final Map variables)
+    {
+        final boolean isDebugEnabled = logger.isDebugEnabled() ;
+        final long tokenId = token.getId() ;
+        final ProcessInstance processInstance = token.getProcessInstance() ;
+        final long processInstanceId = processInstance.getId() ;
+        final ContextInstance contextInstance = processInstance.getContextInstance() ;
+        
+        if (isDebugEnabled)
+        {
+            logger.debug("Locking token id " + tokenId + " from process instance " + processInstanceId) ;
+        }
+        token.lock(ESB_ASYNC_SIGNAL_ACTION_NAME);
+        
+        final String transitionVariableName = ESB_ASYNC_SIGNAL_TRANSITION_VARIABLE_NAME ;
+        setVariable(contextInstance, token, transitionVariableName, transitionName) ;
+        final String actorVariableName = ESB_ASYNC_SIGNAL_ACTOR_VARIABLE_NAME ;
+        setVariable(contextInstance, token, actorVariableName, actor) ;
+        
+        final int numVariables = (variables == null ? 0 : variables.size()) ;
+        setVariable(contextInstance, token, ESB_ASYNC_SIGNAL_VARIABLE_COUNT, Integer.toString(numVariables)) ;
+        if (numVariables > 0)
+        {
+            int count = 0 ;
+            final Iterator<Map.Entry> variableEntryIter = variables.entrySet().iterator() ;
+            do
+            {
+                final Map.Entry variableEntry = variableEntryIter.next() ;
+                final String name = variableEntry.getKey().toString() ;
+                setVariable(contextInstance, token, name, variableEntry.getValue()) ;
+                setVariable(contextInstance, token, ESB_ASYNC_SIGNAL_VARIABLE_NAMES + (count++), name) ;
+            } while (variableEntryIter.hasNext()) ;
+        }
+        
+        final ExecuteActionJob signalJob = new ExecuteActionJob(token) ;
+        signalJob.setAction(getAsyncSignalAction(token)) ;
+        signalJob.setDueDate(new Date()) ;
+        signalJob.setSuspended(token.isSuspended()) ;
+        
+        if (isDebugEnabled)
+        {
+            logger.debug("Sending " + (token.isSuspended() ? "suspended " : "") +"signal task to message service for token id " + tokenId + " from process instance " + processInstanceId) ;
+        }
+        final MessageService messageService = (MessageService)Services.getCurrentService(Services.SERVICENAME_MESSAGE, true) ;
+        messageService.send(signalJob) ;
+        if (isDebugEnabled)
+        {
+            logger.debug("Sent signal task to message service for token id " + tokenId + " from process instance " + processInstanceId) ;
+        }
+        
+        final TransactionStrategy transactionStrategy = TransactionStrategy.getTransactionStrategy(true) ;
+        try
+        {
+            if (transactionStrategy.isActive())
+            {
+                final Transaction transaction = (Transaction)transactionStrategy.getTransaction() ;
+                if ((transaction != null) && !SYNCHRONISATIONS.containsKey(transaction))
+                {
+                    final Synchronization synch = new JobNotifierSynchronisation(transaction, jbpmContext.getJbpmConfiguration().getJobExecutor()) ;
+                    transaction.registerSynchronization(synch) ;
+                    SYNCHRONISATIONS.put(transaction, synch) ;
+                }
+            }
+        }
+        catch (final Exception ex)
+        {
+            if (logger.isDebugEnabled())
+            {
+                logger.debug("Failed to register synchronization", ex) ;
+            }
+        }
+    }
+    
+    /**
+     * Set the context instance variable.
+     * @param contextInstance The context instance.
+     * @param token The current token.
+     * @param name The variable name
+     * @param value The variable value
+     */
+    private static void setVariable(final ContextInstance contextInstance, final Token token, final String name, final Object value)
+    {
+        if (value != null)
+        {
+            contextInstance.setVariableLocally(name, value, token) ;
+        }
+        else
+        {
+            contextInstance.deleteVariable(name, token) ;
+        }
+    }
+    
+    /**
+     * Locate the asynchronous signal action associated with the process instance.
+     * @param token The token to signal.
+     * @return The action used for asynchronous signalling.
+     * @throws JbpmException For errors creating or locating the action.
+     */
+    private static Action getAsyncSignalAction(final Token token)
+        throws JbpmException
+    {
+        final ProcessInstance processInstance = token.getProcessInstance() ;
+        final ProcessDefinition processDefinition = token.getProcessInstance().getProcessDefinition() ;
+        if (processDefinition == null)
+        {
+            throw new JbpmException("Could not locate process definition for process instance: " + processInstance.getId()) ;
+        }
+        final Action currentAction = token.getProcessInstance().getProcessDefinition().getAction(ESB_ASYNC_SIGNAL_ACTION_NAME) ;
+        if (currentAction!= null)
+        {
+            return currentAction ;
+        }
+        
+        if (logger.isDebugEnabled())
+        {
+            logger.debug("Creating Callback action for process definition: " + processDefinition.getName() + ", id: " + processDefinition.getId()) ;
+        }
+        final Delegation delegation = new Delegation(AsyncSignalAction.class.getName()) ;
+        delegation.setConfigType("constructor") ;
+        final Action newAction = new Action(delegation) ;
+        newAction.setName(ESB_ASYNC_SIGNAL_ACTION_NAME) ;
+        processDefinition.addAction(newAction) ;
+        
+        return newAction ;
+    }
+    
+    /**
+     * The task for asynchronously signalling the token.
+     * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
+     */
+    private static class AsyncSignalAction implements ActionHandler
+    {
+        /**
+         * Serial version UID for this action.
+         */
+        private static final long serialVersionUID = -1462271955979788905L;
+        
+        /**
+         * Construct the signal job.
+         * @param configuration The configuration.
+         */
+        AsyncSignalAction(final String configuration)
+            throws JbpmException
+        {
+        }
+        
+        /**
+         * Process the background signal task.
+         * @param executionContext The current execution context.
+         */
+        public void execute(final ExecutionContext executionContext)
+            throws Exception
+        {
+            final boolean isDebugEnabled = logger.isDebugEnabled() ;
+            final Token token = executionContext.getToken() ;
+            final long tokenId = token.getId() ;
+            if (isDebugEnabled)
+            {
+                logger.debug("Unlocking token id " + tokenId + " from process instance " +
+                    token.getProcessInstance().getId()) ;
+            }
+            token.unlock(ESB_ASYNC_SIGNAL_ACTION_NAME) ;
+            if (isDebugEnabled)
+            {
+                logger.debug("Signaling task " + tokenId + " from process instance " +
+                    token.getProcessInstance().getId()) ;
+            }
+            final ProcessInstance processInstance = token.getProcessInstance() ;
+            final ContextInstance contextInstance = processInstance.getContextInstance() ;
+            final String transitionName = (String)contextInstance.getVariableLocally(ESB_ASYNC_SIGNAL_TRANSITION_VARIABLE_NAME, token) ;
+            final String actor = (String)contextInstance.getVariableLocally(ESB_ASYNC_SIGNAL_ACTOR_VARIABLE_NAME, token) ;
+            final JbpmContext jbpmContext = executionContext.getJbpmContext() ;
+            final String origActor = jbpmContext.getActorId() ;
+            
+            final int variableCount = Integer.parseInt((String)contextInstance.getVariableLocally(ESB_ASYNC_SIGNAL_VARIABLE_COUNT, token)) ;
+            for(int count = 0 ; count < variableCount ; count++)
+            {
+                final String name = (String)contextInstance.getVariableLocally(ESB_ASYNC_SIGNAL_VARIABLE_NAMES + count, token) ;
+                final Object value = contextInstance.getVariableLocally(name, token) ;
+                contextInstance.setVariable(name, value) ;
+            }
+            
+            try
+            {
+                if (actor != null)
+                {
+                    jbpmContext.setActorId(actor) ;
+                }
+                final SignalCommand signalCommand = new SignalCommand(tokenId, transitionName) ;
+                signalCommand.execute(jbpmContext) ;
+            }
+            finally
+            {
+                jbpmContext.setActorId(origActor) ;
+            }
+            if (isDebugEnabled)
+            {
+                logger.debug("Signalled task " + tokenId + " from process instance " +
+                    token.getProcessInstance().getId()) ;
+            }
+        }
+    }
+    
+    /**
+     * Synchronisation to notify the job executor.
+     * @author kevin
+     */
+    private static final class JobNotifierSynchronisation implements Synchronization
+    {
+        /**
+         * The associated transaction.
+         */
+        private Transaction transaction ;
+        /**
+         * The current job executor.
+         */
+        private final JobExecutor jobExecutor ;
+        
+        /**
+         * Create the notifier synchronisation.
+         * @param transaction The current transaction.
+         * @param jobExecutor The current job executor.
+         */
+        public JobNotifierSynchronisation(final Transaction transaction, final JobExecutor jobExecutor)
+        {
+            this.transaction = transaction ;
+            this.jobExecutor = jobExecutor ;
+        }
+        
+        /**
+         * The before completion notification.
+         */
+        public void beforeCompletion()
+        {
+        }
+        
+        /**
+         * The after completion notification.
+         * @param status The status of the transaction.
+         */
+        public void afterCompletion(final int status)
+        {
+            SYNCHRONISATIONS.remove(transaction) ;
+            synchronized(jobExecutor)
+            {
+                jobExecutor.notify() ;
+            }
+        }
+    }
+}

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/CallbackCommand.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/CallbackCommand.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/CallbackCommand.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,15 +1,34 @@
-/**
- * 
+/*
+ * 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.services.jbpm.cmd;
 
-import java.util.List;
+import java.util.Map;
 
 import org.apache.log4j.Logger;
 import org.jboss.soa.esb.addressing.EPR;
 import org.jboss.soa.esb.services.jbpm.Constants;
 import org.jbpm.JbpmContext;
-import org.jbpm.command.SignalCommand;
+import org.jbpm.command.Command;
+import org.jbpm.context.exe.ContextInstance;
 import org.jbpm.graph.exe.ProcessInstance;
 import org.jbpm.graph.exe.Token;
 
@@ -17,29 +36,29 @@
  * @author kstam
  *
  */
-public class CallbackCommand extends SignalCommand {
+public class CallbackCommand implements Command {
 
-    private Logger logger = Logger.getLogger(this.getClass());
+    private static Logger logger = Logger.getLogger(CallbackCommand.class);
     /**
      * 
      */
     private static final long serialVersionUID = 1L;
+    
+    /**
+     * The named transition or null if the default is to be used.
+     */
+    private String transitionName ;
+    /**
+     * The variable map.
+     */
+    private Map variables ;
+    
     private EPR callbackEpr;
     
     public CallbackCommand() {
         super();
     }
     
-    public CallbackCommand(long tokenId, String transitionName) {
-        super(tokenId, transitionName);
-    }
-    
-    public CallbackCommand(long tokenId, String transitionName, EPR callbackEpr)
-    {
-        super(tokenId, transitionName);
-        this.callbackEpr = callbackEpr;
-    }
-    
     public EPR getCallbackEpr() {
         return callbackEpr;
     }
@@ -47,68 +66,62 @@
         this.callbackEpr = callbackEpr;
     }
     
+    public void setTransitionName(final String transitionName) {
+        this.transitionName = transitionName ;
+    }
+    
+    public void setVariables(final Map variables) {
+        this.variables = variables ;
+    }
+    
     public Object execute(JbpmContext jbpmContext) 
     {
+        final boolean isDebugEnabled = logger.isDebugEnabled() ;
         try {
-            long tokenId = checkCurrentState(jbpmContext, callbackEpr);
-            //if the state is ok, then goahead with the signalling the transition
-            this.setTokenId(tokenId);
-            return super.execute(jbpmContext);
+            long nodeId  = Long.parseLong(callbackEpr.getAddr().getExtensionValue(Constants.NODE_ID));
+            long tokenId = Long.parseLong(callbackEpr.getAddr().getExtensionValue(Constants.TOKEN_ID));
+            long processInstanceId = Long.parseLong(callbackEpr.getAddr().getExtensionValue(Constants.PROCESS_INSTANCE_ID));
+            String counterName = Constants.PROCESS_NODE_VERSION_COUNTER + nodeId + '_' + tokenId;
+            long processNodeVersion = Long.parseLong(callbackEpr.getAddr().getExtensionValue(counterName));
+            if (isDebugEnabled) logger.debug("Expected nodeId=" + nodeId + 
+                    ", tokenId=" + tokenId + ", processNodeVersion=" + processNodeVersion);
+            //get update on current state of things.
+            final Token token = jbpmContext.getToken(tokenId) ;
+            if (token == null) {
+                throw new CallbackException("Token id " + tokenId + " from process instance " + processInstanceId + " is no longer active") ;
+            }
+            final ProcessInstance instance = token.getProcessInstance() ;
+            if (instance == null) {
+                throw new CallbackException("Process instance " + processInstanceId + " is no longer active") ;
+            }
+            if (instance.getId() != processInstanceId) {
+                throw new CallbackException("Token id " + tokenId + " from process instance " + processInstanceId + " now attached to process instance " + instance.getId()) ;
+            }
+            
+            if (nodeId != token.getNode().getId()) {
+                throw new CallbackException("Token id " + tokenId + " from process instance " + processInstanceId + " is no longer on expected node, expected " + nodeId + " but discovered " + token.getNode().getId()) ;
+            }
+            if (token.hasEnded()) {
+                throw new CallbackException("Token id " + tokenId + " from process instance " + processInstanceId + " has already terminated") ;
+            }
+            
+            if (token.isLocked()) {
+                throw new CallbackException("Token id " + tokenId + " from process instance " + processInstanceId + " is already locked, another thread is active") ;
+            }
+            
+            final ContextInstance contextInstance = instance.getContextInstance() ;
+            final long currentProcessNodeVersion = Long.parseLong(String.valueOf(
+                    contextInstance.getVariableLocally(counterName, token)));
+            if (isDebugEnabled) logger.debug("ProcessNodeVersion=" + currentProcessNodeVersion);
+            if (processNodeVersion!=currentProcessNodeVersion) {
+                throw new CallbackException("The current processNodeVersion (id=" + currentProcessNodeVersion +
+                        ") is not the expected version (version=" + processNodeVersion + ").");
+            }
+            
+            AsyncProcessSignal.createSignalJob(jbpmContext, token, transitionName, jbpmContext.getActorId(), variables) ;
         } catch (CallbackException jbpmCe) {
             logger.warn(jbpmCe.getMessage());
-            return null;
         }
+        return null;
     }
-    
-    /**
-     * Checks whether the current state in jBPM is the expected state. If so it returns the tokenId
-     * on which we can invoke a signal.
-     * 
-     * @param replyTo
-     * @return
-     * @throws CallbackException
-     */
-    protected long checkCurrentState(JbpmContext jbpmContext, EPR callbackEpr)
-    throws CallbackException
-    {
-        long nodeId  = Long.parseLong(callbackEpr.getAddr().getExtensionValue(Constants.NODE_ID));
-        long tokenId = Long.parseLong(callbackEpr.getAddr().getExtensionValue(Constants.TOKEN_ID));
-        long processInstanceId = Long.parseLong(callbackEpr.getAddr().getExtensionValue(Constants.PROCESS_INSTANCE_ID));
-        String counterName = Constants.PROCESS_NODE_VERSION_COUNTER + nodeId + '_' + tokenId;
-        long processNodeVersion = Long.parseLong(callbackEpr.getAddr().getExtensionValue(counterName));
-        if (logger.isDebugEnabled()) logger.debug("Expected nodeId=" + nodeId + 
-                ", tokenId=" + tokenId + ", processNodeVersion=" + processNodeVersion);
-        //get update on current state of things.
-        ProcessInstance instance = jbpmContext.getProcessInstance(processInstanceId);
-        if (instance == null) {
-            throw new CallbackException("Process instance " + processInstanceId + " is no longer active") ;
-        }
-        List tokens = instance.findAllTokens();
-        boolean discovered = false ;
-        for (Object object : tokens) {
-            Token token = (Token) object;
-            if (token.getId()==tokenId) {
-                if (nodeId != token.getNode().getId()) {
-                    throw new CallbackException("Token id " + tokenId + " from process instance " + processInstanceId + " is no longer on expected node") ;
-                }
-                discovered = true ;
-                break;
-            }
-        }
-        if (!discovered) {
-            throw new CallbackException("Token id " + tokenId + " from process instance " + processInstanceId + " is no longer active") ;
-        }
-        //Compare current with expected
-        //get the current processNode Version
-        Long currentProcessNodeVersion = Long.parseLong(String.valueOf(
-                instance.getContextInstance().getVariable(counterName)));
-        if (logger.isDebugEnabled()) logger.debug("ProcessNodeVersion=" + currentProcessNodeVersion);
-        if (processNodeVersion!=currentProcessNodeVersion) {
-            throw new CallbackException("The current processNodeVersion (id=" + currentProcessNodeVersion +
-                    ") is not the expected version (version=" + processNodeVersion + ").");
-        }
-        return tokenId;
-    }
-
-    
 }

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/CommandExecutor.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/CommandExecutor.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/CommandExecutor.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -41,9 +41,7 @@
 import org.jbpm.command.GetProcessInstanceCommand;
 import org.jbpm.command.NewProcessInstanceCommand;
 import org.jbpm.command.SignalCommand;
-import org.jbpm.command.StartProcessInstanceCommand;
 import org.jbpm.command.impl.CommandServiceImpl;
-import org.jbpm.graph.def.ProcessDefinition;
 import org.jbpm.graph.exe.ProcessInstance;
 
 /**
@@ -77,34 +75,6 @@
 			throw new ConfigurationException(opCode.toString()+" not implemented,");
 		return command;
 	}
-
-    protected static final Command DEPLOY_PROCESS_DEF_EXECUTOR = new Command() 
-    {
-        public void execute(Message message) throws JbpmException
-        {
-            Object obj = MessageHelper.getObjectValue(message, Constants.PROCESS_DEFINITION);
-            if (null==obj)
-            {
-                obj = ProcessDefinition.parseXmlString
-                    ((String)MessageHelper.getObjectValue(message,Constants.PROCESS_DEFINITION_XML));
-            }
-            final ProcessDefinition def = (ProcessDefinition)obj;
-            logger.debug("Deploying new process definition " + def.getName());
-            executeJbpmCommand(new org.jbpm.command.Command()
-            {
-                private static final long serialVersionUID = 1L;
-                ProcessDefinition _def = def;
-                
-                public Object execute(JbpmContext jbpmCtx)
-                {
-                    jbpmCtx.deployProcessDefinition(_def);
-                    logger.info("Process Definition '" + def.getName() + "' is deployed.");
-                    return null;
-                }
-            });
-        }
-    };
-
     
 	protected static final Command CANCEL_PROCESS_INSTANCE_EXECUTOR = new Command() 
 	{
@@ -187,7 +157,6 @@
         _values.put(Constants.OpCode.CallbackCommand             ,CALLBACK_EXECUTOR);
 		_values.put(Constants.OpCode.CancelProcessInstanceCommand,CANCEL_PROCESS_INSTANCE_EXECUTOR);
         _values.put(Constants.OpCode.SignalCommand               ,SIGNAL_EXECUTOR);
-        _values.put(Constants.OpCode.DeployProcessDefinition     ,DEPLOY_PROCESS_DEF_EXECUTOR);
 		_values.put(Constants.OpCode.NewProcessInstanceCommand	
 				,new CommandExecutor.NewProcessInstancePerformer(false));
 		_values.put(Constants.OpCode.StartProcessInstanceCommand
@@ -208,13 +177,10 @@
 		private void perform(Message request, boolean start)
 		{
             ObjectMapper objectMapper = new ObjectMapper();
-            NewProcessInstanceCommand command = null;
+            final NewProcessInstanceCommand command ;
             if (start) {
-                StartProcessInstanceCommand startCmd = new StartProcessInstanceCommand();
-                String transition = MessageHelper.getStringValue(request, Constants.TRANSITION_NAME);
-                if (null!=transition)
-                    startCmd.setStartTransitionName(transition);
-                command = startCmd;
+                final String transition = MessageHelper.getStringValue(request, Constants.TRANSITION_NAME);
+                command = new AsyncStartProcessInstanceCommand(transition);
             } else {
                 command = new NewProcessInstanceCommand(); 
             }
@@ -272,6 +238,48 @@
         return jbpmService;
     }
     
-    
-
+    /**
+     * Command responsible for creating a process instance and firing an asynchronous signal to the root node.
+     * 
+     * @author <a href='kevin.conner at jboss.com'>Kevin Conner</a>
+     */
+    private static class AsyncStartProcessInstanceCommand extends NewProcessInstanceCommand
+    {
+        /**
+         * The serial version UID for this class.
+         */
+        private static final long serialVersionUID = 7917063133912138584L;
+        
+        /**
+         * The name of the transition to signal.
+         */
+        private final String transitionName ;
+        
+        /**
+         * Create the asynchronous process instance command with the specified transition.
+         * @param transitionName The transition to signal or null if the default transition should be used.
+         */
+        AsyncStartProcessInstanceCommand(final String transitionName)
+        {
+            this.transitionName = transitionName ;
+        }
+        
+        /**
+         * Execute the command.
+         * @param jbpmContext The current jBPM context.
+         * @throws Exception for any errors.
+         */
+        @Override
+        public Object execute(final JbpmContext jbpmContext)
+            throws Exception
+        {
+            final Object result = super.execute(jbpmContext) ;
+            if (result instanceof ProcessInstance)
+            {
+                final ProcessInstance processInstance = (ProcessInstance)result ;
+                AsyncProcessSignal.createSignalJob(jbpmContext, processInstance.getRootToken(), transitionName, getActorId(), null) ;
+            }
+            return result ;
+        }
+    }
 }

Deleted: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/DeployProcessDefinitionFacade.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/DeployProcessDefinitionFacade.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/DeployProcessDefinitionFacade.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,115 +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.services.jbpm.cmd;
-
-import java.io.InputStream;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.services.jbpm.Constants;
-import org.jboss.soa.esb.services.jbpm.Constants.OpCode;
-import org.jboss.soa.esb.services.jbpm.actions.BpmProcessor;
-import org.jboss.soa.esb.util.ClassUtil;
-import org.jboss.soa.esb.util.Util;
-import org.jbpm.graph.def.ProcessDefinition;
-
-/**
- *
- * Implementation of a message preprocessor that obtains the process definition 
- * from the action configuration XML
- * 
- * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a> 
- */
-public class DeployProcessDefinitionFacade extends MessageFacade
-{
-    public OpCode getOpCode() { return Constants.OpCode.DeployProcessDefinition; }
-
-    public DeployProcessDefinitionFacade(ConfigTree config) throws ConfigurationException
-    {
-        _fileName=config.getAttribute(Constants.PROCESS_DEFINITION_FILE_TAG);       
-        ConfigTree[] childs = config.getChildren(Constants.PROCESS_DEFINITION_XML_TAG);
-
-        if (null!=_fileName)
-        {
-            if (childs.length>0)
-                throw new ConfigurationException
-                    ("You can specify either '"+Constants.PROCESS_DEFINITION_FILE_TAG+"' attribute OR "
-                    +Constants.PROCESS_DEFINITION_XML_TAG+"> element, but not both");
-            
-            InputStream stream = ClassUtil.getResourceAsStream(_fileName, BpmProcessor.class);
-            _validProcessDef = ProcessDefinition.parseXmlInputStream(stream);
-            return;
-        }
-        
-        if (childs.length<1)
-            throw new ConfigurationException("Missing or invalid <"+Constants.PROCESS_DEFINITION_XML_TAG+"> element");
-        if (childs.length>1)
-            throw new ConfigurationException("Only one <"+Constants.PROCESS_DEFINITION_XML_TAG+"> element can be specified");
-
-        String version  = childs[0].getAttribute("version");
-        String encoding = childs[0].getAttribute("encoding");
-        if (Util.isNullString(version) || Util.isNullString(encoding))
-            throw new ConfigurationException("Wrong 'version' or 'encoding' attribute in <"+Constants.PROCESS_DEFINITION_XML_TAG+">");
-        StringBuilder sb = new StringBuilder("<?xml version='").append(version)
-            .append("' encoding='").append(encoding).append("' ?>\n")
-        ;
-
-        ConfigTree[] def = childs[0].getChildren("process-definition");
-        if (null==def || def.length<1)
-            throw new ConfigurationException("Missing or invalid <process-definition> element");
-        if (def.length>1)
-            throw new ConfigurationException("Only one <process-definition> element can be specified");
-
-        final String xmlString = sb.append(def[0].toString()).toString();
-        try
-        {
-            _validProcessDef = ProcessDefinition.parseXmlString(xmlString);
-        }
-        catch (Exception e)
-        {
-            throw new ConfigurationException(e);
-        }
-    }
-    
-    public void setJBPMContextParameters(Message message) 
-    {
-        if (null!= _fileName)
-            try
-            {
-                InputStream stream = ClassUtil.getResourceAsStream(_fileName, BpmProcessor.class);
-                _validProcessDef = ProcessDefinition.parseXmlInputStream(stream);
-            }
-            catch (Exception e)
-            {
-                _logger.info("Keeping previous process definition");
-                _logger.error("Invalid process definition file <"+_fileName+">",e);
-            }
-        message.getBody().add(Constants.PROCESS_DEFINITION, _validProcessDef);
-    }
-    
-    protected String            _fileName;
-    protected ProcessDefinition _validProcessDef;
-    private static final Logger _logger = Logger.getLogger(DeployProcessDefinitionFacade.class);
-}

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/MessageFacade.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/MessageFacade.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/MessageFacade.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -51,8 +51,6 @@
             return new SignalFacade(config);
         if (Constants.OpCode.StartProcessInstanceCommand.equals(opCode))
             return new NewProcessInstanceFacade(config, true);
-        if (Constants.OpCode.DeployProcessDefinition.equals(opCode))
-            return new DeployProcessDefinitionFacade(config);
                   
         throw new UnsupportedOperationException(opCode.toString()+" not implemented");
     }

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/META-INF/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/META-INF/jboss-esb.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/META-INF/jboss-esb.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -5,14 +5,14 @@
      -->
      <providers>
      	  <!-- change the following element to jms-jca-provider to enable transactional context  -->
-          <jms-provider name="CallbackQueue-JMS-Provider" connection-factory="ConnectionFactory">          
+          <jms-jca-provider name="CallbackQueue-JMS-Provider" connection-factory="ConnectionFactory">          
               <jms-bus busid="jBPMCallbackBus">
                   <jms-message-filter
                       dest-type="QUEUE"
                       dest-name="queue/CallbackQueue"
                   />
               </jms-bus>
-          </jms-provider>
+          </jms-jca-provider>
       </providers>
       
 	<services>   
@@ -29,6 +29,6 @@
 				<action name="action" class="org.jboss.soa.esb.services.jbpm.actions.JBpmCallback"/>
 			</actions>
 		</service>
-	</services>	
+	</services>
 		
 </jbossesb>

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-ds.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-ds.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-ds.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,22 +1,37 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <datasources>
+<!--
+   <xa-datasource>
+         <jndi-name>JbpmDS</jndi-name>
+         <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
+         <track-connection-by-tx/>
+         <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
+         <xa-datasource-property name="URL">jdbc:h2:${jboss.server.data.dir}${/}h2${/}jbpmDB;MVCC=TRUE</xa-datasource-property>
+         <xa-datasource-property name="User">sa</xa-datasource-property>
+         <xa-datasource-property name="Password"></xa-datasource-property>
+         <min-pool-size>5</min-pool-size>
+         <max-pool-size>20</max-pool-size>
+         <idle-timeout-minutes>0</idle-timeout-minutes>
+         <prepared-statement-cache-size>32</prepared-statement-cache-size>
+         <depends>jboss:service=h2,database=jbpmDB</depends>
+   </xa-datasource>
+-->
    <local-tx-datasource>
          <jndi-name>JbpmDS</jndi-name>
-         <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}jbpmDB</connection-url>
-         <driver-class>org.hsqldb.jdbcDriver</driver-class>
+         <connection-url>jdbc:h2:${jboss.server.data.dir}${/}h2${/}jbpmDB;MVCC=TRUE</connection-url>
+         <driver-class>org.h2.Driver</driver-class>
          <user-name>sa</user-name>
-         <password></password>
+         <password/>
+         <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
          <min-pool-size>5</min-pool-size>
          <max-pool-size>20</max-pool-size>
          <idle-timeout-minutes>0</idle-timeout-minutes>
          <prepared-statement-cache-size>32</prepared-statement-cache-size>
-         <depends>jboss:service=Hypersonic,database=jbpmDB</depends>
+         <depends>jboss:service=h2,database=jbpmDB</depends>
    </local-tx-datasource>
-   <mbean code="org.jboss.jdbc.HypersonicDatabase"
-        name="jboss:service=Hypersonic,database=jbpmDB">
+   <mbean code="org.jboss.internal.soa.esb.dependencies.H2Database"
+        name="jboss:service=h2,database=jbpmDB">
         <attribute name="Database">jbpmDB</attribute>
-        <attribute name="InProcessMode">true</attribute>
    </mbean>
-   
 </datasources>

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-service.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-service.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-service.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -12,6 +12,7 @@
       jbpm-sql/import.sql
       </attribute>
       <depends>jboss.jca:service=DataSourceBinding,name=JbpmDS</depends>
+      <attribute name="UseEOL">true</attribute>
     </mbean>
 
    <mbean code="org.jboss.soa.esb.services.jbpm.configuration.JbpmService"

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.db2.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.db2.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.db2.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ bigint generated by default as identity, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EXPRESSION_ varchar(4000), EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
+create table JBPM_ACTION (ID_ bigint generated by default as identity, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ bigint generated by default as identity, NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varchar(1024) for bit data, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ bigint generated by default as identity, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ bigint generated by default as identity, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ bigint generated by default as identity, VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_));
 create table JBPM_TRANSITION (ID_ bigint generated by default as identity, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ bigint generated by default as identity, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, SCRIPT_ bigint, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ bigint generated by default as identity, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(255), TASKINSTANCE_ bigint, primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ bigint generated by default as identity, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ bigint generated by default as identity, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.derby.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.derby.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.derby.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EXPRESSION_ varchar(4000), EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
+create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ bigint not null, NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varchar(1024) for bit data, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ bigint not null, VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_));
 create table JBPM_TRANSITION (ID_ bigint not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, SCRIPT_ bigint, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(255), TASKINSTANCE_ bigint, primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.firebird.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.firebird.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.firebird.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ numeric(18,0) not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ numeric(18,0), ACTIONDELEGATION_ numeric(18,0), EVENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ numeric(18,0), EXPRESSION_ varchar(4000), EVENTINDEX_ integer, EXCEPTIONHANDLER_ numeric(18,0), EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
+create table JBPM_ACTION (ID_ numeric(18,0) not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ numeric(18,0), ACTIONDELEGATION_ numeric(18,0), EVENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ numeric(18,0), EVENTINDEX_ integer, EXCEPTIONHANDLER_ numeric(18,0), EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ numeric(18,0) not null, NAME_ varchar(255), FILEDEFINITION_ numeric(18,0), primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ numeric(18,0) not null, BYTES_ blob, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ numeric(18,0) not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ numeric(18,0), TASKINSTANCE_ numeric(18,0), TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ numeric(18,0) not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), PARENT_ numeric(18,0), SUBPROCESSINSTANCE_ numeric(18,0), primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ numeric(18,0) not null, VERSION_ integer not null, TOKEN_ numeric(18,0), CONTEXTINSTANCE_ numeric(18,0), primary key (ID_));
 create table JBPM_TRANSITION (ID_ numeric(18,0) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), FROM_ numeric(18,0), TO_ numeric(18,0), CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ numeric(18,0) not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), PROCESSSTATE_ numeric(18,0), TASKCONTROLLER_ numeric(18,0), INDEX_ integer, SCRIPT_ numeric(18,0), primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ numeric(18,0), TOKENVARIABLEMAP_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), BYTEARRAYVALUE_ numeric(18,0), DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ numeric(18,0), STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(255), TASKINSTANCE_ numeric(18,0), primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ numeric(18,0) not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ numeric(18,0), PROCESSSTATE_ numeric(18,0), TASKCONTROLLER_ numeric(18,0), INDEX_ integer, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ numeric(18,0), TOKENVARIABLEMAP_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), BYTEARRAYVALUE_ numeric(18,0), DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ numeric(18,0), STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ numeric(18,0), primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.hsqldb.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.hsqldb.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.hsqldb.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ bigint generated by default as identity (start with 1), class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bit, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EXPRESSION_ varchar(4000), EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
+create table JBPM_ACTION (ID_ bigint generated by default as identity (start with 1), class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bit, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ bigint generated by default as identity (start with 1), NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varbinary(1024), INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ bit, ISTERMINATIONIMPLICIT_ bit, ISSUSPENDED_ bit, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ bigint generated by default as identity (start with 1), VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_));
 create table JBPM_TRANSITION (ID_ bigint generated by default as identity (start with 1), NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ bigint generated by default as identity (start with 1), VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, SCRIPT_ bigint, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(255), TASKINSTANCE_ bigint, primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ bigint generated by default as identity (start with 1), VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ bigint generated by default as identity (start with 1), CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.informix.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.informix.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.informix.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_  serial8 not null, class char(255) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ int8, ACTIONDELEGATION_ int8, EVENT_ int8, PROCESSDEFINITION_ int8, TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ int8, EXPRESSION_ lvarchar(4000), EVENTINDEX_ integer, EXCEPTIONHANDLER_ int8, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
+create table JBPM_ACTION (ID_  serial8 not null, class char(255) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ int8, ACTIONDELEGATION_ int8, EVENT_ int8, PROCESSDEFINITION_ int8, EXPRESSION_ lvarchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ int8, EVENTINDEX_ integer, EXCEPTIONHANDLER_ int8, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_  serial8 not null, NAME_ varchar(255), FILEDEFINITION_ int8, primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ int8 not null, BYTES_ byte, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_  serial8 not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ datetime year to fraction(5), MESSAGE_ lvarchar(4000), TOKEN_ int8, TASKINSTANCE_ int8, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_  serial8 not null, VERSION_ integer not null, NAME_ varchar(255), START_ datetime year to fraction(5), END_ datetime year to fraction(5), NODEENTER_ datetime year to fraction(5), NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ int8, PROCESSINSTANCE_ int8, PARENT_ int8, SUBPROCESSINSTANCE_ int8, primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_  serial8 not null, VERSION_ integer not null, TOKEN_ int8, CONTEXTINSTANCE_ int8, primary key (ID_));
 create table JBPM_TRANSITION (ID_  serial8 not null, NAME_ varchar(255), DESCRIPTION_ lvarchar(4000), PROCESSDEFINITION_ int8, FROM_ int8, TO_ int8, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_  serial8 not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), PROCESSSTATE_ int8, TASKCONTROLLER_ int8, INDEX_ integer, SCRIPT_ int8, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_  serial8 not null, CLASS_ char(255) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(255), TOKEN_ int8, TOKENVARIABLEMAP_ int8, PROCESSINSTANCE_ int8, BYTEARRAYVALUE_ int8, DATEVALUE_ datetime year to fraction(5), DOUBLEVALUE_ float, LONGIDCLASS_ varchar(255), LONGVALUE_ int8, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(255), TASKINSTANCE_ int8, primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_  serial8 not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ int8, PROCESSSTATE_ int8, TASKCONTROLLER_ int8, INDEX_ integer, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_  serial8 not null, CLASS_ char(255) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(255), TOKEN_ int8, TOKENVARIABLEMAP_ int8, PROCESSINSTANCE_ int8, BYTEARRAYVALUE_ int8, DATEVALUE_ datetime year to fraction(5), DOUBLEVALUE_ float, LONGIDCLASS_ varchar(255), LONGVALUE_ int8, STRINGIDCLASS_ varchar(255), STRINGVALUE_ lvarchar(4000), TASKINSTANCE_ int8, primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.ingres.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.ingres.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.ingres.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255) with null, ISPROPAGATIONALLOWED_ tinyint with null, ACTIONEXPRESSION_ varchar(255) with null, ISASYNC_ tinyint with null, REFERENCEDACTION_ bigint with null, ACTIONDELEGATION_ bigint with null, EVENT_ bigint with null, PROCESSDEFINITION_ bigint with null, TIMERNAME_ varchar(255) with null, DUEDATE_ varchar(255) with null, REPEAT_ varchar(255) with null, TRANSITIONNAME_ varchar(255) with null, TIMERACTION_ bigint with null, EXPRESSION_ varchar(4000) with null, EVENTINDEX_ integer with null, EXCEPTIONHANDLER_ bigint with null, EXCEPTIONHANDLERINDEX_ integer with null, primary key (ID_));
+create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255) with null, ISPROPAGATIONALLOWED_ tinyint with null, ACTIONEXPRESSION_ varchar(255) with null, ISASYNC_ tinyint with null, REFERENCEDACTION_ bigint with null, ACTIONDELEGATION_ bigint with null, EVENT_ bigint with null, PROCESSDEFINITION_ bigint with null, EXPRESSION_ varchar(4000) with null, TIMERNAME_ varchar(255) with null, DUEDATE_ varchar(255) with null, REPEAT_ varchar(255) with null, TRANSITIONNAME_ varchar(255) with null, TIMERACTION_ bigint with null, EVENTINDEX_ integer with null, EXCEPTIONHANDLER_ bigint with null, EXCEPTIONHANDLERINDEX_ integer with null, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ bigint not null, NAME_ varchar(255) with null, FILEDEFINITION_ bigint with null, primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varbyte(1024) with null, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255) with null, TIME_ date with null, MESSAGE_ varchar(4000) with null, TOKEN_ bigint with null, TASKINSTANCE_ bigint with null, TOKENINDEX_ integer with null, TASKINSTANCEINDEX_ integer with null, primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255) with null, START_ date with null, END_ date with null, NODEENTER_ date with null, NEXTLOGINDEX_ integer with null, ISABLETOREACTIVATEPARENT_ tinyint with null, ISTERMINATIONIMPLICIT_ tinyint with null, ISSUSPENDED_ tinyint with null, LOCK_ varchar(255) with null, NODE_ bigint with null, PROCESSINSTANCE_ bigint with null, PARENT_ bigint with null, SUBPROCESSINSTANCE_ bigint with null, primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ bigint not null, VERSION_ integer not null, TOKEN_ bigint with null, CONTEXTINSTANCE_ bigint with null, primary key (ID_));
 create table JBPM_TRANSITION (ID_ bigint not null, NAME_ varchar(255) with null, DESCRIPTION_ varchar(4000) with null, PROCESSDEFINITION_ bigint with null, FROM_ bigint with null, TO_ bigint with null, CONDITION_ varchar(255) with null, FROMINDEX_ integer with null, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255) with null, ACCESS_ varchar(255) with null, MAPPEDNAME_ varchar(255) with null, PROCESSSTATE_ bigint with null, TASKCONTROLLER_ bigint with null, INDEX_ integer with null, SCRIPT_ bigint with null, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255) with null, CONVERTER_ char(1) with null, TOKEN_ bigint with null, TOKENVARIABLEMAP_ bigint with null, PROCESSINSTANCE_ bigint with null, BYTEARRAYVALUE_ bigint with null, DATEVALUE_ date with null, DOUBLEVALUE_ float with null, LONGIDCLASS_ varchar(255) with null, LONGVALUE_ bigint with null, STRINGIDCLASS_ varchar(255) with null, STRINGVALUE_ varchar(255) with null, TASKINSTANCE_ bigint with null, primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255) with null, ACCESS_ varchar(255) with null, MAPPEDNAME_ varchar(255) with null, SCRIPT_ bigint with null, PROCESSSTATE_ bigint with null, TASKCONTROLLER_ bigint with null, INDEX_ integer with null, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255) with null, CONVERTER_ char(1) with null, TOKEN_ bigint with null, TOKENVARIABLEMAP_ bigint with null, PROCESSINSTANCE_ bigint with null, BYTEARRAYVALUE_ bigint with null, DATEVALUE_ date with null, DOUBLEVALUE_ float with null, LONGIDCLASS_ varchar(255) with null, LONGVALUE_ bigint with null, STRINGIDCLASS_ varchar(255) with null, STRINGVALUE_ varchar(4000) with null, TASKINSTANCE_ bigint with null, primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.interbase.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.interbase.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.interbase.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,5 +1,5 @@
 delete from RDB$GENERATORS where RDB$GENERATOR_NAME = 'HIBERNATE_SEQUENCE';
-create table JBPM_ACTION (ID_ numeric(18,0) not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ numeric(18,0), ACTIONDELEGATION_ numeric(18,0), EVENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ numeric(18,0), EXPRESSION_ varchar(4000), EVENTINDEX_ integer, EXCEPTIONHANDLER_ numeric(18,0), EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
+create table JBPM_ACTION (ID_ numeric(18,0) not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ numeric(18,0), ACTIONDELEGATION_ numeric(18,0), EVENT_ numeric(18,0), PROCESSDEFINITION_ numeric(18,0), EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ numeric(18,0), EVENTINDEX_ integer, EXCEPTIONHANDLER_ numeric(18,0), EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ numeric(18,0) not null, NAME_ varchar(255), FILEDEFINITION_ numeric(18,0), primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ numeric(18,0) not null, BYTES_ blob, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ numeric(18,0) not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ numeric(18,0), TASKINSTANCE_ numeric(18,0), TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
@@ -29,8 +29,8 @@
 create table JBPM_TOKEN (ID_ numeric(18,0) not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), PARENT_ numeric(18,0), SUBPROCESSINSTANCE_ numeric(18,0), primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ numeric(18,0) not null, VERSION_ integer not null, TOKEN_ numeric(18,0), CONTEXTINSTANCE_ numeric(18,0), primary key (ID_));
 create table JBPM_TRANSITION (ID_ numeric(18,0) not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric(18,0), FROM_ numeric(18,0), TO_ numeric(18,0), CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ numeric(18,0) not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), PROCESSSTATE_ numeric(18,0), TASKCONTROLLER_ numeric(18,0), INDEX_ integer, SCRIPT_ numeric(18,0), primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ numeric(18,0), TOKENVARIABLEMAP_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), BYTEARRAYVALUE_ numeric(18,0), DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ numeric(18,0), STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(255), TASKINSTANCE_ numeric(18,0), primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ numeric(18,0) not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ numeric(18,0), PROCESSSTATE_ numeric(18,0), TASKCONTROLLER_ numeric(18,0), INDEX_ integer, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ numeric(18,0) not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ numeric(18,0), TOKENVARIABLEMAP_ numeric(18,0), PROCESSINSTANCE_ numeric(18,0), BYTEARRAYVALUE_ numeric(18,0), DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ numeric(18,0), STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ numeric(18,0), primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mckoi.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mckoi.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mckoi.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bit, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EXPRESSION_ varchar(4000), EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
+create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bit, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ bigint not null, NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ varbinary, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ bit, ISTERMINATIONIMPLICIT_ bit, ISSUSPENDED_ bit, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ bigint not null, VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_));
 create table JBPM_TRANSITION (ID_ bigint not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, SCRIPT_ bigint, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(255), TASKINSTANCE_ bigint, primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mssql.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mssql.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mssql.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ numeric(19,0) identity not null, class char(1) not null, NAME_ varchar(255) null, ISPROPAGATIONALLOWED_ tinyint null, ACTIONEXPRESSION_ varchar(255) null, ISASYNC_ tinyint null, REFERENCEDACTION_ numeric(19,0) null, ACTIONDELEGATION_ numeric(19,0) null, EVENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, TIMERNAME_ varchar(255) null, DUEDATE_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, TIMERACTION_ numeric(19,0) null, EXPRESSION_ varchar(4000) null, EVENTINDEX_ int null, EXCEPTIONHANDLER_ numeric(19,0) null, EXCEPTIONHANDLERINDEX_ int null, primary key (ID_));
+create table JBPM_ACTION (ID_ numeric(19,0) identity not null, class char(1) not null, NAME_ varchar(255) null, ISPROPAGATIONALLOWED_ tinyint null, ACTIONEXPRESSION_ varchar(255) null, ISASYNC_ tinyint null, REFERENCEDACTION_ numeric(19,0) null, ACTIONDELEGATION_ numeric(19,0) null, EVENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, EXPRESSION_ varchar(4000) null, TIMERNAME_ varchar(255) null, DUEDATE_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, TIMERACTION_ numeric(19,0) null, EVENTINDEX_ int null, EXCEPTIONHANDLER_ numeric(19,0) null, EXCEPTIONHANDLERINDEX_ int null, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, FILEDEFINITION_ numeric(19,0) null, primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ numeric(19,0) not null, BYTES_ varbinary(1024) null, INDEX_ int not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ numeric(19,0) identity not null, VERSION_ int not null, ACTORID_ varchar(255) null, TIME_ datetime null, MESSAGE_ varchar(4000) null, TOKEN_ numeric(19,0) null, TASKINSTANCE_ numeric(19,0) null, TOKENINDEX_ int null, TASKINSTANCEINDEX_ int null, primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ numeric(19,0) identity not null, VERSION_ int not null, NAME_ varchar(255) null, START_ datetime null, END_ datetime null, NODEENTER_ datetime null, NEXTLOGINDEX_ int null, ISABLETOREACTIVATEPARENT_ tinyint null, ISTERMINATIONIMPLICIT_ tinyint null, ISSUSPENDED_ tinyint null, LOCK_ varchar(255) null, NODE_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, PARENT_ numeric(19,0) null, SUBPROCESSINSTANCE_ numeric(19,0) null, primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ numeric(19,0) identity not null, VERSION_ int not null, TOKEN_ numeric(19,0) null, CONTEXTINSTANCE_ numeric(19,0) null, primary key (ID_));
 create table JBPM_TRANSITION (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, FROM_ numeric(19,0) null, TO_ numeric(19,0) null, CONDITION_ varchar(255) null, FROMINDEX_ int null, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ numeric(19,0) identity not null, VARIABLENAME_ varchar(255) null, ACCESS_ varchar(255) null, MAPPEDNAME_ varchar(255) null, PROCESSSTATE_ numeric(19,0) null, TASKCONTROLLER_ numeric(19,0) null, INDEX_ int null, SCRIPT_ numeric(19,0) null, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, CONVERTER_ char(1) null, TOKEN_ numeric(19,0) null, TOKENVARIABLEMAP_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, BYTEARRAYVALUE_ numeric(19,0) null, DATEVALUE_ datetime null, DOUBLEVALUE_ double precision null, LONGIDCLASS_ varchar(255) null, LONGVALUE_ numeric(19,0) null, STRINGIDCLASS_ varchar(255) null, STRINGVALUE_ varchar(255) null, TASKINSTANCE_ numeric(19,0) null, primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ numeric(19,0) identity not null, VARIABLENAME_ varchar(255) null, ACCESS_ varchar(255) null, MAPPEDNAME_ varchar(255) null, SCRIPT_ numeric(19,0) null, PROCESSSTATE_ numeric(19,0) null, TASKCONTROLLER_ numeric(19,0) null, INDEX_ int null, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, CONVERTER_ char(1) null, TOKEN_ numeric(19,0) null, TOKENVARIABLEMAP_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, BYTEARRAYVALUE_ numeric(19,0) null, DATEVALUE_ datetime null, DOUBLEVALUE_ double precision null, LONGIDCLASS_ varchar(255) null, LONGVALUE_ numeric(19,0) null, STRINGIDCLASS_ varchar(255) null, STRINGVALUE_ varchar(4000) null, TASKINSTANCE_ numeric(19,0) null, primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mysql.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mysql.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.mysql.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ bigint not null auto_increment, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bit, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EXPRESSION_ text, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_)) type=InnoDB;
+create table JBPM_ACTION (ID_ bigint not null auto_increment, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bit, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ text, TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_)) type=InnoDB;
 create table JBPM_BYTEARRAY (ID_ bigint not null auto_increment, NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_)) type=InnoDB;
 create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ blob, INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_)) type=InnoDB;
 create table JBPM_COMMENT (ID_ bigint not null auto_increment, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ datetime, MESSAGE_ text, TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_)) type=InnoDB;
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ bigint not null auto_increment, VERSION_ integer not null, NAME_ varchar(255), START_ datetime, END_ datetime, NODEENTER_ datetime, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ bit, ISTERMINATIONIMPLICIT_ bit, ISSUSPENDED_ bit, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_)) type=InnoDB;
 create table JBPM_TOKENVARIABLEMAP (ID_ bigint not null auto_increment, VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_)) type=InnoDB;
 create table JBPM_TRANSITION (ID_ bigint not null auto_increment, NAME_ varchar(255), DESCRIPTION_ text, PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_)) type=InnoDB;
-create table JBPM_VARIABLEACCESS (ID_ bigint not null auto_increment, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, SCRIPT_ bigint, primary key (ID_)) type=InnoDB;
-create table JBPM_VARIABLEINSTANCE (ID_ bigint not null auto_increment, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ datetime, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(255), TASKINSTANCE_ bigint, primary key (ID_)) type=InnoDB;
+create table JBPM_VARIABLEACCESS (ID_ bigint not null auto_increment, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_)) type=InnoDB;
+create table JBPM_VARIABLEINSTANCE (ID_ bigint not null auto_increment, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ datetime, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ text, TASKINSTANCE_ bigint, primary key (ID_)) type=InnoDB;
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.oracle.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.oracle.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.oracle.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ number(19,0) not null, class char(1 char) not null, NAME_ varchar2(255 char), ISPROPAGATIONALLOWED_ number(1,0), ACTIONEXPRESSION_ varchar2(255 char), ISASYNC_ number(1,0), REFERENCEDACTION_ number(19,0), ACTIONDELEGATION_ number(19,0), EVENT_ number(19,0), PROCESSDEFINITION_ number(19,0), TIMERNAME_ varchar2(255 char), DUEDATE_ varchar2(255 char), REPEAT_ varchar2(255 char), TRANSITIONNAME_ varchar2(255 char), TIMERACTION_ number(19,0), EXPRESSION_ varchar2(4000 char), EVENTINDEX_ number(10,0), EXCEPTIONHANDLER_ number(19,0), EXCEPTIONHANDLERINDEX_ number(10,0), primary key (ID_));
+create table JBPM_ACTION (ID_ number(19,0) not null, class char(1 char) not null, NAME_ varchar2(255 char), ISPROPAGATIONALLOWED_ number(1,0), ACTIONEXPRESSION_ varchar2(255 char), ISASYNC_ number(1,0), REFERENCEDACTION_ number(19,0), ACTIONDELEGATION_ number(19,0), EVENT_ number(19,0), PROCESSDEFINITION_ number(19,0), EXPRESSION_ varchar2(4000 char), TIMERNAME_ varchar2(255 char), DUEDATE_ varchar2(255 char), REPEAT_ varchar2(255 char), TRANSITIONNAME_ varchar2(255 char), TIMERACTION_ number(19,0), EVENTINDEX_ number(10,0), EXCEPTIONHANDLER_ number(19,0), EXCEPTIONHANDLERINDEX_ number(10,0), primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ number(19,0) not null, NAME_ varchar2(255 char), FILEDEFINITION_ number(19,0), primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ number(19,0) not null, BYTES_ raw(1024), INDEX_ number(10,0) not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ number(19,0) not null, VERSION_ number(10,0) not null, ACTORID_ varchar2(255 char), TIME_ timestamp, MESSAGE_ varchar2(4000 char), TOKEN_ number(19,0), TASKINSTANCE_ number(19,0), TOKENINDEX_ number(10,0), TASKINSTANCEINDEX_ number(10,0), primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ number(19,0) not null, VERSION_ number(10,0) not null, NAME_ varchar2(255 char), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ number(10,0), ISABLETOREACTIVATEPARENT_ number(1,0), ISTERMINATIONIMPLICIT_ number(1,0), ISSUSPENDED_ number(1,0), LOCK_ varchar2(255 char), NODE_ number(19,0), PROCESSINSTANCE_ number(19,0), PARENT_ number(19,0), SUBPROCESSINSTANCE_ number(19,0), primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ number(19,0) not null, VERSION_ number(10,0) not null, TOKEN_ number(19,0), CONTEXTINSTANCE_ number(19,0), primary key (ID_));
 create table JBPM_TRANSITION (ID_ number(19,0) not null, NAME_ varchar2(255 char), DESCRIPTION_ varchar2(4000 char), PROCESSDEFINITION_ number(19,0), FROM_ number(19,0), TO_ number(19,0), CONDITION_ varchar2(255 char), FROMINDEX_ number(10,0), primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ number(19,0) not null, VARIABLENAME_ varchar2(255 char), ACCESS_ varchar2(255 char), MAPPEDNAME_ varchar2(255 char), PROCESSSTATE_ number(19,0), TASKCONTROLLER_ number(19,0), INDEX_ number(10,0), SCRIPT_ number(19,0), primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ number(19,0) not null, CLASS_ char(1 char) not null, VERSION_ number(10,0) not null, NAME_ varchar2(255 char), CONVERTER_ char(1 char), TOKEN_ number(19,0), TOKENVARIABLEMAP_ number(19,0), PROCESSINSTANCE_ number(19,0), BYTEARRAYVALUE_ number(19,0), DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar2(255 char), LONGVALUE_ number(19,0), STRINGIDCLASS_ varchar2(255 char), STRINGVALUE_ varchar2(255 char), TASKINSTANCE_ number(19,0), primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ number(19,0) not null, VARIABLENAME_ varchar2(255 char), ACCESS_ varchar2(255 char), MAPPEDNAME_ varchar2(255 char), SCRIPT_ number(19,0), PROCESSSTATE_ number(19,0), TASKCONTROLLER_ number(19,0), INDEX_ number(10,0), primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ number(19,0) not null, CLASS_ char(1 char) not null, VERSION_ number(10,0) not null, NAME_ varchar2(255 char), CONVERTER_ char(1 char), TOKEN_ number(19,0), TOKENVARIABLEMAP_ number(19,0), PROCESSINSTANCE_ number(19,0), BYTEARRAYVALUE_ number(19,0), DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar2(255 char), LONGVALUE_ number(19,0), STRINGIDCLASS_ varchar2(255 char), STRINGVALUE_ varchar2(4000 char), TASKINSTANCE_ number(19,0), primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.pointbase.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.pointbase.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.pointbase.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EXPRESSION_ varchar(4000), EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
+create table JBPM_ACTION (ID_ bigint not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ smallint, ACTIONEXPRESSION_ varchar(255), ISASYNC_ smallint, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ bigint not null, NAME_ varchar(255), FILEDEFINITION_ bigint, primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ bigint not null, BYTES_ blob(1024), INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ bigint not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ bigint, TASKINSTANCE_ bigint, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ bigint not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ smallint, ISTERMINATIONIMPLICIT_ smallint, ISSUSPENDED_ smallint, LOCK_ varchar(255), NODE_ bigint, PROCESSINSTANCE_ bigint, PARENT_ bigint, SUBPROCESSINSTANCE_ bigint, primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ bigint not null, VERSION_ integer not null, TOKEN_ bigint, CONTEXTINSTANCE_ bigint, primary key (ID_));
 create table JBPM_TRANSITION (ID_ bigint not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ bigint, FROM_ bigint, TO_ bigint, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, SCRIPT_ bigint, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(255), TASKINSTANCE_ bigint, primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ bigint not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ bigint, PROCESSSTATE_ bigint, TASKCONTROLLER_ bigint, INDEX_ integer, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ bigint not null, CLASS_ char(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ bigint, TOKENVARIABLEMAP_ bigint, PROCESSINSTANCE_ bigint, BYTEARRAYVALUE_ bigint, DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ bigint, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ bigint, primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.postgresql.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.postgresql.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.postgresql.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ int8 not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bool, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bool, REFERENCEDACTION_ int8, ACTIONDELEGATION_ int8, EVENT_ int8, PROCESSDEFINITION_ int8, TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ int8, EXPRESSION_ varchar(4000), EVENTINDEX_ int4, EXCEPTIONHANDLER_ int8, EXCEPTIONHANDLERINDEX_ int4, primary key (ID_));
+create table JBPM_ACTION (ID_ int8 not null, class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bool, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bool, REFERENCEDACTION_ int8, ACTIONDELEGATION_ int8, EVENT_ int8, PROCESSDEFINITION_ int8, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ int8, EVENTINDEX_ int4, EXCEPTIONHANDLER_ int8, EXCEPTIONHANDLERINDEX_ int4, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ int8 not null, NAME_ varchar(255), FILEDEFINITION_ int8, primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ int8 not null, BYTES_ bytea, INDEX_ int4 not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ int8 not null, VERSION_ int4 not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ int8, TASKINSTANCE_ int8, TOKENINDEX_ int4, TASKINSTANCEINDEX_ int4, primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ int8 not null, VERSION_ int4 not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ int4, ISABLETOREACTIVATEPARENT_ bool, ISTERMINATIONIMPLICIT_ bool, ISSUSPENDED_ bool, LOCK_ varchar(255), NODE_ int8, PROCESSINSTANCE_ int8, PARENT_ int8, SUBPROCESSINSTANCE_ int8, primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ int8 not null, VERSION_ int4 not null, TOKEN_ int8, CONTEXTINSTANCE_ int8, primary key (ID_));
 create table JBPM_TRANSITION (ID_ int8 not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ int8, FROM_ int8, TO_ int8, CONDITION_ varchar(255), FROMINDEX_ int4, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ int8 not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), PROCESSSTATE_ int8, TASKCONTROLLER_ int8, INDEX_ int4, SCRIPT_ int8, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ int8 not null, CLASS_ char(1) not null, VERSION_ int4 not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ int8, TOKENVARIABLEMAP_ int8, PROCESSINSTANCE_ int8, BYTEARRAYVALUE_ int8, DATEVALUE_ timestamp, DOUBLEVALUE_ float8, LONGIDCLASS_ varchar(255), LONGVALUE_ int8, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(255), TASKINSTANCE_ int8, primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ int8 not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ int8, PROCESSSTATE_ int8, TASKCONTROLLER_ int8, INDEX_ int4, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ int8 not null, CLASS_ char(1) not null, VERSION_ int4 not null, NAME_ varchar(255), CONVERTER_ char(1), TOKEN_ int8, TOKENVARIABLEMAP_ int8, PROCESSINSTANCE_ int8, BYTEARRAYVALUE_ int8, DATEVALUE_ timestamp, DOUBLEVALUE_ float8, LONGIDCLASS_ varchar(255), LONGVALUE_ int8, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ int8, primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.progress.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.progress.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.progress.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ numeric not null, class character(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bit, REFERENCEDACTION_ numeric, ACTIONDELEGATION_ numeric, EVENT_ numeric, PROCESSDEFINITION_ numeric, TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ numeric, EXPRESSION_ varchar(4000), EVENTINDEX_ integer, EXCEPTIONHANDLER_ numeric, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
+create table JBPM_ACTION (ID_ numeric not null, class character(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, ACTIONEXPRESSION_ varchar(255), ISASYNC_ bit, REFERENCEDACTION_ numeric, ACTIONDELEGATION_ numeric, EVENT_ numeric, PROCESSDEFINITION_ numeric, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ numeric, EVENTINDEX_ integer, EXCEPTIONHANDLER_ numeric, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ numeric not null, NAME_ varchar(255), FILEDEFINITION_ numeric, primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ numeric not null, BYTES_ varbinary(1024), INDEX_ integer not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ numeric not null, VERSION_ integer not null, ACTORID_ varchar(255), TIME_ timestamp, MESSAGE_ varchar(4000), TOKEN_ numeric, TASKINSTANCE_ numeric, TOKENINDEX_ integer, TASKINSTANCEINDEX_ integer, primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ numeric not null, VERSION_ integer not null, NAME_ varchar(255), START_ timestamp, END_ timestamp, NODEENTER_ timestamp, NEXTLOGINDEX_ integer, ISABLETOREACTIVATEPARENT_ bit, ISTERMINATIONIMPLICIT_ bit, ISSUSPENDED_ bit, LOCK_ varchar(255), NODE_ numeric, PROCESSINSTANCE_ numeric, PARENT_ numeric, SUBPROCESSINSTANCE_ numeric, primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ numeric not null, VERSION_ integer not null, TOKEN_ numeric, CONTEXTINSTANCE_ numeric, primary key (ID_));
 create table JBPM_TRANSITION (ID_ numeric not null, NAME_ varchar(255), DESCRIPTION_ varchar(4000), PROCESSDEFINITION_ numeric, FROM_ numeric, TO_ numeric, CONDITION_ varchar(255), FROMINDEX_ integer, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ numeric not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), PROCESSSTATE_ numeric, TASKCONTROLLER_ numeric, INDEX_ integer, SCRIPT_ numeric, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ numeric not null, CLASS_ character(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ character(1), TOKEN_ numeric, TOKENVARIABLEMAP_ numeric, PROCESSINSTANCE_ numeric, BYTEARRAYVALUE_ numeric, DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ numeric, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(255), TASKINSTANCE_ numeric, primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ numeric not null, VARIABLENAME_ varchar(255), ACCESS_ varchar(255), MAPPEDNAME_ varchar(255), SCRIPT_ numeric, PROCESSSTATE_ numeric, TASKCONTROLLER_ numeric, INDEX_ integer, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ numeric not null, CLASS_ character(1) not null, VERSION_ integer not null, NAME_ varchar(255), CONVERTER_ character(1), TOKEN_ numeric, TOKENVARIABLEMAP_ numeric, PROCESSINSTANCE_ numeric, BYTEARRAYVALUE_ numeric, DATEVALUE_ timestamp, DOUBLEVALUE_ double precision, LONGIDCLASS_ varchar(255), LONGVALUE_ numeric, STRINGIDCLASS_ varchar(255), STRINGVALUE_ varchar(4000), TASKINSTANCE_ numeric, primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sapdb.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sapdb.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sapdb.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ fixed(19,0) not null, class char(1) not null, NAME_ varchar(255) null, ISPROPAGATIONALLOWED_ boolean null, ACTIONEXPRESSION_ varchar(255) null, ISASYNC_ boolean null, REFERENCEDACTION_ fixed(19,0) null, ACTIONDELEGATION_ fixed(19,0) null, EVENT_ fixed(19,0) null, PROCESSDEFINITION_ fixed(19,0) null, TIMERNAME_ varchar(255) null, DUEDATE_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, TIMERACTION_ fixed(19,0) null, EXPRESSION_ varchar(4000) null, EVENTINDEX_ int null, EXCEPTIONHANDLER_ fixed(19,0) null, EXCEPTIONHANDLERINDEX_ int null, primary key (ID_));
+create table JBPM_ACTION (ID_ fixed(19,0) not null, class char(1) not null, NAME_ varchar(255) null, ISPROPAGATIONALLOWED_ boolean null, ACTIONEXPRESSION_ varchar(255) null, ISASYNC_ boolean null, REFERENCEDACTION_ fixed(19,0) null, ACTIONDELEGATION_ fixed(19,0) null, EVENT_ fixed(19,0) null, PROCESSDEFINITION_ fixed(19,0) null, EXPRESSION_ varchar(4000) null, TIMERNAME_ varchar(255) null, DUEDATE_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, TIMERACTION_ fixed(19,0) null, EVENTINDEX_ int null, EXCEPTIONHANDLER_ fixed(19,0) null, EXCEPTIONHANDLERINDEX_ int null, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ fixed(19,0) not null, NAME_ varchar(255) null, FILEDEFINITION_ fixed(19,0) null, primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ fixed(19,0) not null, BYTES_ long byte null, INDEX_ int not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ fixed(19,0) not null, VERSION_ int not null, ACTORID_ varchar(255) null, TIME_ timestamp null, MESSAGE_ varchar(4000) null, TOKEN_ fixed(19,0) null, TASKINSTANCE_ fixed(19,0) null, TOKENINDEX_ int null, TASKINSTANCEINDEX_ int null, primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ fixed(19,0) not null, VERSION_ int not null, NAME_ varchar(255) null, START_ timestamp null, END_ timestamp null, NODEENTER_ timestamp null, NEXTLOGINDEX_ int null, ISABLETOREACTIVATEPARENT_ boolean null, ISTERMINATIONIMPLICIT_ boolean null, ISSUSPENDED_ boolean null, LOCK_ varchar(255) null, NODE_ fixed(19,0) null, PROCESSINSTANCE_ fixed(19,0) null, PARENT_ fixed(19,0) null, SUBPROCESSINSTANCE_ fixed(19,0) null, primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ fixed(19,0) not null, VERSION_ int not null, TOKEN_ fixed(19,0) null, CONTEXTINSTANCE_ fixed(19,0) null, primary key (ID_));
 create table JBPM_TRANSITION (ID_ fixed(19,0) not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ fixed(19,0) null, FROM_ fixed(19,0) null, TO_ fixed(19,0) null, CONDITION_ varchar(255) null, FROMINDEX_ int null, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ fixed(19,0) not null, VARIABLENAME_ varchar(255) null, ACCESS_ varchar(255) null, MAPPEDNAME_ varchar(255) null, PROCESSSTATE_ fixed(19,0) null, TASKCONTROLLER_ fixed(19,0) null, INDEX_ int null, SCRIPT_ fixed(19,0) null, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ fixed(19,0) not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, CONVERTER_ char(1) null, TOKEN_ fixed(19,0) null, TOKENVARIABLEMAP_ fixed(19,0) null, PROCESSINSTANCE_ fixed(19,0) null, BYTEARRAYVALUE_ fixed(19,0) null, DATEVALUE_ timestamp null, DOUBLEVALUE_ double precision null, LONGIDCLASS_ varchar(255) null, LONGVALUE_ fixed(19,0) null, STRINGIDCLASS_ varchar(255) null, STRINGVALUE_ varchar(255) null, TASKINSTANCE_ fixed(19,0) null, primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ fixed(19,0) not null, VARIABLENAME_ varchar(255) null, ACCESS_ varchar(255) null, MAPPEDNAME_ varchar(255) null, SCRIPT_ fixed(19,0) null, PROCESSSTATE_ fixed(19,0) null, TASKCONTROLLER_ fixed(19,0) null, INDEX_ int null, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ fixed(19,0) not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, CONVERTER_ char(1) null, TOKEN_ fixed(19,0) null, TOKENVARIABLEMAP_ fixed(19,0) null, PROCESSINSTANCE_ fixed(19,0) null, BYTEARRAYVALUE_ fixed(19,0) null, DATEVALUE_ timestamp null, DOUBLEVALUE_ double precision null, LONGIDCLASS_ varchar(255) null, LONGVALUE_ fixed(19,0) null, STRINGIDCLASS_ varchar(255) null, STRINGVALUE_ varchar(4000) null, TASKINSTANCE_ fixed(19,0) null, primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sybase.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sybase.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/main/resources/jbpm-sql/jbpm.jpdl.sybase.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
-create table JBPM_ACTION (ID_ numeric(19,0) identity not null, class char(1) not null, NAME_ varchar(255) null, ISPROPAGATIONALLOWED_ tinyint null, ACTIONEXPRESSION_ varchar(255) null, ISASYNC_ tinyint null, REFERENCEDACTION_ numeric(19,0) null, ACTIONDELEGATION_ numeric(19,0) null, EVENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, TIMERNAME_ varchar(255) null, DUEDATE_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, TIMERACTION_ numeric(19,0) null, EXPRESSION_ varchar(4000) null, EVENTINDEX_ int null, EXCEPTIONHANDLER_ numeric(19,0) null, EXCEPTIONHANDLERINDEX_ int null, primary key (ID_));
+create table JBPM_ACTION (ID_ numeric(19,0) identity not null, class char(1) not null, NAME_ varchar(255) null, ISPROPAGATIONALLOWED_ tinyint null, ACTIONEXPRESSION_ varchar(255) null, ISASYNC_ tinyint null, REFERENCEDACTION_ numeric(19,0) null, ACTIONDELEGATION_ numeric(19,0) null, EVENT_ numeric(19,0) null, PROCESSDEFINITION_ numeric(19,0) null, EXPRESSION_ varchar(4000) null, TIMERNAME_ varchar(255) null, DUEDATE_ varchar(255) null, REPEAT_ varchar(255) null, TRANSITIONNAME_ varchar(255) null, TIMERACTION_ numeric(19,0) null, EVENTINDEX_ int null, EXCEPTIONHANDLER_ numeric(19,0) null, EXCEPTIONHANDLERINDEX_ int null, primary key (ID_));
 create table JBPM_BYTEARRAY (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, FILEDEFINITION_ numeric(19,0) null, primary key (ID_));
 create table JBPM_BYTEBLOCK (PROCESSFILE_ numeric(19,0) not null, BYTES_ varbinary(1024) null, INDEX_ int not null, primary key (PROCESSFILE_, INDEX_));
 create table JBPM_COMMENT (ID_ numeric(19,0) identity not null, VERSION_ int not null, ACTORID_ varchar(255) null, TIME_ datetime null, MESSAGE_ varchar(4000) null, TOKEN_ numeric(19,0) null, TASKINSTANCE_ numeric(19,0) null, TOKENINDEX_ int null, TASKINSTANCEINDEX_ int null, primary key (ID_));
@@ -28,8 +28,8 @@
 create table JBPM_TOKEN (ID_ numeric(19,0) identity not null, VERSION_ int not null, NAME_ varchar(255) null, START_ datetime null, END_ datetime null, NODEENTER_ datetime null, NEXTLOGINDEX_ int null, ISABLETOREACTIVATEPARENT_ tinyint null, ISTERMINATIONIMPLICIT_ tinyint null, ISSUSPENDED_ tinyint null, LOCK_ varchar(255) null, NODE_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, PARENT_ numeric(19,0) null, SUBPROCESSINSTANCE_ numeric(19,0) null, primary key (ID_));
 create table JBPM_TOKENVARIABLEMAP (ID_ numeric(19,0) identity not null, VERSION_ int not null, TOKEN_ numeric(19,0) null, CONTEXTINSTANCE_ numeric(19,0) null, primary key (ID_));
 create table JBPM_TRANSITION (ID_ numeric(19,0) identity not null, NAME_ varchar(255) null, DESCRIPTION_ varchar(4000) null, PROCESSDEFINITION_ numeric(19,0) null, FROM_ numeric(19,0) null, TO_ numeric(19,0) null, CONDITION_ varchar(255) null, FROMINDEX_ int null, primary key (ID_));
-create table JBPM_VARIABLEACCESS (ID_ numeric(19,0) identity not null, VARIABLENAME_ varchar(255) null, ACCESS_ varchar(255) null, MAPPEDNAME_ varchar(255) null, PROCESSSTATE_ numeric(19,0) null, TASKCONTROLLER_ numeric(19,0) null, INDEX_ int null, SCRIPT_ numeric(19,0) null, primary key (ID_));
-create table JBPM_VARIABLEINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, CONVERTER_ char(1) null, TOKEN_ numeric(19,0) null, TOKENVARIABLEMAP_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, BYTEARRAYVALUE_ numeric(19,0) null, DATEVALUE_ datetime null, DOUBLEVALUE_ double precision null, LONGIDCLASS_ varchar(255) null, LONGVALUE_ numeric(19,0) null, STRINGIDCLASS_ varchar(255) null, STRINGVALUE_ varchar(255) null, TASKINSTANCE_ numeric(19,0) null, primary key (ID_));
+create table JBPM_VARIABLEACCESS (ID_ numeric(19,0) identity not null, VARIABLENAME_ varchar(255) null, ACCESS_ varchar(255) null, MAPPEDNAME_ varchar(255) null, SCRIPT_ numeric(19,0) null, PROCESSSTATE_ numeric(19,0) null, TASKCONTROLLER_ numeric(19,0) null, INDEX_ int null, primary key (ID_));
+create table JBPM_VARIABLEINSTANCE (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, VERSION_ int not null, NAME_ varchar(255) null, CONVERTER_ char(1) null, TOKEN_ numeric(19,0) null, TOKENVARIABLEMAP_ numeric(19,0) null, PROCESSINSTANCE_ numeric(19,0) null, BYTEARRAYVALUE_ numeric(19,0) null, DATEVALUE_ datetime null, DOUBLEVALUE_ double precision null, LONGIDCLASS_ varchar(255) null, LONGVALUE_ numeric(19,0) null, STRINGIDCLASS_ varchar(255) null, STRINGVALUE_ varchar(4000) null, TASKINSTANCE_ numeric(19,0) null, primary key (ID_));
 create index IDX_ACTION_EVENT on JBPM_ACTION (EVENT_);
 create index IDX_ACTION_ACTNDL on JBPM_ACTION (ACTIONDELEGATION_);
 create index IDX_ACTION_PROCDF on JBPM_ACTION (PROCESSDEFINITION_);

Copied: labs/jbossesb/workspace/chharris/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/DummyAction.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/DummyAction.java)
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/DummyAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/DummyAction.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,22 @@
+/**
+ * 
+ */
+package org.jboss.soa.esb.services.jbpm.actionhandlers;
+
+import org.jbpm.graph.def.ActionHandler;
+import org.jbpm.graph.exe.ExecutionContext;
+
+/**
+ * @author kstam
+ *
+ */
+public class DummyAction implements ActionHandler
+{
+    private static final long serialVersionUID = 1L;
+    
+    public void execute (ExecutionContext executionContext) throws Exception
+    {
+        System.out.println("DummyAction fired.");
+    }
+
+}

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/test/resources/testExceptionHandling.jpg
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/chharris/product/services/jbpm/src/test/resources/testExceptionHandling.xml
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/jbpm/src/test/resources/testExceptionHandling.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/jbpm/src/test/resources/testExceptionHandling.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -19,6 +19,7 @@
       <action class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
 	      	<esbCategoryName>MockCategory</esbCategoryName>
           	<esbServiceName>MockService</esbServiceName>
+          	<exceptionTransition>exception</exceptionTransition>
        </action>
       <transition name="ok" to="Service3"></transition>
       <transition name="exception" to="ExceptionHandling"></transition>
@@ -28,6 +29,9 @@
       <action class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
 	      	<esbCategoryName>MockCategory</esbCategoryName>
           	<esbServiceName>MockService</esbServiceName>
+          	<esbToBpmVars>
+          		<mapping esb="SomeExceptionCode" bpm="exceptionCode"/>
+          	</esbToBpmVars>
        </action>
       <transition name="ok" to="exceptionDecision"></transition>
       
@@ -36,7 +40,7 @@
    <decision name="exceptionDecision">
       <transition name="ok" to="end"></transition>
       <transition name="exceptionCondition" to="ExceptionHandling">
-         <condition>#{ exceptionCode==3}</condition>
+         <condition>#{exceptionCode==3}</condition>
       </transition>
    </decision>
 </process-definition>
\ No newline at end of file

Modified: labs/jbossesb/workspace/chharris/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksInstanceManager.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksInstanceManager.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksInstanceManager.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -21,12 +21,10 @@
 
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.util.ClassUtil;
-import org.jboss.soa.esb.helpers.NamingContext;
 import org.jboss.internal.soa.esb.assertion.AssertArgument;
 import org.apache.log4j.Logger;
 import org.milyn.Smooks;
 import org.milyn.SmooksException;
-import org.milyn.resource.URIResourceLocator;
 import org.xml.sax.SAXException;
 
 import javax.jms.*;

Modified: labs/jbossesb/workspace/chharris/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPClient.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPClient.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/SOAPClient.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -62,6 +62,7 @@
 import org.xml.sax.SAXException;
 
 import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.annotations.Annotations;
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
 import com.thoughtworks.xstream.io.xml.QNameMap;
 import com.thoughtworks.xstream.io.xml.StaxDriver;
@@ -215,7 +216,18 @@
  * In the above example, we also include an example of how to specify non-default named locations for the request
  * parameters {@link Map} and response object instance.
  * <p/>
- * To have the SOAP reponse data extracted into an OGNL keyed map (Option 2 above) and attached to the ESB
+ * We also provide, in addition to the above <a href="http://xstream.codehaus.org">XStream</a> configuration options,
+ * the ability to specify field name mappings and <a href="http://xstream.codehaus.org">XStream</a> annotated classes.
+ * <pre>
+ *      &lt;property name="responseXStreamConfig"&gt;
+ *          &lt;fieldAlias name="header" class="com.acme.order.Order" fieldName="headerFieldName" /&gt;
+ *          &lt;annotation class="com.acme.order.Order" /&gt;
+ *      &lt;/property&gt;
+ * </pre>
+ * Field mappings can be used to map XML elements onto Java fields on those occasions when the local name of the element
+ * does not correspond to the field name in the Java class.
+ * <p/>
+ * To have the SOAP response data extracted into an OGNL keyed map (Option 2 above) and attached to the ESB
  * {@link Message}, simply replace the "responseXStreamConfig" property with the "responseAsOgnlMap" property
  * having a value of "true" as follows:
  * <pre>
@@ -283,12 +295,16 @@
             }
         }
         ConfigTree[] xstreamAliases = config.getChildren("alias");
-        if(xstreamAliases != null && xstreamAliases.length != 0) {
-            configureXStreamDeserializer(xstreamAliases);
+        ConfigTree[] xstreamFieldAliases = config.getChildren("fieldAlias");
+        ConfigTree[] xstreamAnnotations = config.getChildren("annotation");
+        if ((xstreamAliases.length != 0) || (xstreamFieldAliases.length != 0) ||
+            (xstreamAnnotations.length != 0))
+        {
+            configureXStreamDeserializer(xstreamAliases, xstreamFieldAliases, xstreamAnnotations);
         }
         soapNs = config.getAttribute("SOAPNS");
 
-        // Extract the HttpClient creation properties from the ConfigTree.  Thesee are passed
+        // Extract the HttpClient creation properties from the ConfigTree.  These are passed
         // to the HttpClientFacatory...
         extractHttpClientProps(config);
         httpclient = HttpClientFactory.createHttpClient(httpClientProps);
@@ -547,7 +563,7 @@
         return docBuilderFactory.newDocumentBuilder();
     }
 
-    private void configureXStreamDeserializer(ConfigTree[] xstreamAliases) throws ConfigurationException {
+    private void configureXStreamDeserializer(ConfigTree[] xstreamAliases, ConfigTree[] xstreamFieldAliases, ConfigTree[] xstreamAnnotations) throws ConfigurationException {
         responseXStreamDeserialzer = new XStream();
         for(ConfigTree xstreamAlias : xstreamAliases) {
             String aliasName = xstreamAlias.getRequiredAttribute("name");
@@ -561,5 +577,25 @@
                 throw new ConfigurationException("Invalid SOAP response deserializer config. XStream alias type '" + aliasTypeName + "' not found.");
             }
         }
+        for(ConfigTree xstreamFieldAlias : xstreamFieldAliases) {
+            final String alias = xstreamFieldAlias.getRequiredAttribute("name");
+            final String typeName = xstreamFieldAlias.getRequiredAttribute("class");
+            final String fieldName = xstreamFieldAlias.getRequiredAttribute("fieldName");
+            try {
+                final Class type = ClassUtil.forName(typeName, getClass());
+                responseXStreamDeserialzer.aliasField(alias, type, fieldName);
+            } catch (final ClassNotFoundException cnfe) {
+                throw new ConfigurationException("Invalid SOAP response deserializer config. XStream alias type '" + typeName + "' not found.");
+            }
+        }
+        for(ConfigTree xstreamAnnotation : xstreamAnnotations) {
+            final String typeName = xstreamAnnotation.getRequiredAttribute("class");
+            try {
+                final Class type = ClassUtil.forName(typeName, getClass());
+                Annotations.configureAliases(responseXStreamDeserialzer, type) ;
+            } catch (final ClassNotFoundException cnfe) {
+                throw new ConfigurationException("Invalid SOAP response deserializer config. XStream alias type '" + typeName + "' not found.");
+            }
+        }
     }
 }

Modified: labs/jbossesb/workspace/chharris/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -163,7 +163,7 @@
         execContext.setAttribute(WsdlTransformer.TARGET_PROTOCOL, targetProtocol);
         transformer.filter(new StreamSource(new StringReader(wsdl)), new StreamResult(writer), execContext);
 
-        return writer.toString();
+        return writer.toString().trim();
     }
 
     protected void initializeTransform() throws ConfigurationException {

Modified: labs/jbossesb/workspace/chharris/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl
===================================================================
--- labs/jbossesb/workspace/chharris/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl	2008-02-28 16:09:28 UTC (rev 18617)
@@ -52,4 +52,4 @@
             <soap:address location="socket://x.y.x:8989/"/>
         </port>
     </service>
-</definitions>
\ No newline at end of file
+</definitions>

Modified: labs/jbossesb/workspace/chharris/product/skip.properties-example
===================================================================
--- labs/jbossesb/workspace/chharris/product/skip.properties-example	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/skip.properties-example	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,7 +1,8 @@
 #
 # The following properties should be added or removed if you want to skip those
-# parts of the build.  Adding all of these skips cuts "ant clean dist" on my 
-# machine down from about 3m30s to about 1m10s.  Without the clean it's about 55s
+# parts of the build.  Adding all of these skips cuts "ant clean dist" on a sample 
+# machine down from about 3m30s to about 1m10s.  Without the clean it's about 55s.
+# Without the tests it is even less.
 #
 
 #
@@ -13,3 +14,4 @@
 #skip.server.esb=true
 #skip.docs=true
 #skip.samples=true
+#skip.tests=true
\ No newline at end of file

Modified: labs/jbossesb/workspace/chharris/product/tools/console/management/mysql.properties
===================================================================
--- labs/jbossesb/workspace/chharris/product/tools/console/management/mysql.properties	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/tools/console/management/mysql.properties	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +1,4 @@
 db.dialect=org.hibernate.dialect.MySQLDialect
 connection.datasource=java:/ManagementDS
 db.datasource=ManagementDS
-database.depends=<depends>jboss.jdbc:datasource=ManagementDS,service=metadata</depends>
+database.depends=

Modified: labs/jbossesb/workspace/chharris/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/BeanRegistrationServlet.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/BeanRegistrationServlet.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/BeanRegistrationServlet.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -83,6 +83,7 @@
 		
 		try {
 			DataFilerScheduler dfs = new DataFilerScheduler();
+			dfs.start();
 			dfs.setPollMinuteFrequency(pollMinuteFrequency);
 			mbeanServer.registerMBean(dfs, dataSchedulerName);
 		} catch (InstanceAlreadyExistsException e) {
@@ -91,6 +92,8 @@
 			logger.error("", e);
 		} catch (NotCompliantMBeanException e) {
 			logger.error("", e);
+		} catch (Exception e) {
+			logger.error("", e);
 		}
 		
 	}

Modified: labs/jbossesb/workspace/chharris/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -24,6 +24,7 @@
 import java.util.Date;
 
 import org.apache.log4j.Logger;
+import org.jboss.system.ServiceMBeanSupport;
 import org.quartz.JobDataMap;
 import org.quartz.JobDetail;
 import org.quartz.Scheduler;
@@ -40,30 +41,46 @@
  * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
  * @since Version 4.2
  */
-public class DataFilerScheduler implements DataFilerSchedulerMBean {
+public class DataFilerScheduler extends ServiceMBeanSupport implements DataFilerSchedulerMBean {
 	private static final Logger logger = Logger.getLogger(DataFilerScheduler.class);
 	private static final int DEFAULT_POLL_MINUTE_FREQ = 2;
 	
+	public Scheduler scheduler = null;
+	
 	private int pollMinuteFrequency = DEFAULT_POLL_MINUTE_FREQ;
 	
 	public int getPollMinuteFrequency() {
 		return pollMinuteFrequency;
 	}
 
+	public void create() throws Exception {
+		super.create();
+		SchedulerFactory schedulerFactory = new StdSchedulerFactory();
+		scheduler = schedulerFactory.getScheduler();
+	}
+	
+	public void destroy() {
+		super.destroy();
+		try {
+			scheduler.shutdown();
+			scheduler.deleteJob(DataFilerJob.JOB_GROUP, DataFilerJob.JOB_NAME);
+		} catch (SchedulerException e) {
+			logger.error("", e);
+		}
+	}
+	
 	public void setPollMinuteFrequency(int f_pollMinuteFrequency) {
 		pollMinuteFrequency = f_pollMinuteFrequency;
 		
 		long ctime = System.currentTimeMillis();
 		
 		try {
-			SchedulerFactory schedulerFactory = new StdSchedulerFactory();
-			Scheduler scheduler = schedulerFactory.getScheduler();
 			scheduler.deleteJob(DataFilerJob.JOB_GROUP, DataFilerJob.JOB_NAME);
 			
 			JobDetail jobDetail = new JobDetail(DataFilerJob.JOB_GROUP, DataFilerJob.JOB_NAME, DataFilerJob.class);
-                        
-                        final JobDataMap datamap = new JobDataMap() ;
-                        datamap.put(ClassLoader.class.getName(), Thread.currentThread().getContextClassLoader()) ;
+
+			final JobDataMap datamap = new JobDataMap() ;
+            datamap.put(ClassLoader.class.getName(), Thread.currentThread().getContextClassLoader()) ;
 			jobDetail.setJobDataMap(datamap) ;
 			
 			SimpleTrigger simpleTrigger = new SimpleTrigger(DataFilerJob.JOB_GROUP, DataFilerJob.JOB_NAME);
@@ -79,45 +96,7 @@
 			logger.error("", e);
 		}
 	}
-
-	public String getName() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	public int getState() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-	public String getStateString() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	public void jbossInternalLifecycle(String arg0) throws Exception {
-		// TODO Auto-generated method stub
-		
-	}
-
-	public void create() throws Exception {
-		// TODO Auto-generated method stub
-		
-	}
-
-	public void destroy() {
-		// TODO Auto-generated method stub
-		
-	}
-
-	public void start() throws Exception {
-		// TODO Auto-generated method stub
-		
-	}
-
-	public void stop() {
-		// TODO Auto-generated method stub
-		
-	}
 	
+	
+	
 }

Modified: labs/jbossesb/workspace/chharris/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/StatisticsHelper.java
===================================================================
--- labs/jbossesb/workspace/chharris/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/StatisticsHelper.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/StatisticsHelper.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -212,7 +212,7 @@
 	 */
 	public static List getObjectNamesForServer(Session sess, String servername) {
 		String query = "SELECT DISTINCT jmxa.objectname "
-			+ "FROM JMXAttribute jmxa, JMXData jmxd "
+			+ "FROM JMXATTRIBUTE jmxa, JMXDATA jmxd "
 			+ "WHERE jmxa.statid = jmxd.statid "
 			+ "AND jmxd.server = :servername";
 		SQLQuery sqlq = sess.createSQLQuery(query);
@@ -230,13 +230,13 @@
 	 */
 	public static List getAttributes(Session sess, String servername, String objectname) {
 		String query = "SELECT DISTINCT jmxa.* "
-			+ "FROM JMXAttribute jmxa, JMXData jmxd "
+			+ "FROM JMXATTRIBUTE jmxa, JMXDATA jmxd "
 			+ "WHERE jmxa.statid = jmxd.statid "
 			+ "AND jmxd.server = :servername "
 			+ "AND jmxa.objectname = :objectname";
 		SQLQuery sqlq = sess.createSQLQuery(query);
 		sqlq.setString("objectname", objectname);
-		sqlq.addEntity(JMXAttribute.class);
+		sqlq.addEntity("JMXATTRIBUTE", JMXAttribute.class);
 		sqlq.setString("servername", servername);
 		List result = sqlq.list();
 		return result;
@@ -252,7 +252,7 @@
 	 */
 	public static List getData(Session sess, String servername, Integer attributeId,
 			Integer timerange) {
-		String query = "SELECT data.* from JMXData data "
+		String query = "SELECT data.* from JMXDATA data "
 			+ "WHERE data.statid = :attributeid "
 			+ "AND data.server = :servername ";
 		if (timerange.intValue() != -1) {

Modified: labs/jbossesb/workspace/chharris/product/tools/console/management-esb/src/main/resources/mysql/create_database.sql
===================================================================
--- labs/jbossesb/workspace/chharris/product/tools/console/management-esb/src/main/resources/mysql/create_database.sql	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/tools/console/management-esb/src/main/resources/mysql/create_database.sql	2008-02-28 16:09:28 UTC (rev 18617)
@@ -13,7 +13,7 @@
         STATDATE datetime,
         timevalue float,
         countvalue integer,
-        textvalue varchar(255),
+        textvalue text,
         primary key (id)
     );
 
@@ -53,4 +53,4 @@
 		add index FKD2EA449F4522DA9F(OPID),
 		add constraint FKD2EA449F4522DA9F 
 		foreign key (OPID)
-		references JMXOPERATION(opid);
\ No newline at end of file
+		references JMXOPERATION(opid);

Copied: labs/jbossesb/workspace/chharris/product/tools/console/management-web/src/main/webapp/WEB-INF (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/tools/console/management-web/src/main/webapp/WEB-INF)

Deleted: labs/jbossesb/workspace/chharris/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
-
-<jboss-web>
-   <depends>jboss.esb:service=ManagementDatabaseInitializer</depends>
-</jboss-web>

Copied: labs/jbossesb/workspace/chharris/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+   <depends>jboss.esb:service=ManagementDatabaseInitializer</depends>
+</jboss-web>

Modified: labs/jbossesb/workspace/chharris/product/tools/console/management-web/src/main/webapp/attribute.jsp
===================================================================
--- labs/jbossesb/workspace/chharris/product/tools/console/management-web/src/main/webapp/attribute.jsp	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/product/tools/console/management-web/src/main/webapp/attribute.jsp	2008-02-28 16:09:28 UTC (rev 18617)
@@ -40,7 +40,7 @@
 	<table cellpadding="5">
       <tr>
       	<td><a href="/jbossesb/operations.jsp">Management</a></td>
-      	<td><a href="/jbossesb">Back to Console index</a></td>
+      	<td><a href="/jbossesb/index.jsp">Back to Console index</a></td>
    </table>
 <hr>
 <%

Modified: labs/jbossesb/workspace/chharris/qa/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/qa/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/qa/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -10,15 +10,19 @@
 
 	<property name="product.dir" location="../product"/>
 	<property name="build.location" location="build"/>
+        <property file="test.properties" />
 
 	<import file="${product.dir}/esb-config.xml"/>
 
 	<property name="org.jboss.esb.properties" location="${product.dir}/product.properties"/>
 	<property file="${org.jboss.esb.properties}"/>
-	
-	<property file="test.properties" />
+
 	<property name="org.jboss.esb.test.quickstarts.dir" location="${product.dir}/build/jbossesb/samples/quickstarts"/>
 
+        <propertyset id="soa.props">
+                <propertyref  regex="soa.test.*"/>
+        </propertyset>
+
 	<property name="junit.jar" location="lib/ext/junit-4.1.jar"/>
 	<macrodef name="runant">
 		<attribute name="target"/>
@@ -29,9 +33,10 @@
 			    classpath="${ant.library.dir}/ant-launcher.jar"
 			    fork="true" failonerror="@{failonerror}"
 				resultproperty="@{resultproperty}">
+				<syspropertyset refid="soa.props"/>
 				<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}"/>
 				<arg value="-cp"/>
 				<arg value="${junit.jar}"/>
 				<arg value="-f"/>
@@ -42,8 +47,29 @@
 	</macrodef>
 
 	<target name="test" description="Run all QA tests." depends="test.junit"/>
+
+	<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"/>
+		<antcall target="start-server">
+			<param name="no-prepare" value="true"/>
+			<param name="org.jboss.esb.server.config" value="all"/>	
+		</antcall>
+                <runant target="ci-test.junit"
+                        failonerror="false" resultproperty="integration.qa.resultproperty"/>
+
+                <antcall target="stop-server"/>
+
+                <condition property="integration.qa.tests.failed">
+                        <not>
+                                <equals arg1="0" arg2="${integration.qa.resultproperty}"/>
+                        </not>
+                </condition>
+                <fail if="integration.qa.tests.failed" message="QA Unit Test failure"/>
+	</target>
 	
 	<target name="ci-test" description="Run all QA tests.">
+	    <property name="server.timeout.seconds" value="120"/>
 	    <antcall target="start-server"/>
 		<runant target="ci-test.junit"
 			failonerror="false" resultproperty="integration.qa.resultproperty"/>
@@ -76,16 +102,17 @@
 		
 		<delete dir="${build.location}" />
 	</target>
-	
+
 	<target name="start-server" depends="esb.setup-esb">
 		<echo>server ${org.jboss.esb.server.home} ${org.jboss.esb.test.server.config}</echo>
+		<property name="server.timeout.seconds" value="120"/>
 		<start-server serverHome="${org.jboss.esb.server.home}"
 			serverConfig="${org.jboss.esb.test.server.config}">
 			<sysproperty key="build.dir" value="${build.location}"/>
 			<jvmarg value="-Xmx512m"/>
 			<jvmarg value="-Xms512m"/>
 		</start-server>
-		<wait-on-server/>
+		<wait-on-server seconds="${server.timeout.seconds}"/>
 	</target>
 	
 	<target name="stop-server" depends="esb.init">

Modified: labs/jbossesb/workspace/chharris/qa/junit/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/qa/junit/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/qa/junit/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -27,6 +27,7 @@
                excludes="*.jar" includes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
       <fileset dir="${qa.lib}/ext" includes="*.jar"/>
       <fileset dir="${product.lib}/ext" includes="*.jar"/>
+      <fileset dir="${product.lib}/jbpm.esb" includes="*.jar"/>
       <pathelement location="../"/>
    </path>
 
@@ -136,6 +137,17 @@
             <include name="META-INF/*.xml"/>
          </fileset>
       </jar>
+      <jar jarfile="${qa.build.lib}/jbpm-async-test.esb">
+         <fileset dir="${qa.junit.classes}">
+            <include name="org/jboss/soa/esb/server/jbpmAsync/*.class"/>
+         </fileset>
+         <fileset dir="${qa.junit.resources}/server/jbpmAsync">
+            <include name="esb-${org.jboss.soa.esb.qa.jmsprovider}-service.xml"/>
+            <include name="test-jbpm-service.xml"/>
+            <include name="jbpmAsyncTest.xml"/>
+            <include name="META-INF/*.xml"/>
+         </fileset>
+      </jar>
    </target>
 
    <target name="one-test" if="test" depends="jars"

Copied: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync)

Copied: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync/META-INF)

Deleted: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/deployment.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync/META-INF/deployment.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/deployment.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,4 +0,0 @@
-<jbossesb-deployment>
-  <depends>jboss.esb.qa.junit.destination:service=Queue,name=jbpm_channel</depends>
-  <depends>jboss.esb:test=JbpmServer</depends>
-</jbossesb-deployment>

Copied: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/deployment.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync/META-INF/deployment.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/deployment.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/deployment.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,4 @@
+<jbossesb-deployment>
+  <depends>jboss.esb.qa.junit.destination:service=Queue,name=jbpm_channel</depends>
+  <depends>jboss.esb:test=JbpmServer</depends>
+</jbossesb-deployment>

Deleted: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/jboss-esb.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync/META-INF/jboss-esb.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/jboss-esb.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,21 +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">
-  <providers>
-    <jms-jca-provider name="JBossMQ" connection-factory="ConnectionFactory">
-      <jms-bus busid="jbpm_channel">
-        <jms-message-filter dest-type="QUEUE" dest-name="queue/jbpm_channel"/>
-      </jms-bus>
-    </jms-jca-provider>
-  </providers>
-
-  <services>
-    <service category="TestJBPMAsyncESB" name="Echo" description="Echo service">
-      <listeners>
-        <jms-listener name="JBPM-ESBListener" busidref="jbpm_channel" maxThreads="1"/>
-      </listeners>
-      <actions>
-        <action name="echoAction" class="org.jboss.soa.esb.server.jbpmAsync.EchoSuspendAction"/>
-      </actions>
-    </service>
-  </services>
-</jbossesb>

Copied: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/jboss-esb.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync/META-INF/jboss-esb.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/jboss-esb.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/META-INF/jboss-esb.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,21 @@
+<?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">
+  <providers>
+    <jms-jca-provider name="JBossMQ" connection-factory="ConnectionFactory">
+      <jms-bus busid="jbpm_channel">
+        <jms-message-filter dest-type="QUEUE" dest-name="queue/jbpm_channel"/>
+      </jms-bus>
+    </jms-jca-provider>
+  </providers>
+
+  <services>
+    <service category="TestJBPMAsyncESB" name="Echo" description="Echo service">
+      <listeners>
+        <jms-listener name="JBPM-ESBListener" busidref="jbpm_channel" maxThreads="1"/>
+      </listeners>
+      <actions>
+        <action name="echoAction" class="org.jboss.soa.esb.server.jbpmAsync.EchoSuspendAction"/>
+      </actions>
+    </service>
+  </services>
+</jbossesb>

Deleted: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbm-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync/esb-jbm-service.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbm-service.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-   <mbean code="org.jboss.jms.server.destination.QueueService"
-      name="jboss.esb.qa.junit.destination:service=Queue,name=jbpm_channel"
-      xmbean-dd="xmdesc/Queue-xmbean.xml">
-      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-      <depends>jboss.messaging:service=PostOffice</depends>
-   </mbean>
-</server>

Copied: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbm-service.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync/esb-jbm-service.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbm-service.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbm-service.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+   <mbean code="org.jboss.jms.server.destination.QueueService"
+      name="jboss.esb.qa.junit.destination:service=Queue,name=jbpm_channel"
+      xmbean-dd="xmdesc/Queue-xmbean.xml">
+      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+      <depends>jboss.messaging:service=PostOffice</depends>
+   </mbean>
+</server>

Deleted: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbmq-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync/esb-jbmq-service.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbmq-service.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.esb.qa.junit.destination:service=Queue,name=jbpm_channel">
-    <depends optional-attribute-name="DestinationManager">
-      jboss.mq:service=DestinationManager
-    </depends>
-  </mbean>
-</server>

Copied: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbmq-service.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync/esb-jbmq-service.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbmq-service.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/esb-jbmq-service.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+    name="jboss.esb.qa.junit.destination:service=Queue,name=jbpm_channel">
+    <depends optional-attribute-name="DestinationManager">
+      jboss.mq:service=DestinationManager
+    </depends>
+  </mbean>
+</server>

Deleted: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/jbpmAsyncTest.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync/jbpmAsyncTest.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/jbpmAsyncTest.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-  
-<process-definition name="jBPMAsyncTest">
-   <start-state name="start">
-      <transition to="node1"/>
-   </start-state>
-
-   <node name="node1">
-      <action name="sendToESB" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
-         <esbCategoryName>TestJBPMAsyncESB</esbCategoryName>
-         <esbServiceName>Echo</esbServiceName>
-      </action>
-      <transition to="node2"/>
-   </node>
-   
-   <node name="node2">
-      <action name="waitForNotification" class="org.jboss.soa.esb.server.jbpmAsync.JbpmAsyncActionHandler"/>
-      <transition to="end"/>
-   </node>
-   
-   <end-state name="end"/>
-</process-definition>

Copied: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/jbpmAsyncTest.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync/jbpmAsyncTest.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/jbpmAsyncTest.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/jbpmAsyncTest.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  
+<process-definition name="jBPMAsyncTest">
+   <start-state name="start">
+      <transition to="node1"/>
+   </start-state>
+
+   <node name="node1">
+      <action name="sendToESB" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
+         <esbCategoryName>TestJBPMAsyncESB</esbCategoryName>
+         <esbServiceName>Echo</esbServiceName>
+      </action>
+      <transition to="node2"/>
+   </node>
+   
+   <node name="node2">
+      <action name="waitForNotification" class="org.jboss.soa.esb.server.jbpmAsync.JbpmAsyncActionHandler"/>
+      <transition to="end"/>
+   </node>
+   
+   <end-state name="end"/>
+</process-definition>

Deleted: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/test-jbpm-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync/test-jbpm-service.xml	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/test-jbpm-service.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
-   <mbean name="jboss.esb:test=JbpmServer" code="org.jboss.soa.esb.server.jbpmAsync.JbpmServer"/>
-</server>

Copied: labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/test-jbpm-service.xml (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/resources/server/jbpmAsync/test-jbpm-service.xml)
===================================================================
--- labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/test-jbpm-service.xml	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/qa/junit/resources/server/jbpmAsync/test-jbpm-service.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+   <mbean name="jboss.esb:test=JbpmServer" code="org.jboss.soa.esb.server.jbpmAsync.JbpmServer"/>
+</server>

Copied: labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync)

Deleted: labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/EchoSuspendAction.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/EchoSuspendAction.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/EchoSuspendAction.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,71 +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.server.jbpmAsync;
-
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-
-import org.jboss.mx.util.MBeanProxyExt;
-import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.soa.esb.actions.AbstractActionLifecycle;
-import org.jboss.soa.esb.actions.ActionPipelineProcessor;
-import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * Action class to attempt a suspend of a running jBPM process.
- * 
- * @author <a href='mailto:Kevin.Conner at jboss.com'>Kevin Conner</a>
- */
-public class EchoSuspendAction extends AbstractActionLifecycle implements ActionPipelineProcessor
-{
-    public EchoSuspendAction(final ConfigTree config)
-    {
-    }
-
-    public Message process(final Message message)
-        throws ActionProcessingException
-    {
-        final MBeanServer server = MBeanServerLocator.locateJBoss();
-        
-        final JbpmServerMBean jbpmServer ;
-        try
-        {
-            jbpmServer = (JbpmServerMBean) MBeanProxyExt.create(JbpmServerMBean.class, JbpmServerMBean.OBJECT_NAME, server);
-        }
-        catch (final MalformedObjectNameException mone)
-        {
-            throw new ActionProcessingException("Error creating MBean proxy", mone) ;
-        }
-        jbpmServer.suspendProcessInstance() ;
-        return message;
-    }
-    
-    public void processException(final Message message, final Throwable th)
-    {
-    }
-    
-    public void processSuccess(final Message message)
-    {
-    }
-}

Copied: labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/EchoSuspendAction.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/EchoSuspendAction.java)
===================================================================
--- labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/EchoSuspendAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/EchoSuspendAction.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,71 @@
+/*
+* 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.server.jbpmAsync;
+
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+
+import org.jboss.mx.util.MBeanProxyExt;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.actions.ActionPipelineProcessor;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * Action class to attempt a suspend of a running jBPM process.
+ * 
+ * @author <a href='mailto:Kevin.Conner at jboss.com'>Kevin Conner</a>
+ */
+public class EchoSuspendAction extends AbstractActionLifecycle implements ActionPipelineProcessor
+{
+    public EchoSuspendAction(final ConfigTree config)
+    {
+    }
+
+    public Message process(final Message message)
+        throws ActionProcessingException
+    {
+        final MBeanServer server = MBeanServerLocator.locateJBoss();
+        
+        final JbpmServerMBean jbpmServer ;
+        try
+        {
+            jbpmServer = (JbpmServerMBean) MBeanProxyExt.create(JbpmServerMBean.class, JbpmServerMBean.OBJECT_NAME, server);
+        }
+        catch (final MalformedObjectNameException mone)
+        {
+            throw new ActionProcessingException("Error creating MBean proxy", mone) ;
+        }
+        jbpmServer.suspendProcessInstance() ;
+        return message;
+    }
+    
+    public void processException(final Message message, final Throwable th)
+    {
+    }
+    
+    public void processSuccess(final Message message)
+    {
+    }
+}

Deleted: labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncActionHandler.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncActionHandler.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncActionHandler.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,131 +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.server.jbpmAsync;
-
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.jbpm.graph.def.ActionHandler;
-import org.jbpm.graph.exe.ExecutionContext;
-
-/**
- * Action Handler for jBPM Async test.
- */
-public class JbpmAsyncActionHandler implements ActionHandler
-{
-    /**
-     * Serial version UID for this class.
-     */
-    private static final long serialVersionUID = 6205275164157280372L;
-
-    /**
-     * The notification lock.
-     */
-    private static final Lock NOTIFICATION_LOCK = new ReentrantLock() ;
-    
-    /**
-     * The notification condition.
-     */
-    private static Condition NOTIFICATION_CONDITION = NOTIFICATION_LOCK.newCondition() ;
-    
-    /**
-     * The waiting flag.
-     */
-    private static boolean waiting ;
-    /**
-     * The notified flag.
-     */
-    private static boolean notified ;
-    
-    /**
-     * Wait for a notification from the test.
-     */
-    public void execute(final ExecutionContext executionContext)
-        throws Exception
-    {
-        if (!waitForNotification(60000L))
-        {
-            throw new Exception("Notification failed") ;
-        }
-    }
-    
-    /**
-     * Notify the action.
-     * @param delay The maximum delay waiting for the action.
-     * @return true if waiting, false otherwise.
-     */
-    public static boolean notifyAction(final long delay)
-    {
-        NOTIFICATION_LOCK.lock() ;
-        try
-        {
-            if (!waiting)
-            {
-                try
-                {
-                    NOTIFICATION_CONDITION.await(delay, TimeUnit.MILLISECONDS) ;
-                }
-                catch (final InterruptedException ie) {}
-            }
-            
-            if (waiting)
-            {
-                notified = true ;
-                NOTIFICATION_CONDITION.signal() ;
-            }
-            return waiting ;
-        }
-        finally
-        {
-            NOTIFICATION_LOCK.unlock() ;
-        }
-    }
-    
-    /**
-     * Wait for a notification from the test.
-     * @param delay The maximum delay waiting for notification.
-     * @return true if notified, false otherwise.
-     */
-    private static boolean waitForNotification(final long delay)
-    {
-        NOTIFICATION_LOCK.lock() ;
-        waiting = true ;
-        try
-        {
-            NOTIFICATION_CONDITION.signal() ;
-            try
-            {
-                NOTIFICATION_CONDITION.await(delay, TimeUnit.MILLISECONDS) ;
-            }
-            catch (final InterruptedException ie) {}
-            return notified ;
-        }
-        finally
-        {
-            waiting = false ;
-            notified = false ;
-            NOTIFICATION_LOCK.unlock() ;
-        }
-    }
-}

Copied: labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncActionHandler.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncActionHandler.java)
===================================================================
--- labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncActionHandler.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncActionHandler.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,131 @@
+/*
+ * 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.server.jbpmAsync;
+
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.jbpm.graph.def.ActionHandler;
+import org.jbpm.graph.exe.ExecutionContext;
+
+/**
+ * Action Handler for jBPM Async test.
+ */
+public class JbpmAsyncActionHandler implements ActionHandler
+{
+    /**
+     * Serial version UID for this class.
+     */
+    private static final long serialVersionUID = 6205275164157280372L;
+
+    /**
+     * The notification lock.
+     */
+    private static final Lock NOTIFICATION_LOCK = new ReentrantLock() ;
+    
+    /**
+     * The notification condition.
+     */
+    private static Condition NOTIFICATION_CONDITION = NOTIFICATION_LOCK.newCondition() ;
+    
+    /**
+     * The waiting flag.
+     */
+    private static boolean waiting ;
+    /**
+     * The notified flag.
+     */
+    private static boolean notified ;
+    
+    /**
+     * Wait for a notification from the test.
+     */
+    public void execute(final ExecutionContext executionContext)
+        throws Exception
+    {
+        if (!waitForNotification(60000L))
+        {
+            throw new Exception("Notification failed") ;
+        }
+    }
+    
+    /**
+     * Notify the action.
+     * @param delay The maximum delay waiting for the action.
+     * @return true if waiting, false otherwise.
+     */
+    public static boolean notifyAction(final long delay)
+    {
+        NOTIFICATION_LOCK.lock() ;
+        try
+        {
+            if (!waiting)
+            {
+                try
+                {
+                    NOTIFICATION_CONDITION.await(delay, TimeUnit.MILLISECONDS) ;
+                }
+                catch (final InterruptedException ie) {}
+            }
+            
+            if (waiting)
+            {
+                notified = true ;
+                NOTIFICATION_CONDITION.signal() ;
+            }
+            return waiting ;
+        }
+        finally
+        {
+            NOTIFICATION_LOCK.unlock() ;
+        }
+    }
+    
+    /**
+     * Wait for a notification from the test.
+     * @param delay The maximum delay waiting for notification.
+     * @return true if notified, false otherwise.
+     */
+    private static boolean waitForNotification(final long delay)
+    {
+        NOTIFICATION_LOCK.lock() ;
+        waiting = true ;
+        try
+        {
+            NOTIFICATION_CONDITION.signal() ;
+            try
+            {
+                NOTIFICATION_CONDITION.await(delay, TimeUnit.MILLISECONDS) ;
+            }
+            catch (final InterruptedException ie) {}
+            return notified ;
+        }
+        finally
+        {
+            waiting = false ;
+            notified = false ;
+            NOTIFICATION_LOCK.unlock() ;
+        }
+    }
+}

Deleted: labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncUnitTest.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncUnitTest.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncUnitTest.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,104 +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.server.jbpmAsync;
-
-import javax.management.ObjectName;
-
-import junit.framework.Test;
-
-import org.jboss.test.JBossTestCase;
-
-/**
- * Test asynchronous callbacks for jBPM processes.
- * 
- * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
- */
-public class JbpmAsyncUnitTest extends JBossTestCase
-{
-    /**
-     * The name of the deployment archive.
-     */
-    private static final String ESB_ARCHIVE = "jbpm-async-test.esb" ;
-    
-    /**
-     * Construct the test case with the specified name.
-     * @param name The name of the test case.
-     */
-    public JbpmAsyncUnitTest(final String name)
-    {
-        super(name) ;
-    }
-    
-    /**
-     * Test for normal asynchronous callback.
-     * @throws Exception For any failures.
-     */
-    public void testAsyncCallback()
-        throws Exception
-    {
-        execute("setSuspendProcess", new Object[] {Boolean.FALSE}, new String[] {Boolean.TYPE.getName()}) ;
-        execute("startProcess", null, null) ;
-        
-        final Boolean result = (Boolean)execute("checkWaitingAction", new Object[] {new Long(10000L)}, new String[] {Long.TYPE.getName()}) ;
-        assertEquals("checkWaitingAction", Boolean.TRUE, result) ;
-    }
-    /**
-     * Test for asynchronous callback on a suspended process.
-     * @throws Exception For any failures.
-     */
-    public void testSuspendedAsyncCallback()
-        throws Exception
-    {
-        execute("setSuspendProcess", new Object[] {Boolean.TRUE}, new String[] {Boolean.TYPE.getName()}) ;
-        execute("startProcess", null, null) ;
-        
-        final Boolean suspendedResult = (Boolean)execute("checkWaitingAction", new Object[] {new Long(10000L)}, new String[] {Long.TYPE.getName()}) ;
-        assertEquals("checkWaitingAction", Boolean.FALSE, suspendedResult) ;
-        
-        execute("resumeProcessInstance", null, null) ;
-        
-        final Boolean resumedResult = (Boolean)execute("checkWaitingAction", new Object[] {new Long(30000L)}, new String[] {Long.TYPE.getName()}) ;
-        assertEquals("checkWaitingAction", Boolean.TRUE, resumedResult) ;
-    }
-    
-    /**
-     * Execute the specified method on the mbean.
-     * @param method The method name.
-     * @param values The parmeter values.
-     * @param types The parameter types.
-     * @return The method return value.
-     * @throws Exception For errors during invocation.
-     */
-    private Object execute(final String method, final Object[] values, final String[] types)
-        throws Exception
-    {
-        return getServer().invoke(new ObjectName(JbpmServerMBean.OBJECT_NAME), method, values, types) ;
-    }
-    
-    /**
-     * Create the test suite.
-     * @return The suite representing this test case.
-     */
-    public static Test suite()
-        throws Exception
-    {
-        return getDeploySetup(JbpmAsyncUnitTest.class, ESB_ARCHIVE);
-    }
-}

Copied: labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncUnitTest.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncUnitTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmAsyncUnitTest.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,104 @@
+/*
+ * 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.server.jbpmAsync;
+
+import javax.management.ObjectName;
+
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
+/**
+ * Test asynchronous callbacks for jBPM processes.
+ * 
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class JbpmAsyncUnitTest extends JBossTestCase
+{
+    /**
+     * The name of the deployment archive.
+     */
+    private static final String ESB_ARCHIVE = "jbpm-async-test.esb" ;
+    
+    /**
+     * Construct the test case with the specified name.
+     * @param name The name of the test case.
+     */
+    public JbpmAsyncUnitTest(final String name)
+    {
+        super(name) ;
+    }
+    
+    /**
+     * Test for normal asynchronous callback.
+     * @throws Exception For any failures.
+     */
+    public void testAsyncCallback()
+        throws Exception
+    {
+        execute("setSuspendProcess", new Object[] {Boolean.FALSE}, new String[] {Boolean.TYPE.getName()}) ;
+        execute("startProcess", null, null) ;
+        
+        final Boolean result = (Boolean)execute("checkWaitingAction", new Object[] {new Long(10000L)}, new String[] {Long.TYPE.getName()}) ;
+        assertEquals("checkWaitingAction", Boolean.TRUE, result) ;
+    }
+    /**
+     * Test for asynchronous callback on a suspended process.
+     * @throws Exception For any failures.
+     */
+    public void testSuspendedAsyncCallback()
+        throws Exception
+    {
+        execute("setSuspendProcess", new Object[] {Boolean.TRUE}, new String[] {Boolean.TYPE.getName()}) ;
+        execute("startProcess", null, null) ;
+        
+        final Boolean suspendedResult = (Boolean)execute("checkWaitingAction", new Object[] {new Long(10000L)}, new String[] {Long.TYPE.getName()}) ;
+        assertEquals("checkWaitingAction", Boolean.FALSE, suspendedResult) ;
+        
+        execute("resumeProcessInstance", null, null) ;
+        
+        final Boolean resumedResult = (Boolean)execute("checkWaitingAction", new Object[] {new Long(30000L)}, new String[] {Long.TYPE.getName()}) ;
+        assertEquals("checkWaitingAction", Boolean.TRUE, resumedResult) ;
+    }
+    
+    /**
+     * Execute the specified method on the mbean.
+     * @param method The method name.
+     * @param values The parmeter values.
+     * @param types The parameter types.
+     * @return The method return value.
+     * @throws Exception For errors during invocation.
+     */
+    private Object execute(final String method, final Object[] values, final String[] types)
+        throws Exception
+    {
+        return getServer().invoke(new ObjectName(JbpmServerMBean.OBJECT_NAME), method, values, types) ;
+    }
+    
+    /**
+     * Create the test suite.
+     * @return The suite representing this test case.
+     */
+    public static Test suite()
+        throws Exception
+    {
+        return getDeploySetup(JbpmAsyncUnitTest.class, ESB_ARCHIVE);
+    }
+}

Deleted: labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServer.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServer.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServer.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,100 +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.server.jbpmAsync;
-
-import java.io.InputStream;
-
-import org.jboss.soa.esb.util.ClassUtil;
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.graph.def.ProcessDefinition;
-import org.jbpm.graph.exe.ProcessInstance;
-
-/**
- * MBean to manage jBPM Asynchronous callback tests.
- * 
- * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
- */
-public class JbpmServer implements JbpmServerMBean
-{
-    private static final String PROCESS_DEFINITION = "/jbpmAsyncTest.xml" ;
-    
-    private boolean suspendProcess ;
-    
-    private long processInstanceId ;
-    
-    public synchronized void startProcess()
-    {
-        final JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance() ;
-        final JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext() ;
-        
-        // Create process definition
-        final InputStream is = ClassUtil.getResourceAsStream(PROCESS_DEFINITION, getClass()) ;
-        final ProcessDefinition processDefinition = ProcessDefinition.parseXmlInputStream(is) ;
-        jbpmContext.deployProcessDefinition(processDefinition) ;
-        
-        // Create process instance
-        final ProcessInstance processInstance = jbpmContext.newProcessInstance(processDefinition.getName()) ;
-        processInstanceId = processInstance.getId() ;
-        
-        // Start process instance
-        processInstance.signal() ;
-        
-        jbpmContext.close() ;
-    }
-    
-    public synchronized void suspendProcessInstance()
-    {
-        if (suspendProcess)
-        {
-            final JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance() ;
-            final JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext() ;
-            
-            final ProcessInstance processInstance = jbpmContext.loadProcessInstance(processInstanceId) ;
-            processInstance.suspend() ;
-            
-            jbpmContext.close() ;
-        }
-    }
-    
-    public synchronized void resumeProcessInstance()
-    {
-        if (suspendProcess)
-        {
-            final JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance() ;
-            final JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext() ;
-            
-            final ProcessInstance processInstance = jbpmContext.loadProcessInstance(processInstanceId) ;
-            processInstance.resume() ;
-            
-            jbpmContext.close() ;
-        }
-    }
-    
-    public synchronized void setSuspendProcess(final boolean suspendProcess)
-    {
-        this.suspendProcess = suspendProcess ;
-    }
-    
-    public boolean checkWaitingAction(final long delay)
-    {
-        return JbpmAsyncActionHandler.notifyAction(delay) ;
-    }
-}

Copied: labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServer.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServer.java)
===================================================================
--- labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServer.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServer.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,100 @@
+/*
+ * 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.server.jbpmAsync;
+
+import java.io.InputStream;
+
+import org.jboss.soa.esb.util.ClassUtil;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * MBean to manage jBPM Asynchronous callback tests.
+ * 
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class JbpmServer implements JbpmServerMBean
+{
+    private static final String PROCESS_DEFINITION = "/jbpmAsyncTest.xml" ;
+    
+    private boolean suspendProcess ;
+    
+    private long processInstanceId ;
+    
+    public synchronized void startProcess()
+    {
+        final JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance() ;
+        final JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext() ;
+        
+        // Create process definition
+        final InputStream is = ClassUtil.getResourceAsStream(PROCESS_DEFINITION, getClass()) ;
+        final ProcessDefinition processDefinition = ProcessDefinition.parseXmlInputStream(is) ;
+        jbpmContext.deployProcessDefinition(processDefinition) ;
+        
+        // Create process instance
+        final ProcessInstance processInstance = jbpmContext.newProcessInstance(processDefinition.getName()) ;
+        processInstanceId = processInstance.getId() ;
+        
+        // Start process instance
+        processInstance.signal() ;
+        
+        jbpmContext.close() ;
+    }
+    
+    public synchronized void suspendProcessInstance()
+    {
+        if (suspendProcess)
+        {
+            final JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance() ;
+            final JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext() ;
+            
+            final ProcessInstance processInstance = jbpmContext.loadProcessInstance(processInstanceId) ;
+            processInstance.suspend() ;
+            
+            jbpmContext.close() ;
+        }
+    }
+    
+    public synchronized void resumeProcessInstance()
+    {
+        if (suspendProcess)
+        {
+            final JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance() ;
+            final JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext() ;
+            
+            final ProcessInstance processInstance = jbpmContext.loadProcessInstance(processInstanceId) ;
+            processInstance.resume() ;
+            
+            jbpmContext.close() ;
+        }
+    }
+    
+    public synchronized void setSuspendProcess(final boolean suspendProcess)
+    {
+        this.suspendProcess = suspendProcess ;
+    }
+    
+    public boolean checkWaitingAction(final long delay)
+    {
+        return JbpmAsyncActionHandler.notifyAction(delay) ;
+    }
+}

Deleted: labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServerMBean.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServerMBean.java	2008-02-28 13:55:06 UTC (rev 18612)
+++ labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServerMBean.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -1,40 +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.server.jbpmAsync;
-
-/**
- * MBean to manage jBPM Asynchronous callback tests.
- * 
- * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
- */
-public interface JbpmServerMBean
-{
-    public static final String OBJECT_NAME="jboss.esb:test=JbpmServer" ;
-    
-    public void startProcess() ;
-    
-    public void suspendProcessInstance() ;
-    
-    public void resumeProcessInstance() ;
-    
-    public void setSuspendProcess(final boolean suspend) ;
-    
-    public boolean checkWaitingAction(final long delay) ;
-}

Copied: labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServerMBean.java (from rev 18612, labs/jbossesb/tags/JBESB_4_2_1_SOA_4_2_GA/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServerMBean.java)
===================================================================
--- labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServerMBean.java	                        (rev 0)
+++ labs/jbossesb/workspace/chharris/qa/junit/src/org/jboss/soa/esb/server/jbpmAsync/JbpmServerMBean.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -0,0 +1,40 @@
+/*
+ * 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.server.jbpmAsync;
+
+/**
+ * MBean to manage jBPM Asynchronous callback tests.
+ * 
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public interface JbpmServerMBean
+{
+    public static final String OBJECT_NAME="jboss.esb:test=JbpmServer" ;
+    
+    public void startProcess() ;
+    
+    public void suspendProcessInstance() ;
+    
+    public void resumeProcessInstance() ;
+    
+    public void setSuspendProcess(final boolean suspend) ;
+    
+    public boolean checkWaitingAction(final long delay) ;
+}

Modified: labs/jbossesb/workspace/chharris/qa/quickstarts/build.xml
===================================================================
--- labs/jbossesb/workspace/chharris/qa/quickstarts/build.xml	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/qa/quickstarts/build.xml	2008-02-28 16:09:28 UTC (rev 18617)
@@ -58,6 +58,9 @@
       <fileset dir="${product.dir}/services/jbossesb/build">
     	 <include name="**/*.jar"/> 
       </fileset>
+      <fileset dir="${product.dir}/services/jbpm/lib/ext">
+	 <include name="jbpm-ant.jar"/>
+      </fileset>
       <!-- include qs specific jars -->
       <fileset dir="${org.jboss.esb.test.quickstarts.dir}">
          <include name="bpm_orchestration1/lib/**/*.jar"/>
@@ -182,7 +185,6 @@
 
       <!-- Build the tests... -->
       <mkdir dir="${qa.quickstarts.classes}"/>
-
       <javac srcdir="${qa.quickstarts.src}" destdir="${qa.quickstarts.classes}" classpathref="qa.quickstarts.cp" debug="on"/>
       <jar jarfile="${qa.quickstarts.build.lib}/QuickstartMessageStoreServer.sar">
          <fileset dir="${qa.quickstarts.classes}">
@@ -370,7 +372,7 @@
 	       <exclude name="**/SpringJPetStoreTest.java"/>
                <exclude name="**/HelloWorldSQLActionTest.java"/>
 	       <exclude name="**/BPMOrchestration1Test.java"/>
-	       <!-- The following quickstart is broken -->
+	       <!-- The following quickstart is broken -->
 	       <exclude name="**/BPMOrchestration3Test.java"/>
 	       <exclude name="**/HelloWorldFileNotifierTest.java"/>
                <exclude name="**/RecipientlistTest.java"/>

Modified: labs/jbossesb/workspace/chharris/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BPMOrchestration2Test.java
===================================================================
--- labs/jbossesb/workspace/chharris/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BPMOrchestration2Test.java	2008-02-28 15:58:33 UTC (rev 18616)
+++ labs/jbossesb/workspace/chharris/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BPMOrchestration2Test.java	2008-02-28 16:09:28 UTC (rev 18617)
@@ -20,11 +20,17 @@
  */
 package org.jboss.soa.esb.quickstart.test;
 
+import java.io.File;
+import java.util.ArrayList;
+
 import junit.framework.Test;
 
 import org.jboss.soa.esb.samples.quickstarts.bpm_orchestration2.test.SendJMSMessageDeploy;
 import org.jboss.soa.esb.samples.quickstarts.bpm_orchestration2.test.SendJMSMessageStart;
 
+import org.jbpm.ant.DeployProcessToServerTask;
+import org.jbpm.ant.ProcessDeployer;
+
 /**
  * CI test for the bpmorchestration2 test.
  * 
@@ -45,9 +51,7 @@
 	}
 
 	public void testMessage() throws Exception {
-	    clearMessages() ;
 	    sendDeployMessage() ;
-	    checkMessages(30000, DEPLOY_DEF_MESSAGE, "Success:" + DEPLOY_DEF_MESSAGE) ;
 	    
 	    clearMessages() ;
 	    sendStartMessage() ;
@@ -62,13 +66,18 @@
 	}
 
 	public void sendDeployMessage() throws Exception {
-		SendJMSMessageDeploy sd = new SendJMSMessageDeploy();
-		sd.setupConnection();
-		sd.sendAMessage(DEPLOY_DEF_MESSAGE);
-		sd.stop();
+		ProcessDeployer pd = new ProcessDeployer();
+		ArrayList<File> files = new ArrayList<File>();
+		String processDef = Helpers.getQuickstartLocation("bpm_orchestration2/processDefinition");
+		File processDefDir = new File(processDef);
+		File[] processFiles = processDefDir.listFiles();
+		for (int i= 0; i< processFiles.length; i++) {
+			files.add(processFiles[i]);
+		}
+		pd.execute("localhost", "8080", "/jbpm-console/upload", files);
 	}
 	
-        public void sendStartMessage() throws Exception {
+	public void sendStartMessage() throws Exception {
 		SendJMSMessageStart sm = new SendJMSMessageStart();
 		sm.setupConnection();
 		sm.sendAMessage(GETTING_STARTED_MESSAGE);




More information about the jboss-svn-commits mailing list