[jboss-svn-commits] JBL Code SVN: r18222 - in labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2: product/docs/governance and 41 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Jan 31 11:46:32 EST 2008


Author: kevin.conner at jboss.com
Date: 2008-01-31 11:46:31 -0500 (Thu, 31 Jan 2008)
New Revision: 18222

Added:
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/classes/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/classes/org/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/classes/org/jbpm/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/classes/org/jbpm/ant/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/lib/ext/jbpm-ant.jar
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/AsyncTest.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/DummyAction.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/Wait2SecondsAction.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/.gpd.testAsync.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/.gpd.testSync.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testAsync.jpg
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testAsync.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testSync.jpg
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testSync.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-web/src/main/webapp/WEB-INF/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml
Removed:
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/classes/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/classes/org/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/classes/org/jbpm/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/classes/org/jbpm/ant/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/DeployProcessDefinitionFacade.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actions/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/cmd/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml
Modified:
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/MessageActionGuide.odt
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/governance/MonitoringGuide.odt
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/samples/TBGuide.odt
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/services/ContentBasedRouting.odt
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/services/MessageTransformation.odt
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/services/Registry.odt
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/services/jBPMIntegrationGuide.odt
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/services/jBPMIntegrationGuide.pdf
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/plugins/org.jboss.soa.esb.oracle.aq/src/main/java/org/jboss/soa/esb/oracle/aq/AQUtil.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ListenerManagerJDBCUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/jboss-esb-unfiltered.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration2/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration2/jboss-esb.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/readme.txt
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/webservice_bpel/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/webservice_bpel/readme.txt
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/webservice_consumer2/readme.txt
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/Constants.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbActionHandler.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/CommandExecutor.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/MessageFacade.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/resources/META-INF/jboss-esb.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testExceptionHandling.jpg
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testExceptionHandling.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-web/src/main/webapp/attribute.jsp
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/BeanRegistrationServlet.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BPMOrchestration2Test.java
Log:
Merged IR9 into CP

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

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

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

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

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

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

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/services/jBPMIntegrationGuide.odt
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/services/jBPMIntegrationGuide.pdf
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/plugins/org.jboss.soa.esb.oracle.aq/src/main/java/org/jboss/soa/esb/oracle/aq/AQUtil.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/plugins/org.jboss.soa.esb.oracle.aq/src/main/java/org/jboss/soa/esb/oracle/aq/AQUtil.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/plugins/org.jboss.soa.esb.oracle.aq/src/main/java/org/jboss/soa/esb/oracle/aq/AQUtil.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -49,6 +49,8 @@
 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;
@@ -142,6 +144,34 @@
     public Session getJmsSession(final int acknowledgeMode) throws CourierException {
         if(jmsSession == null) {
             synchronized(this) {
+        	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.
+        		 */
+        		
+        		/*
+        		 * MessageAwareListener will catch exceptions and roll back the transaction.
+        		 */
+        		
+        		if (transactional && !isActive)
+        		{
+        			throw new CourierException("Associated transaction is no longer active!");
+        		}
+        	}
+        	catch (TransactionStrategyException ex)
+        	{
+        	    throw new CourierException(ex);
+        	}
+        	
                 if(jmsSession == null) {
                     String sType;
 
@@ -185,7 +215,7 @@
         if (null == message) {
             return false;
         }
-
+        
         if (_messageProducer == null) {
             try {
                 createMessageProducer();
@@ -232,6 +262,34 @@
             return false;
         }
 
+        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.
+		 */
+		
+		/*
+		 * MessageAwareListener will catch exceptions and roll back the transaction.
+		 */
+		
+		if (transactional && !isActive)
+		{
+			throw new CourierException("Associated transaction is no longer active!");
+		}
+	}
+	catch (TransactionStrategyException ex)
+	{
+	    throw new CourierException(ex);
+	}
+        
         if (_messageProducer == null) {
             try {
                 createMessageProducer();
@@ -248,9 +306,11 @@
                         message.setStringProperty(key, kvp.getValue());
                     }
                 }
+                
                 sendMessage(message);
-                if ( jmsSession.getTransacted() )
+                if ( jmsSession.getTransacted() && !transactional )
 	                jmsSession.commit();
+                
                 return true;
             }
             catch (JMSException e) {
@@ -375,7 +435,14 @@
     } // ________________________________
 
     private JmsConnectionPool getConnectionPool() throws ConnectionException {
-        if(jmsConnectionPool == null) {
+	/*
+	 * We need to ignore the pool if we are being used within the scope of
+	 * a global transaction. However, the pool conveniently wraps the JNDI
+	 * lookup and configuration. Rather than refactor that out, for now we
+	 * "work around" it.
+	 */
+	
+        if ((jmsConnectionPool == null) || (transactional)) {
             synchronized(this) {
                 if(jmsConnectionPool == null) {
                     String sFactoryClass;
@@ -400,7 +467,11 @@
                         sFactoryClass = "ConnectionFactory";
                     }
 
-                    jmsConnectionPool = JmsConnectionPoolContainer.getPool(properties, sFactoryClass, sType, username, password, transacted);
+                    /*
+                     * Needs to be a one-shot instance if transactional.
+                     */
+                    
+                    jmsConnectionPool = JmsConnectionPoolContainer.getPool(properties, sFactoryClass, sType, username, password, transacted, transactional);
                 }
             }
         }
@@ -549,7 +620,6 @@
         }
     } // ________________________________
 
-
     long _sleepForRetries = 3000; // milliseconds
 
     protected boolean _isReceiver;
@@ -570,6 +640,8 @@
 
     protected volatile JmsConnectionPool jmsConnectionPool;
 
+    private boolean transactional = false;
+    
     /**
      * Strategy for setting JMSProperties
      */

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/SqlTableCourier.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPool.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -44,6 +44,8 @@
 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.common.TransactionStrategy;
+import org.jboss.soa.esb.common.TransactionStrategyException;
 import org.jboss.soa.esb.helpers.NamingContextException;
 import org.jboss.soa.esb.helpers.NamingContextPool;
 
@@ -123,7 +125,7 @@
     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);
@@ -134,6 +136,25 @@
                 String connectionFactoryString = poolKey.get(JMSEpr.CONNECTION_FACTORY_TAG);
                 Object factoryConnection=null;
                 try {
+                    /*
+                     * For XA connections, use java:/JmsXA which should return a wrapped
+                     * XAConnectionFactory instance, which will be the base for the
+                     * XAQueueConnectionFactory or XATopicConnectionFactory.
+                     */
+                    
+                    try
+                    {
+                	if (TransactionStrategy.getTransactionStrategy(true).getTransaction() != null)
+                	{
+                	    if ("XAConnectionFactory".equals(connectionFactoryString))
+                        	connectionFactoryString = "java:/JmsXA";
+                	}
+                    }
+                    catch (TransactionStrategyException ex)
+                    {
+                	logger.warn("Could not determine transaction strategy!", ex);
+                    }
+
                     factoryConnection = jndiContext.lookup(connectionFactoryString);
                 } catch (NamingException ne) {
                     logger.info("Received NamingException, refreshing context.");
@@ -153,12 +174,29 @@
                     jmsConnection = useJMSSecurity ? factory.createTopicConnection(username,password): factory.createTopicConnection();
                 }
                 
-                jmsConnection.setExceptionListener(new ExceptionListener() {
-                    public void onException(JMSException arg0)
+                TransactionStrategy txStrategy = TransactionStrategy.getStrategy();
+                
+                /*
+                 * It is illegal to set ExceptionListeners if we are within a transaction.
+                 */
+                
+                try
+                {
+                    if ((txStrategy != null) && (txStrategy.getTransaction() == null))
                     {
-                        removeSessionPool() ;
+    		                jmsConnection.setExceptionListener(new ExceptionListener() {
+                            public void onException(JMSException arg0)
+                            {
+                                removeSessionPool() ;
+                            }
+                        }) ;
                     }
-                }) ;
+                }
+                catch (TransactionStrategyException ex)
+                {
+                    throw new ConnectionException(ex);
+                }
+                
                 jmsConnection.start();
             } finally {
                 NamingContextPool.releaseNamingContext(jndiContext) ;
@@ -168,7 +206,7 @@
         
         //Create a new Session
         ArrayList<Session> freeSessions = freeSessionsMap.get( acknowledgeMode );
-        
+
         if (JMSEpr.QUEUE_TYPE.equals(destinationType)) {
             QueueSession session = ((QueueConnection)jmsConnection).createQueueSession(transacted,acknowledgeMode);
                     

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainer.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -94,6 +94,14 @@
     	return getPool( enviroment, connectionFactory, destinationType, username, password, false );
     	
     }
+    
+    public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory, String destinationType,
+		final String username, final String password, final boolean transacted)
+    throws ConnectionException
+    {
+	return getPool(enviroment, connectionFactory, destinationType, username, password, transacted, false);
+    }
+    
     /**
      * Returns the pool given the identifiers for the JMS provider.
      * 
@@ -107,16 +115,31 @@
      * @throws ConnectionException
      */
     public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory, String destinationType,
-    		final String username, final String password, final boolean transacted)
+    		final String username, final String password, final boolean transacted, final boolean ignore)
         throws ConnectionException
     {
         Map<String,String> poolKey = createPoolKey(enviroment, connectionFactory, destinationType, username, password, transacted);
         final Map<Map<String, String>, JmsConnectionPool> poolMap = getMap() ;
-        if (poolMap.containsKey(poolKey)) {
+  
+        if (poolMap.containsKey(poolKey) && !ignore) {
             return poolMap.get(poolKey);
         } else {
             JmsConnectionPool pool = new JmsConnectionPool(poolKey);
-            poolMap.put(poolKey, pool);
+            
+            /*
+             * Horrible, but means we don't have to rewrite the pool code at this stage!
+             */
+            
+            if (!ignore)
+            {
+        	/*
+        	 * Put it into the pool unless this is a one-shot connection, e.g., for
+        	 * use in a global transaction.
+        	 */
+        	
+        	poolMap.put(poolKey, pool);
+            }
+            
             return pool;
         }
     }

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/client/ServiceInvoker.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -59,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>
  */

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -485,8 +485,11 @@
     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>();
@@ -504,6 +507,9 @@
         }
         finally {
             try {
+        	if (RS != null)
+        	    RS.close();
+        	
                 oConn.rollback();
             } catch (final SQLException sqle) {
             	refreshDatasource();

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -182,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;
 	
@@ -234,49 +234,60 @@
 	 */
 	public void sendNotification (org.jboss.soa.esb.message.Message esbMessage) throws NotificationException
 	{
-		try
+	    try
+	    {
+		Message jmsMessage = null;
+		Object obj = payloadProxy.getPayload(esbMessage);
+
+		if (MessageType.JAVA_SERIALIZED.equals(esbMessage.getType()))
 		{
-			Message jmsMessage = null;
-            Object obj = payloadProxy.getPayload(esbMessage);
+		    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);
+		}
 
-			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);
+		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);
 		}
-		catch (JMSException ex)
-		{
-			throw new NotificationException(ex);
-		} catch (MessageDeliverException e) {
-            throw new NotificationException(e);
-        }
+		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]);
+            }
     } // __________________________________
 	
 	/**

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ListenerManagerJDBCUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ListenerManagerJDBCUnitTest.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/ListenerManagerJDBCUnitTest.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/build.xml	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/build.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/jboss-esb-unfiltered.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/jboss-esb-unfiltered.xml	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration1/jboss-esb-unfiltered.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration2/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration2/build.xml	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration2/build.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration2/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration2/jboss-esb.xml	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration2/jboss-esb.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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 mep="OneWay">
-                <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>

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/build.xml	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/build.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/readme.txt	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/readme.txt	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/webservice_bpel/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/webservice_bpel/build.xml	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/webservice_bpel/build.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -52,13 +52,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/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/webservice_bpel/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/webservice_bpel/readme.txt	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/webservice_bpel/readme.txt	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/webservice_consumer2/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/webservice_consumer2/readme.txt	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/webservice_consumer2/readme.txt	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/db/DBMessageStoreImpl.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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();
+        }
     }
     
 

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/build)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/classes (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/build/classes)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/classes/org (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/build/classes/org)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/classes/org/jbpm (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/build/classes/org/jbpm)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build/classes/org/jbpm/ant (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/build/classes/org/jbpm/ant)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/build.xml	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build.xml (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/build.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/build.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/src)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/src/org)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/src/org/jbpm)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/src/org/jbpm/ant)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/DeployProcessToServerTask.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/ant-task/src/org/jbpm/ant/ProcessDeployer.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/lib/ext/jbpm-ant.jar (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/lib/ext/jbpm-ant.jar)
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/Constants.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/Constants.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/Constants.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -100,9 +100,9 @@
 
 	public enum OpCode
 	{
-        CallbackCommand,
-		DeployProcessDefinition
-//		AbstractCancelCommand
+        CallbackCommand
+//		,DeployProcessDefinition
+//		,AbstractCancelCommand
 //		,AbstractGetObjectBaseCommand
 //		,AsynchronousCommand
 		,CancelProcessInstanceCommand

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbActionHandler.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbActionHandler.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbActionHandler.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -43,9 +43,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>

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/CommandExecutor.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/CommandExecutor.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/CommandExecutor.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -34,7 +34,6 @@
 import org.jboss.soa.esb.services.jbpm.Constants;
 import org.jboss.soa.esb.services.jbpm.JBpmObjectMapper;
 import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
 import org.jbpm.JbpmException;
 import org.jbpm.command.CancelProcessInstanceCommand;
 import org.jbpm.command.CommandService;
@@ -43,7 +42,6 @@
 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

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/DeployProcessDefinitionFacade.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/DeployProcessDefinitionFacade.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/DeployProcessDefinitionFacade.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/MessageFacade.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/MessageFacade.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/MessageFacade.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/resources/META-INF/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/resources/META-INF/jboss-esb.xml	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/resources/META-INF/jboss-esb.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -29,6 +29,6 @@
 				<action name="action" class="org.jboss.soa.esb.services.jbpm.actions.JBpmCallback"/>
 			</actions>
 		</service>
-	</services>	
+	</services>
 		
 </jbossesb>

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/AsyncTest.java (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/AsyncTest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/AsyncTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/AsyncTest.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -0,0 +1,167 @@
+/*
+ * 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.actionhandlers;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.graph.def.Node;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+import org.junit.Before;
+import org.junit.Test;
+/**
+ * Tests the capabilities of jBPM async, which we are using.
+ * 
+ * @author kstam
+ *
+ */
+public class AsyncTest 
+{
+    private static String PROCESS_DEF_XML_ASYNC = "testAsync.xml";
+    private static String PROCESS_DEF_XML_SYNC = "testSync.xml";
+	private static Logger logger = Logger.getLogger(AsyncTest.class);
+
+     /**
+     * If the node *after* myNode is set to async="true", then the signal
+     * command will return immediately, and run in a different transaction.
+     * 
+     * @throws Exception
+     */
+    @Test
+    public void sync() throws Exception
+    { 
+        logger.info("Setting up jBPM");
+        JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
+        
+        jbpmConfiguration.getJobExecutor().start();
+        JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+        //Extract a process definition from the processdefinition.xml file.
+        ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource(PROCESS_DEF_XML_SYNC);
+        assertNotNull(processDefinition);
+        //Create an instance of the process definition.
+        jbpmContext.deployProcessDefinition(processDefinition);
+        ProcessInstance processInstance = jbpmContext.newProcessInstance("testSync");
+        long processInstanceId = processInstance.getId();
+        assertTrue(
+                "Instance is in start state", 
+                "start".equals(processInstance.getRootToken().getNode().getName()));
+        jbpmContext.close(); 
+        
+        jbpmConfiguration = JbpmConfiguration.getInstance();
+        jbpmContext = jbpmConfiguration.createJbpmContext();
+        processInstance = jbpmContext.loadProcessInstance(processInstanceId);
+        
+        Token token = processInstance.getRootToken(); 
+        processInstance.signal();
+        assertEquals("mynode",token.getNode().getName());
+        jbpmContext.close();
+        
+        long startTime = System.currentTimeMillis();  
+//      Send mynode a signal such that it goes to wait2seconds
+        jbpmContext = jbpmConfiguration.createJbpmContext();
+        processInstance = jbpmContext.loadProcessInstance(processInstanceId);
+        processInstance.signal();
+        jbpmContext.save(processInstance);
+        jbpmContext.close();
+        
+        jbpmContext = jbpmConfiguration.createJbpmContext();
+        processInstance = jbpmContext.loadProcessInstance(processInstanceId);
+        token = processInstance.getRootToken();
+//      Check that we are now in the end node.
+        String currentNode = token.getNode().getName();
+        long endTime = System.currentTimeMillis();
+        assertEquals("end",currentNode);
+        jbpmContext.close();
+        long elapsedMillies = endTime - startTime;
+        System.out.println("async elapsedMillies=" + elapsedMillies);
+        assertTrue(elapsedMillies > 2000);
+    }
+    
+    /**
+     * If the node *after* myNode is set to async="true", then the signal
+     * command will return immediately, and run in a different transaction.
+     * 
+     * @throws Exception
+     */
+    @Test
+    public void async() throws Exception
+    { 
+        logger.info("Setting up jBPM");
+        JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
+        
+        jbpmConfiguration.getJobExecutor().start();
+        JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
+        //Extract a process definition from the processdefinition.xml file.
+        ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource(PROCESS_DEF_XML_ASYNC);
+        assertNotNull(processDefinition);
+        //Create an instance of the process definition.
+        jbpmContext.deployProcessDefinition(processDefinition);
+        ProcessInstance processInstance = jbpmContext.newProcessInstance("testAsync");
+        long processInstanceId = processInstance.getId();
+        assertTrue(
+                "Instance is in start state", 
+                "start".equals(processInstance.getRootToken().getNode().getName()));
+        jbpmContext.close(); 
+        
+        jbpmConfiguration = JbpmConfiguration.getInstance();
+        jbpmContext = jbpmConfiguration.createJbpmContext();
+        processInstance = jbpmContext.loadProcessInstance(processInstanceId);
+        
+        Token token = processInstance.getRootToken(); 
+        processInstance.signal();
+        assertEquals("mynode",token.getNode().getName());
+        jbpmContext.close();
+        
+        long startTime = System.currentTimeMillis();  
+//      Send mynode a signal such that it goes to wait2seconds
+        jbpmContext = jbpmConfiguration.createJbpmContext();
+        processInstance = jbpmContext.loadProcessInstance(processInstanceId);
+        processInstance.signal();
+        jbpmContext.save(processInstance);
+        jbpmContext.close();
+        
+        jbpmContext = jbpmConfiguration.createJbpmContext();
+        processInstance = jbpmContext.loadProcessInstance(processInstanceId);
+        token = processInstance.getRootToken();
+//      Check that we are now in the end node.
+        String currentNode = token.getNode().getName();
+        long endTime = System.currentTimeMillis();
+        assertEquals("wait2seconds",currentNode);
+        jbpmContext.close();
+        long elapsedMillies = endTime - startTime;
+        System.out.println("async elapsedMillies=" + elapsedMillies);
+        assertTrue(elapsedMillies < 2000);
+    }
+    
+    public static junit.framework.Test suite(){
+        return new JUnit4TestAdapter(AsyncTest.class);
+    }
+
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/DummyAction.java (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/DummyAction.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/DummyAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/DummyAction.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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.");
+    }
+
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/Wait2SecondsAction.java (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/Wait2SecondsAction.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/Wait2SecondsAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actionhandlers/Wait2SecondsAction.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -0,0 +1,31 @@
+/**
+ * 
+ */
+package org.jboss.soa.esb.services.jbpm.actionhandlers;
+
+import org.jbpm.graph.def.ActionHandler;
+import org.jbpm.graph.exe.ExecutionContext;
+
+/**
+ * @author kstam
+ *
+ */
+
+public class Wait2SecondsAction implements ActionHandler{
+    
+    private static final long serialVersionUID = 1L;
+
+    public void execute (ExecutionContext executionContext) throws Exception
+    {
+        for (int i=0; i<2; i++){
+            try {
+                Thread.sleep(1000);
+                System.out.println("Waited " + (i+1) + " seconds");
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+        }
+        System.out.println("Done Waiting");
+    }
+
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/.gpd.testAsync.xml (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/src/test/resources/.gpd.testAsync.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/.gpd.testAsync.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/.gpd.testAsync.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-diagram name="testAsync" width="647" height="644">
+  <node name="start" x="78" y="32" width="140" height="40">
+    <transition name="toExtraNode">
+      <label x="5" y="-10"/>
+    </transition>
+  </node>
+  <node name="extranode" x="0" y="0" width="140" height="40">
+    <transition name="toMyNode">
+      <label x="5" y="-10"/>
+    </transition>
+  </node>
+  <node name="mynode" x="80" y="191" width="140" height="40">
+    <transition name="toWait2Seconds">
+      <label x="5" y="-10"/>
+    </transition>
+  </node>
+  <node name="wait2seconds" x="74" y="275" width="140" height="40">
+    <transition name="toEnd">
+      <label x="5" y="-10"/>
+    </transition>
+  </node>
+  <node name="end" x="79" y="402" width="140" height="40"/>
+</process-diagram>

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/.gpd.testSync.xml (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/src/test/resources/.gpd.testSync.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/.gpd.testSync.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/.gpd.testSync.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-diagram name="testSync" width="645" height="584">
+  <node name="start" x="0" y="0" width="140" height="40">
+    <transition name="toExtraNode">
+      <label x="5" y="-10"/>
+    </transition>
+  </node>
+  <node name="extranode" x="0" y="0" width="140" height="40">
+    <transition name="toMyNode">
+      <label x="5" y="-10"/>
+    </transition>
+  </node>
+  <node name="mynode" x="0" y="0" width="140" height="40">
+    <transition name="toWait2Seconds">
+      <label x="5" y="-10"/>
+    </transition>
+  </node>
+  <node name="wait2seconds" x="0" y="0" width="140" height="40">
+    <transition name="toEnd">
+      <label x="5" y="-10"/>
+    </transition>
+  </node>
+  <node name="end" x="0" y="0" width="140" height="40"/>
+</process-diagram>

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testAsync.jpg (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/src/test/resources/testAsync.jpg)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testAsync.xml (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/src/test/resources/testAsync.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testAsync.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testAsync.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition 
+  xmlns="urn:jbpm.org:jpdl-3.2"
+  name="testAsync">
+   <start-state name="start">
+      <transition name="toExtraNode" to="extranode"></transition>
+   </start-state>
+   <node name="extranode">
+       <transition name="toMyNode" to="mynode"></transition>
+   </node>
+   <node name="mynode" >
+       <action name="dummy" class="org.jboss.soa.esb.services.jbpm.actionhandlers.DummyAction"/>
+       <transition name="toWait2Seconds" to="wait2seconds" />
+   </node>
+   <node name="wait2seconds" async="true">
+       <transition name="toEnd" to="end">
+       	<action name="wait2seconds" class="org.jboss.soa.esb.services.jbpm.actionhandlers.Wait2SecondsAction"/>
+       </transition>
+   </node>
+   <end-state name="end"></end-state>
+</process-definition>
\ No newline at end of file

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

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testExceptionHandling.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testExceptionHandling.xml	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testExceptionHandling.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testSync.jpg (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/src/test/resources/testSync.jpg)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testSync.xml (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/services/jbpm/src/test/resources/testSync.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testSync.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/test/resources/testSync.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition 
+  xmlns="urn:jbpm.org:jpdl-3.2"
+  name="testSync">
+   <start-state name="start">
+      <transition name="toExtraNode" to="extranode"></transition>
+   </start-state>
+   <node name="extranode">
+       <transition name="toMyNode" to="mynode"></transition>
+   </node>
+   <node name="mynode" >
+       <action name="dummy" class="org.jboss.soa.esb.services.jbpm.actionhandlers.DummyAction"/>
+       <transition name="toWait2Seconds" to="wait2seconds" />
+   </node>
+   <node name="wait2seconds">
+       <transition name="toEnd" to="end">
+       	<action name="wait2seconds" class="org.jboss.soa.esb.services.jbpm.actionhandlers.Wait2SecondsAction"/>
+       </transition>
+   </node>
+   <end-state name="end"></end-state>
+</process-definition>
\ No newline at end of file

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -163,7 +163,12 @@
         execContext.setAttribute(WsdlTransformer.TARGET_PROTOCOL, targetProtocol);
         transformer.filter(new StreamSource(new StringReader(wsdl)), new StreamResult(writer), execContext);
 
-        return writer.toString();
+        wsdl = writer.toString().trim();
+        if(!wsdl.startsWith("<?xml")) {
+            wsdl = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + wsdl;
+        }
+
+        return wsdl;
     }
 
     protected void initializeTransform() throws ConfigurationException {

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl	2008-01-31 16:46:31 UTC (rev 18222)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <definitions name="GoodbyeWorldWSService" targetNamespace="http://webservice_war1/goodbyeworld" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice_war1/goodbyeworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <import location="http://127.0.0.1:8080/contract/contract.jsp?wsdl&amp;resource=MTOMEndpoint_PortType61314.wsdl&amp;serviceCat=myServiceCat&amp;serviceName=myServiceName&amp;protocol=socket" namespace="http://org.jboss.ws/xop/doclit"/>
     <types/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/BeanRegistrationServlet.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/BeanRegistrationServlet.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/BeanRegistrationServlet.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/src/main/java/org/jboss/soa/esb/monitoring/server/DataFilerScheduler.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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
-		
-	}
 	
+	
+	
 }

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-web/src/main/webapp/WEB-INF (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/tools/console/management-web/src/main/webapp/WEB-INF)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml (from rev 18221, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR9/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-web/src/main/webapp/WEB-INF/jboss-web.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-web/src/main/webapp/attribute.jsp
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-web/src/main/webapp/attribute.jsp	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-web/src/main/webapp/attribute.jsp	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/build.xml	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/build.xml	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BPMOrchestration2Test.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BPMOrchestration2Test.java	2008-01-31 16:24:44 UTC (rev 18221)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BPMOrchestration2Test.java	2008-01-31 16:46:31 UTC (rev 18222)
@@ -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