[jboss-svn-commits] JBL Code SVN: r17930 - in labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product: docs/services and 42 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Jan 17 09:35:25 EST 2008


Author: kevin.conner at jboss.com
Date: 2008-01-17 09:35:24 -0500 (Thu, 17 Jan 2008)
New Revision: 17930

Added:
   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/rosetta/src/org/jboss/soa/esb/helpers/NamingContextException.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/deployment.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jboss-esb.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-service.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jndi.properties
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/juddi.properties
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/log4j.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/quickstart-ds.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/readme.txt
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/hsqldb/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java
Removed:
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/advanced/jBPMIntegrationGuide.odt
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/deployment.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jboss-esb.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-service.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jndi.properties
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/juddi.properties
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/log4j.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/quickstart-ds.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/readme.txt
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/hsqldb/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java
Modified:
   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/etc/schemas/xml/jbossesb-1.0.1.xsd
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/command/JmsCommandQueue.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/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/actions/routing/JMSRouter.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/Configuration.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContext.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecyclePriorities.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetter.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.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/src/org/jboss/soa/esb/notification/NotifyQueues.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyTopics.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetter.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/jms/JMSPropertiesSetter.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/common/tests/utils/DrainQueuesAndTopics.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/helpers/AppServerContextUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_esbaware.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_01_gateways.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetterUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyTopicsUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/load_generator/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/jcr/JCRConnectionManager.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/CallbackCommand.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksInstanceManager.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-esb/src/main/resources/mysql/create_database.sql
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/mysql.properties
Log:
Merge IR7 into platform

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

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

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/services/jBPMIntegrationGuide.odt (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/docs/services/jBPMIntegrationGuide.odt)
===================================================================
(Binary files differ)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/docs/services/jBPMIntegrationGuide.pdf (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/docs/services/jBPMIntegrationGuide.pdf)
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/etc/schemas/xml/jbossesb-1.0.1.xsd
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/etc/schemas/xml/jbossesb-1.0.1.xsd	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/etc/schemas/xml/jbossesb-1.0.1.xsd	2008-01-17 14:35:24 UTC (rev 17930)
@@ -626,6 +626,15 @@
 					</xsd:documentation>
 				</xsd:annotation>
 			</xsd:attribute>
+			<xsd:attribute default="false" name="transacted"
+				type="xsd:boolean" use="optional">
+				<xsd:annotation>
+					<xsd:documentation xml:lang="en">
+						If true, JMS sessions will be transaction aware.
+						Default is false.
+					</xsd:documentation>
+				</xsd:annotation>
+			</xsd:attribute>
 		</xsd:complexType>
 	</xsd:element>
 	<xsd:element name="jms-bus" substitutionGroup="jesb:bus">

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

Modified: labs/jbossesb/workspace/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-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/couriers/JmsCourier.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -52,7 +52,8 @@
 import org.jboss.soa.esb.couriers.CourierException;
 import org.jboss.soa.esb.couriers.CourierTimeoutException;
 import org.jboss.soa.esb.helpers.KeyValuePair;
-import org.jboss.soa.esb.helpers.NamingContext;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 import org.jboss.soa.esb.listeners.gateway.DefaultESBPropertiesSetter;
 import org.jboss.soa.esb.listeners.gateway.ESBPropertiesSetter;
 import org.jboss.soa.esb.message.Message;
@@ -186,7 +187,11 @@
         }
 
         if (_messageProducer == null) {
-            createMessageProducer();
+            try {
+                createMessageProducer();
+            } catch (final NamingContextException nce) {
+                throw new CourierException("Unexpected exception attempting to access naming context pool", nce) ;
+            }
         }
 
         // Create the JMS message from the serialized ESB message...
@@ -228,7 +233,11 @@
         }
 
         if (_messageProducer == null) {
-            createMessageProducer();
+            try {
+                createMessageProducer();
+            } catch (final NamingContextException nce) {
+                throw new CourierException("Unexpected exception attempting to access naming context pool", nce) ;
+            }
         }
 
         while (null != _messageProducer) {
@@ -240,6 +249,8 @@
                     }
                 }
                 sendMessage(message);
+                if ( jmsSession.getTransacted() )
+	                jmsSession.commit();
                 return true;
             }
             catch (JMSException e) {
@@ -301,14 +312,14 @@
         }
     } // ________________________________
 
-    private void createMessageProducer() throws CourierException {
+    private void createMessageProducer() throws CourierException, NamingContextException {
         Context oJndiCtx = null;
 
         if (_messageProducer == null) {
             synchronized(this) {
                 if (_messageProducer == null) {
                     try {
-                        oJndiCtx = NamingContext.getServerContext(_epr.getJndiEnvironment());
+                        oJndiCtx = NamingContextPool.getNamingContext(_epr.getJndiEnvironment());
 
                         String sType = _epr.getDestinationType();
                         if (JMSEpr.QUEUE_TYPE.equals(sType)) {
@@ -319,7 +330,7 @@
                                         .getDestinationName());
                             } catch (NamingException ne) {
                                 try {
-                                    oJndiCtx = NamingContext.getFreshServerContext(_epr.getJndiEnvironment());
+                                    oJndiCtx = NamingContextPool.replaceNamingContext(oJndiCtx, _epr.getJndiEnvironment());
                                     queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
                                             .getDestinationName());
                                 } catch (NamingException nex) {
@@ -353,6 +364,10 @@
                     }
                     catch (URISyntaxException ex) {
                         throw new CourierException(ex);
+                    } finally {
+                        if (oJndiCtx != null) {
+                            NamingContextPool.releaseNamingContext(oJndiCtx) ;
+                        }
                     }
                 }
             }
@@ -368,6 +383,7 @@
                     Properties properties;
                     String username;
                     String password;
+                    boolean transacted;
 
                     try {
                         sFactoryClass = _epr.getConnectionFactory();
@@ -375,6 +391,7 @@
                         properties = _epr.getJndiEnvironment();
                         username = _epr.getJMSSecurityPrincipal();
                         password = _epr.getJMSSecurityCredential();
+                        transacted = _epr.getTransacted();
                     } catch (URISyntaxException e) {
                         throw new ConnectionException("Unexpected exception while getting JMS connection pool.", e);
                     }
@@ -383,7 +400,7 @@
                         sFactoryClass = "ConnectionFactory";
                     }
 
-                    jmsConnectionPool = JmsConnectionPoolContainer.getPool(properties, sFactoryClass, sType, username, password);
+                    jmsConnectionPool = JmsConnectionPoolContainer.getPool(properties, sFactoryClass, sType, username, password, transacted);
                 }
             }
         }
@@ -471,7 +488,7 @@
         esbPropertiesStrategy.setPropertiesFromJMSMessage(fromJMS, toESB);
     }
 
-    private void createMessageConsumer() throws CourierException, ConfigurationException, MalformedEPRException {
+    private void createMessageConsumer() throws CourierException, ConfigurationException, MalformedEPRException, NamingContextException {
         Context oJndiCtx = null;
 
         if (_messageConsumer == null) {
@@ -480,38 +497,39 @@
                     boolean success = false;
                     try {
                         Properties environment = _epr.getJndiEnvironment();
-                        oJndiCtx = NamingContext.getServerContext(environment);
-                        if (null == oJndiCtx)
-                            throw new ConfigurationException(
-                                    "Unable fo obtain jndi context");
-
-                        String sType = _epr.getDestinationType();
-                        if (JMSEpr.QUEUE_TYPE.equals(sType)) {
-                            QueueSession qSess = (QueueSession) getJmsSession(_epr.getAcknowledgeMode());
-                            javax.jms.Queue queue = null;
-                            try {
-                                queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
-                                        .getDestinationName());
-                            } catch (NamingException ne) {
+                        oJndiCtx = NamingContextPool.getNamingContext(environment);
+                        try
+                        {
+                            String sType = _epr.getDestinationType();
+                            if (JMSEpr.QUEUE_TYPE.equals(sType)) {
+                                QueueSession qSess = (QueueSession) getJmsSession(_epr.getAcknowledgeMode());
+                                javax.jms.Queue queue = null;
                                 try {
-                                    oJndiCtx = NamingContext.getFreshServerContext(environment);
                                     queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
                                             .getDestinationName());
-                                } catch (NamingException nex) {
-                                    //ActiveMQ
-                                    queue = qSess.createQueue(_epr.getDestinationName());
+                                } catch (NamingException ne) {
+                                    try {
+                                        oJndiCtx = NamingContextPool.replaceNamingContext(oJndiCtx, environment);
+                                        queue = (javax.jms.Queue) oJndiCtx.lookup(_epr
+                                                .getDestinationName());
+                                    } catch (NamingException nex) {
+                                        //ActiveMQ
+                                        queue = qSess.createQueue(_epr.getDestinationName());
+                                    }
                                 }
+                                _messageConsumer = qSess.createReceiver(queue, _epr.getMessageSelector());
+                            } else if (JMSEpr.TOPIC_TYPE.equals(sType)) {
+                                TopicSession tSess = (TopicSession) getJmsSession(_epr.getAcknowledgeMode());
+                                Topic topic = tSess.createTopic(_epr.getDestinationName());
+                                _messageConsumer = tSess.createConsumer(topic, _epr
+                                        .getMessageSelector());
+                            } else {
+                                throw new CourierException("Unknown destination type");
                             }
-                            _messageConsumer = qSess.createReceiver(queue, _epr.getMessageSelector());
-                        } else if (JMSEpr.TOPIC_TYPE.equals(sType)) {
-                            TopicSession tSess = (TopicSession) getJmsSession(_epr.getAcknowledgeMode());
-                            Topic topic = tSess.createTopic(_epr.getDestinationName());
-                            _messageConsumer = tSess.createConsumer(topic, _epr
-                                    .getMessageSelector());
-                        } else {
-                            throw new CourierException("Unknown destination type");
+                            success = true;
+                        } finally {
+                            NamingContextPool.releaseNamingContext(oJndiCtx) ;
                         }
-                        success = true;
                     }
                     catch (JMSException ex) {
                         _logger.debug("Error from JMS system.", ex);

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-17 14:13:26 UTC (rev 17929)
+++ 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-17 14:35:24 UTC (rev 17930)
@@ -44,7 +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.helpers.NamingContext;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 
 import com.arjuna.common.util.propertyservice.PropertyManager;
 
@@ -85,9 +86,6 @@
     /** Logger */
     private Logger logger = Logger.getLogger(this.getClass());
     
-    /** Context, which is cached until we encounter a naming exception, or the pool is rebuild */
-    private Context jndiContext;
-    
     /**
      * Contructor of the pool.
      * 
@@ -122,7 +120,7 @@
      * @throws ConnectionException
      */
     private  synchronized void addAnotherSession(Map<String, String> poolKey, final int acknowledgeMode)
-    throws NamingException, JMSException, ConnectionException
+    throws NamingException, JMSException, ConnectionException, NamingContextException
     {
         String destinationType = poolKey.get(JMSEpr.DESTINATION_TYPE_TAG);
         
@@ -131,49 +129,52 @@
             JmsConnectionPoolContainer.addToPool(poolKey, this);
             logger.debug("Creating a JMS Connection for poolKey : " + poolKey);
             Properties jndiEnvironment = JmsConnectionPoolContainer.getJndiEnvironment(poolKey);
-            jndiContext = NamingContext.getServerContext(jndiEnvironment);
-            String connectionFactoryString = poolKey.get(JMSEpr.CONNECTION_FACTORY_TAG);
-            Object factoryConnection=null;
+            Context jndiContext = NamingContextPool.getNamingContext(jndiEnvironment);
             try {
-                factoryConnection = jndiContext.lookup(connectionFactoryString);
-            } catch (NamingException ne) {
-                logger.info("Received NamingException, refreshing context.");
-                jndiContext = NamingContext.getFreshServerContext(JmsConnectionPoolContainer.getJndiEnvironment(poolKey));
-                factoryConnection = jndiContext.lookup(connectionFactoryString);
+                String connectionFactoryString = poolKey.get(JMSEpr.CONNECTION_FACTORY_TAG);
+                Object factoryConnection=null;
+                try {
+                    factoryConnection = jndiContext.lookup(connectionFactoryString);
+                } catch (NamingException ne) {
+                    logger.info("Received NamingException, refreshing context.");
+                    jndiContext = NamingContextPool.replaceNamingContext(jndiContext, JmsConnectionPoolContainer.getJndiEnvironment(poolKey));
+                    factoryConnection = jndiContext.lookup(connectionFactoryString);
+                }
+                final String username = poolKey.get( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG );
+                final String password = poolKey.get( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG );
+                boolean useJMSSecurity = (username != null && password != null);
+                logger.debug( "JMS Security principal [" + username + "] using JMS Security : " + useJMSSecurity );
+                
+                if (JMSEpr.QUEUE_TYPE.equals(destinationType)) {
+                    QueueConnectionFactory factory = (QueueConnectionFactory) factoryConnection;
+                    jmsConnection = useJMSSecurity ? factory.createQueueConnection(username,password): factory.createQueueConnection();
+                } else {
+                    TopicConnectionFactory factory = (TopicConnectionFactory) factoryConnection;
+                    jmsConnection = useJMSSecurity ? factory.createTopicConnection(username,password): factory.createTopicConnection();
+                }
+                
+                jmsConnection.setExceptionListener(new ExceptionListener() {
+                    public void onException(JMSException arg0)
+                    {
+                        removeSessionPool() ;
+                    }
+                }) ;
+                jmsConnection.start();
+            } finally {
+                NamingContextPool.releaseNamingContext(jndiContext) ;
             }
-            final String username = poolKey.get( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG );
-            final String password = poolKey.get( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG );
-            boolean useJMSSecurity = (username != null && password != null);
-            logger.debug( "JMS Security principal [" + username + "] using JMS Security : " + useJMSSecurity );
-            
-            if (JMSEpr.QUEUE_TYPE.equals(destinationType)) {
-                QueueConnectionFactory factory = (QueueConnectionFactory) factoryConnection;
-                jmsConnection = useJMSSecurity ? factory.createQueueConnection(username,password): factory.createQueueConnection();
-            } else {
-                TopicConnectionFactory factory = (TopicConnectionFactory) factoryConnection;
-                jmsConnection = useJMSSecurity ? factory.createTopicConnection(username,password): factory.createTopicConnection();
-            }
-            
-            jmsConnection.setExceptionListener(new ExceptionListener() {
-                public void onException(JMSException arg0)
-                {
-                    removeSessionPool() ;
-                }
-            }) ;
-            jmsConnection.start();
         }
+        final boolean transacted = Boolean.valueOf(poolKey.get(JMSEpr.TRANSACTED_TAG));
         
         //Create a new Session
         ArrayList<Session> freeSessions = freeSessionsMap.get( acknowledgeMode );
         
         if (JMSEpr.QUEUE_TYPE.equals(destinationType)) {
-            logger.debug("Creating a new Queue session.");
-            QueueSession session = ((QueueConnection)jmsConnection).createQueueSession(false,acknowledgeMode);
+            QueueSession session = ((QueueConnection)jmsConnection).createQueueSession(transacted,acknowledgeMode);
                     
             freeSessions.add(session);
         } else if (JMSEpr.TOPIC_TYPE.equals(destinationType)) {
-            logger.debug("Creating a new Topic session.");
-            TopicSession session = ((TopicConnection) jmsConnection).createTopicSession(false,acknowledgeMode);
+            TopicSession session = ((TopicConnection) jmsConnection).createTopicSession(transacted,acknowledgeMode);
             freeSessions.add(session);
         } else {
             throw new ConnectionException("Unknown destination type");
@@ -206,7 +207,12 @@
                 inUseSessions.add(session);
                 return session ;
             } else if (inUseSessions.size()<MAX_SESSIONS) {
-                addAnotherSession(poolKey,acknowledgeMode);
+                try {
+                    addAnotherSession(poolKey,acknowledgeMode);
+                } catch (final NamingContextException nce) {
+                    throw new ConnectionException("Unexpected exception accessing Naming Context", nce) ;
+                }
+                
                 continue ;
             } else {
                 if (emitExpiry)
@@ -274,7 +280,9 @@
 		try
 		{
         	ArrayList<Session> sessions = freeSessionsMap.get(sessionToClose.getAcknowledgeMode());
-        	sessions.add(sessionToClose);
+        	if ( sessions != null )
+	        	sessions.add(sessionToClose);
+        	
             releaseSession(sessionToClose) ;
 		} catch (JMSException e)
 		{
@@ -291,7 +299,8 @@
     	try
 		{
 			ArrayList<Session> inUseSessions = inUseSessionsMap.get(sessionToClose.getAcknowledgeMode());
-            inUseSessions.remove(sessionToClose);
+			if ( inUseSessions != null )
+	            inUseSessions.remove(sessionToClose);
             notifyAll() ;
 		} catch (JMSException e)
 		{

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-17 14:13:26 UTC (rev 17929)
+++ 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-17 14:35:24 UTC (rev 17930)
@@ -66,8 +66,12 @@
      */
     public static JmsConnectionPool getPool(JMSEpr jmsEpr) throws ConnectionException, URISyntaxException
     {
-        return getPool(jmsEpr.getJndiEnvironment()
-                , jmsEpr.getConnectionFactory(), jmsEpr.getDestinationType(), jmsEpr.getJMSSecurityPrincipal(), jmsEpr.getJMSSecurityCredential());
+        return getPool(jmsEpr.getJndiEnvironment(), 
+        		jmsEpr.getConnectionFactory(), 
+        		jmsEpr.getDestinationType(), 
+                jmsEpr.getJMSSecurityPrincipal(), 
+                jmsEpr.getJMSSecurityCredential(),
+                jmsEpr.getTransacted());
     }
     /**
      * Returns the pool given the identifiers for the JMS provider.
@@ -81,8 +85,15 @@
     public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory, String destinationType)
         throws ConnectionException
     {
-    	return getPool(enviroment, connectionFactory, destinationType, null, null);
+    	return getPool(enviroment, connectionFactory, destinationType, null, null, false);
     }
+    public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory, String destinationType,
+    		final String username, final String password)
+        throws ConnectionException
+    {
+    	return getPool( enviroment, connectionFactory, destinationType, username, password, false );
+    	
+    }
     /**
      * Returns the pool given the identifiers for the JMS provider.
      * 
@@ -91,14 +102,15 @@
      * @param destinationType		- destinationType(Queue or Topic) for which a JMSConnectionPool should be retreived
      * @param username				- username that should be used to create the JMS Connection
      * @param password				- password that should be used to create the JMS Connection
+     * @param transacted			- should the JMS Session be transacted
      * @return <code>JmsConnectionPool</code>
      * @throws ConnectionException
      */
     public static JmsConnectionPool getPool(Properties enviroment, String connectionFactory, String destinationType,
-    		final String username, final String password)
+    		final String username, final String password, final boolean transacted)
         throws ConnectionException
     {
-        Map<String,String> poolKey = createPoolKey(enviroment, connectionFactory, destinationType, username, password);
+        Map<String,String> poolKey = createPoolKey(enviroment, connectionFactory, destinationType, username, password, transacted);
         final Map<Map<String, String>, JmsConnectionPool> poolMap = getMap() ;
         if (poolMap.containsKey(poolKey)) {
             return poolMap.get(poolKey);
@@ -118,7 +130,7 @@
      */
     public static Map<String, String> createPoolKey(Properties  environment, String connectionFactory, String destinationType) 
     {
-    	return createPoolKey( environment, connectionFactory, destinationType, null, null );
+    	return createPoolKey( environment, connectionFactory, destinationType, null, null, false );
     }
     /**
      * Creates a poolKey using the identifying parameters
@@ -131,7 +143,7 @@
      * @return
      */
     public static Map<String, String> createPoolKey(Properties  environment, String connectionFactory, String destinationType,
-    		final String username, final String password) 
+    		final String username, final String password, final boolean transacted) 
     {
         Map<String,String> poolKey = new HashMap<String,String>();
         if (environment!=null) {
@@ -147,6 +159,9 @@
         
         if (connectionFactory!=null)  poolKey.put(JMSEpr.CONNECTION_FACTORY_TAG, connectionFactory);
         if (destinationType!=null)    poolKey.put(JMSEpr.DESTINATION_TYPE_TAG, destinationType);
+        
+        poolKey.put(JMSEpr.TRANSACTED_TAG, String.valueOf(transacted));
+        
         return poolKey;
     }
     /**

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

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

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

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/Environment.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/Environment.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/Environment.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -192,4 +192,30 @@
 	
 	public static final String MESSAGE_TRACE = "org.jboss.soa.esb.messagetrace"; // on or off
 	public static final String PER_MESSAGE_TRACE = "org.jboss.soa.esb.permessagetrace"; // on or off
+	
+	// Configuration options for the Naming Context pooling.
+	/**
+	 * The maximum pool size.
+	 */
+	public static final String NAMING_CONTEXT_POOL_SIZE = "org.jboss.soa.esb.namingcontext.poolsize" ;
+	/**
+	 * The maximum sleep period when waiting for a naming context, specified in seconds.
+	 */
+        public static final String NAMING_CONTEXT_SLEEP_PERIOD = "org.jboss.soa.esb.namingcontext.sleepperiod" ;
+        /**
+         * The maximum number of retries when creating a naming context.
+         */
+        public static final String NAMING_CONTEXT_RETRY_COUNT = "org.jboss.soa.esb.namingcontext.retrycount" ;
+        /**
+         * The JBoss JNDI provider URL. 
+         */
+        public static final String JBOSS_PROVIDER_URL = "localhost";
+        /**
+         * The JBoss JNDI initial context factory. 
+         */
+        public static final String JBOSS_INITIAL_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory";
+        /**
+         * The JBoss JNDI URL package prefix. 
+         */
+        public static final String JBOSS_URL_PKG_PREFIX = ""; //"org.jboss.naming:org.jnp.interfaces"
 }

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContext.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContext.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContext.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -33,6 +33,7 @@
 /**
  * Obtains JNDI naming context.
  * 
+ * @deprecated {@link org.jboss.soa.esb.helpers.NamingContextPool}
  */
 public class NamingContext 
 {

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextException.java (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextException.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextException.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextException.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.helpers;
+
+/**
+ * Exception used for Naming Connection Pool errors.
+ */
+public class NamingContextException extends Exception
+{
+    /**
+     * The serial version UID for this exception.
+     */
+    private static final long serialVersionUID = 8246625119667566368L;
+
+    /**
+     * Create a naming context exception.
+     */
+    public NamingContextException()
+    {
+        super() ;
+    }
+
+    /**
+     * Create a naming context exception with the specified message.
+     * @param message The message associated with the exception.
+     */
+    public NamingContextException(final String message)
+    {
+        super(message) ;
+    }
+
+    /**
+     * Create a naming context exception with the specified cause.
+     * @param cause The cause associated with the exception.
+     */
+    public NamingContextException(final Throwable cause)
+    {
+        super(cause) ;
+    }
+
+    /**
+     * Create a naming context exception with the specified message and cause.
+     * @param message The message associated with the exception.
+     * @param cause The cause associated with the exception.
+     */
+    public NamingContextException(final String message, final Throwable cause)
+    {
+        super(message, cause) ;
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/helpers/NamingContextPool.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,522 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.helpers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.TreeMap;
+import java.util.Map.Entry;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.lifecycle.LifecyclePriorities;
+import org.jboss.soa.esb.lifecycle.LifecycleResource;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceException;
+import org.jboss.soa.esb.lifecycle.LifecycleResourceFactory;
+
+import com.arjuna.common.util.propertyservice.PropertyManager;
+
+/**
+ * Pool for Naming Contexts.
+ * 
+ * @author <a href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
+ */
+public class NamingContextPool
+{
+    /**
+     * Logger for this class
+     */
+    private static final Logger LOGGER = Logger.getLogger(NamingContextPool.class);
+    /**
+     * Default maximum pool size.
+     */
+    private static final int DEFAULT_POOL_SIZE = 20 ;
+    /**
+     * Default sleep period.
+     */
+    private static final int DEFAULT_SLEEP_PERIOD = 30 ;
+    /**
+     * Default retry count for creating Naming Contexts.
+     */
+    private static final int DEFAULT_RETRY_COUNT = 10 ;
+    /**
+     * Default key for environments.
+     */
+    private static final String DEFAULT_KEY = "<empty key>" ;
+    /**
+     * Maximum pool size.
+     */
+    private static final int POOL_SIZE ;
+    /**
+     * Sleep period.
+     */
+    private static final int SLEEP_PERIOD ;
+    /**
+     * Retry count for creating Naming Contexts.
+     */
+    private static final int RETRY_COUNT ;
+
+    /**
+     * The lifecycle resource factory.
+     */
+    private static final LifecycleResourceFactory<NamingContextPool> lifecycleNamingContextPoolFactory =
+        new NamingContextPoolFactory();
+
+    /**
+     * The lifecycle Naming Context pools.
+     */
+    private static final LifecycleResource<NamingContextPool> lifecycleNamingContextPoolResource =
+        new LifecycleResource<NamingContextPool>(lifecycleNamingContextPoolFactory,
+            LifecyclePriorities.NAMING_CONTEXT_POOL_PRIORITY);
+    
+    /**
+     * The free contexts.
+     */
+    private final Map<String, List<Context>> freeContexts = new HashMap<String, List<Context>>() ;
+    /**
+     * The free contexts in insertion order.
+     */
+    private final Map<Context, String> freeContextOrder = new LinkedHashMap<Context, String>() ;
+    /**
+     * The in use contexts.
+     */
+    private final Map<Context, String> inUseContexts = new HashMap<Context, String>() ;
+    /**
+     * The count of created contexts.
+     */
+    private int numContexts ;
+    /**
+     * True if the pool has been destroyed.
+     */
+    private boolean destroyed ;
+    
+    /**
+     * Private constructor.
+     */
+    private NamingContextPool()
+    {
+    }
+    
+    /**
+     * Get a Naming Context from the pool.
+     * @param env The JNDI environment parameters for the Naming Context.
+     * @return The Naming Context.
+     * @throws NamingContextException for errors obtaining a Naming Context.
+     */
+    Context getContext(final Properties env)
+        throws NamingContextException
+    {
+        final long end = System.currentTimeMillis() + (SLEEP_PERIOD * 1000) ;
+        final String key = getKey(env) ;
+        boolean emitExpiry = LOGGER.isDebugEnabled() ;
+        synchronized(this)
+        {
+            while(true)
+            {
+                if (destroyed)
+                {
+                    throw new NamingContextException("Naming Context Pool has been previosuly destroyed") ;
+                }
+                final Context context = getContext(env, key) ;
+                if (context != null)
+                {
+                    return context ;
+                }
+                if (emitExpiry)
+                {
+                    LOGGER.debug("The Naming Context pool was exhausted, waiting for one to be released.") ;
+                    emitExpiry = false ;
+                }
+                final long now = System.currentTimeMillis() ;
+                final long delay = (end - now) ;
+                if (delay <= 0)
+                {
+                    throw new NamingContextException("Could not obtain a Naming Context from the pool after " + SLEEP_PERIOD + "s.") ;
+                }
+                else
+                {
+                    try
+                    {
+                        wait(delay) ;
+                    }
+                    catch (final InterruptedException ie) {} // ignore
+                }
+            }
+        }
+    }
+    
+    /**
+     * Release the Naming Context back into the pool.
+     * @param context The Naming Context.
+     * @throws NamingContextException for errors releasing the Naming Context.
+     */
+    synchronized void releaseContext(final Context context)
+        throws NamingContextException
+    {
+        if (destroyed)
+        {
+            throw new NamingContextException("Naming Context Pool has been previosuly destroyed") ;
+        }
+        final String key = inUseContexts.remove(context) ;
+        if (key == null)
+        {
+            throw new NamingContextException("Cannot release a context which is not in use.") ;
+        }
+        
+        freeContextOrder.put(context, key) ;
+        final List<Context> contexts = freeContexts.get(key) ;
+        if (contexts != null)
+        {
+            contexts.add(context) ;
+        }
+        else
+        {
+            final List<Context> newContexts = new ArrayList<Context>() ;
+            newContexts.add(context) ;
+            freeContexts.put(key, newContexts) ;
+        }
+        
+        notifyAll() ;
+    }
+    
+    /**
+     * Replace the specified Naming Context.
+     * @param context The Naming Context to replace.
+     * @param env The JNDI environment parameters for the Naming Context.
+     * @return The new Naming Context
+     * @throws NamingContextException for errors releasing the Naming Context.
+     */
+    synchronized Context replaceContext(final Context context, final Properties env)
+        throws NamingContextException
+    {
+        if (destroyed)
+        {
+            throw new NamingContextException("Naming Context Pool has been previosuly destroyed") ;
+        }
+        final String key = inUseContexts.remove(context) ;
+        if (key == null)
+        {
+            throw new NamingContextException("Cannot release a context which is not in use.") ;
+        }
+        
+        numContexts-- ;
+        closeContext(context) ;
+        return createContext(env, key) ;
+    }
+
+    /**
+     * Closes all Contexts, and removes them from the contextCache.
+     */
+    synchronized void closeAllContexts()
+    {
+        closeAllContexts(freeContextOrder.keySet().iterator()) ;
+        if (inUseContexts.size() > 0)
+        {
+            LOGGER.warn("Forcing closure of in-use Naming Contexts") ;
+            closeAllContexts(inUseContexts.keySet().iterator()) ;
+        }
+        inUseContexts.clear() ;
+        freeContextOrder.clear() ;
+        freeContexts.clear() ;
+        destroyed = true ;
+    }
+    
+    /**
+     * Get a Naming Context from the pool.
+     * @param env The JNDI environment parameters for the Naming Context.
+     * @param key The key of the context to locate.
+     * @return The Naming Context.
+     * @throws NamingContextException for errors obtaining a Naming Context.
+     */
+    private Context getContext(final Properties env, final String key)
+        throws NamingContextException
+    {
+        final Context context = getFreeContext(key) ;
+        if (context != null)
+        {
+            return context ;
+        }
+        if (numContexts == POOL_SIZE)
+        {
+            if (freeContextOrder.size() == 0)
+            {
+                return null ;
+            }
+            final Iterator<Entry<Context, String>> freeContextIter = freeContextOrder.entrySet().iterator() ;
+            final Entry<Context, String> freeContextEntry = freeContextIter.next() ;
+            final Context freeContext = freeContextEntry.getKey() ;
+            final String freeContextKey = freeContextEntry.getValue() ;
+            if (LOGGER.isDebugEnabled())
+            {
+                LOGGER.debug("Ejecting Naming Context from pool, key: " + freeContextKey) ;
+            }
+            
+            freeContextOrder.remove(freeContext) ;
+            final List<Context> contexts = freeContexts.get(key) ;
+            contexts.remove(freeContext) ;
+            if (contexts.size() == 0)
+            {
+                freeContexts.remove(key) ;
+            }
+            
+            numContexts-- ;
+            closeContext(freeContext) ;
+        }
+        return createContext(env, key) ;
+    }
+    
+    /**
+     * Get a free Naming Context from the available list
+     * @param key The key of the context to return.
+     * @return The Naming Context or null if none present
+     */
+    private Context getFreeContext(final String key)
+    {
+        final List<Context> contexts = freeContexts.get(key) ;
+        if (contexts != null)
+        {
+            final int size = contexts.size() ;
+            if (size > 0)
+            {
+                final Context context = contexts.remove(size-1) ;
+                freeContextOrder.remove(context) ;
+                inUseContexts.put(context, key) ;
+                return context ;
+            }
+        }
+        return null ;
+    }
+    
+    /**
+     * Create the context with the specified environment and key.
+     * @param env The JNDI environment parameters for the Naming Context.
+     * @param key The key of the context to locate.
+     * @return The Naming Context.
+     * @throws NamingContextException for errors obtaining a Naming Context.
+     */
+    private Context createContext(final Properties env, final String key)
+        throws NamingContextException
+    {
+        NamingException cachedException = null ;
+        
+        for(int count = 0 ; count < RETRY_COUNT ; count++)
+        {
+            final Context context ;
+            try
+            {
+                context = new InitialContext(env) ;
+                
+                try
+                {
+                    context.list("__dummy2@#$%") ;
+                }
+                catch (final NameNotFoundException nfne) {} // Expected
+            }
+            catch (final NamingException ne)
+            {
+                cachedException = ne ;
+                continue ;
+            }
+            
+            inUseContexts.put(context, key) ;
+            numContexts++ ;
+            return context ;
+        }
+        
+        throw new NamingContextException("Failed to create Naming Context", cachedException) ;
+    }
+    
+    /**
+     * Close all the specified contexts.
+     * @param contextIter The iterator of Naming Contexts.
+     */
+    private void closeAllContexts(Iterator<Context> contextIter)
+    {
+        while(contextIter.hasNext())
+        {
+            closeContext(contextIter.next()) ;
+        }
+    }
+    
+    /**
+     * Close the specified Naming Context.
+     * @param context The Naming Context to close.
+     */
+    private void closeContext(final Context context)
+    {
+        try
+        {
+            context.close() ;
+        }
+        catch (final NamingException ne) {} // ignore
+    }
+    
+    static
+    {
+        final PropertyManager prop = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE);
+        POOL_SIZE = getIntProperty(prop, Environment.NAMING_CONTEXT_POOL_SIZE, DEFAULT_POOL_SIZE);
+        SLEEP_PERIOD = getIntProperty(prop, Environment.NAMING_CONTEXT_SLEEP_PERIOD, DEFAULT_SLEEP_PERIOD);
+        RETRY_COUNT = getIntProperty(prop, Environment.NAMING_CONTEXT_RETRY_COUNT, DEFAULT_RETRY_COUNT);
+    }
+    
+    /**
+     * Get a Naming Context from the pool.
+     * @param properties The properties of the JNDI environment.
+     * @return the pooled Naming Context.
+     */
+    public static Context getNamingContext(final Properties properties)
+        throws NamingContextException
+    {
+        return getPool().getContext(properties) ;
+    }
+    
+    /**
+     * Release the Naming Context back into the pool.
+     * @param context The Naming Context to release.
+     */
+    public static void releaseNamingContext(final Context context)
+        throws NamingContextException
+    {
+        getPool().releaseContext(context) ;
+    }
+    
+    /**
+     * Close the Naming Context and remove from the pool.
+     * @param context The Naming Context to close.
+     * @param env The JNDI environment parameters for the Naming Context.
+     */
+    public static Context replaceNamingContext(final Context context, final Properties env)
+        throws NamingContextException
+    {
+        return getPool().replaceContext(context, env) ;
+    }
+    
+    /**
+     * Get the Naming Context pool.
+     * @return The Naming Context pool.
+     * @throws NamingContextException For errors retrieving the Naming Context pool.
+     */
+    private static NamingContextPool getPool()
+        throws NamingContextException
+    {
+        try
+        {
+            return lifecycleNamingContextPoolResource.getLifecycleResource() ;
+        }
+        catch (final LifecycleResourceException lre)
+        {
+            throw new NamingContextException("Unexpected lifecycle resource exception", lre) ;
+        }
+    }
+    
+    /**
+     * Takes properties and serializes this into a long string which is the key
+     * into the contextCache.
+     * 
+     * @param properties -
+     *                property Bag.
+     * @return key into the contextCache.
+     */
+    private static String getKey(Properties properties)
+    {
+        if ((properties == null) || (properties.size() == 0))
+        {
+            return DEFAULT_KEY ;
+        }
+        
+        final TreeMap<String, String> orderedProperties = new TreeMap<String, String>() ;
+        final Iterator<Entry<Object, Object>> entryIter = properties.entrySet().iterator() ;
+        while(entryIter.hasNext())
+        {
+            final Entry<Object, Object> entry = entryIter.next() ;
+            orderedProperties.put(entry.getKey().toString(), entry.getValue().toString()) ;
+        }
+        return orderedProperties.toString() ;
+    }
+    
+    /**
+     * Get the integer value of the specified property.
+     * @param prop The property manager.
+     * @param name The property name.
+     * @param defaultValue The default value.
+     * @return The integer value of the property or the default value.
+     */
+    private static int getIntProperty(final PropertyManager prop, final String name, final int defaultValue)
+    {
+        final String value = prop.getProperty(name) ;
+        if (value != null)
+        {
+            try
+            {
+                return Integer.parseInt(value) ;
+            }
+            catch (final NumberFormatException nfe)
+            {
+                LOGGER.warn("Could not parse value for property: " + name + ", value: " + value) ;
+            }
+        }
+        return defaultValue ;
+    }
+    
+    /**
+     * The factory for creating and destroying lifecycle resources.
+     */
+    private static class NamingContextPoolFactory implements LifecycleResourceFactory<NamingContextPool>
+    {
+        /**
+         * Create a resource object which will be associated with the specified lifecycle identity.
+         * @param lifecycleIdentity The associated lifecycle identity.
+         * @return The lifecycle resource
+         * @throws LifecycleResourceException for errors during construction.
+         */
+        public NamingContextPool createLifecycleResource(final String lifecycleIdentity)
+            throws LifecycleResourceException
+        {
+            return new NamingContextPool() ;
+        }
+        
+        /**
+         * Destroy a resource object which is associated with the specified lifecycle identity.
+         * @param resource The lifecycle resource.
+         * @param lifecycleIdentity The associated lifecycle identity.
+         * @return The lifecycle resource.
+         * @throws LifecycleResourceException for errors during destroy.
+         */
+        public void destroyLifecycleResource(final NamingContextPool resource,
+            final String lifecycleIdentity)
+            throws LifecycleResourceException
+        {
+            resource.closeAllContexts() ;
+        }
+    }
+}

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecyclePriorities.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecyclePriorities.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecyclePriorities.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -45,4 +45,9 @@
      * The JMS connection pool priority.
      */
     public static final int JMS_CONNECTION_POOL_PRIORITY = 200000 ;
+    
+    /**
+     * The Naming Context pool priority.
+     */
+    public static final int NAMING_CONTEXT_POOL_PRIORITY = 400000 ;
 }

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/lifecycle/LifecycleResourceManager.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -283,7 +283,7 @@
         {
             resourceLock.unlock() ;
         }
-        // Not touching this yet, needs reworking
+        // NamingContext has been replaced by NamingContextPool and is now deprecated
         NamingContext.closeAllContexts() ;
     }
     

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerUtil.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -144,7 +144,8 @@
 					Boolean.valueOf(tree.getAttribute(JMSEpr.PERSISTENT_TAG)),
 					tree.getAttribute(JMSEpr.ACKNOWLEDGE_MODE_TAG),
 					username,
-					password);
+					password,
+					Boolean.valueOf(tree.getAttribute(JMSEpr.TRANSACTED_TAG)));
 			return epr;
 		}
 		catch (Exception e)

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/config/mappers/JmsListenerMapper.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -147,6 +147,7 @@
 		toElement.setAttribute(JMSEpr.ACKNOWLEDGE_MODE_TAG, messageFilter.getAcknowledgeMode());
 		toElement.setAttribute(JMSEpr.JMS_SECURITY_PRINCIPAL_TAG, messageFilter.getJmsSecurityPrincipal());
 		toElement.setAttribute(JMSEpr.JMS_SECURITY_CREDENTIAL_TAG, messageFilter.getJmsSecurityCredential());
+		toElement.setAttribute(JMSEpr.TRANSACTED_TAG, Boolean.toString( messageFilter.getTransacted()));
 	}
 
     private static void mapJmsJcaAttributes(final JmsListener listener,

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

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

Modified: labs/jbossesb/workspace/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-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/NotifyJMS.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -157,13 +157,6 @@
 	 */
 	public static final String TIME_TO_LIVE_ATTR = "time-to-live";
 	
-	/**
-	 * This object holds the JNDI naming context that will be used to obtain a
-	 * JMS destination (javax.jms.Destination) to send/publish the notification
-	 * at sendNotification() time
-	 */
-	protected Context[] contexts;
-
 	private Properties m_oProps = new Properties();
 
 	/**
@@ -231,25 +224,6 @@
     } // __________________________________
 
 	/**
-	 * Performs an orderly release of all JMS resources utilized - Well behaved
-	 * developers should always call this method before unreferencing this
-	 * object
-	 */
-	public void release ()
-	{
-        for (int i=0; i<connectionPools.length; i++) {
-        	connectionPools[i].closeSession(sessions[i]);
-            if (contexts[i]!=null) {
-                try {
-                    contexts[i].close();
-                } catch (NamingException ne) {
-                    log.error(ne.getMessage(), ne);
-                }
-            }
-        }
-	}
-
-	/**
 	 * Send a JMS message using p_o to fill in the message content and the list
 	 * of message properties that will be added to the JMS message header fields
 	 * 
@@ -330,8 +304,6 @@
 	 */
 	protected void sendToAll (final Message p_oMsg) throws JMSException
 	{
-		try 
-		{
             final StringBuilder jmsExceptions = new StringBuilder();
 			for (int i1 = 0; i1 < producers.length; i1++)
 			{
@@ -348,11 +320,6 @@
 			}
 			if ( jmsExceptions.length() > 0 )
 				throw new JMSException( jmsExceptions.toString() );
-		}
-		finally
-		{
-			release();
-		}
 	}
 	
 	/**
@@ -371,7 +338,6 @@
 		final int nrQueuesOrTopics = configTrees.length;
 		producers = new MessageProducer[nrQueuesOrTopics];
         connectionPools = new JmsConnectionPool[nrQueuesOrTopics];
-        contexts = new Context[nrQueuesOrTopics];
         sessions = new Session[nrQueuesOrTopics];
         deliveryModes = new int[nrQueuesOrTopics];
         priorities = new int[nrQueuesOrTopics];

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

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

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetter.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetter.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/jms/DefaultJMSPropertiesSetter.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -48,14 +48,15 @@
 {
 	private Logger log = Logger.getLogger( DefaultJMSPropertiesSetter.class );
 	
-        /**
-         * Client JMSX Group ID.
-         */
-        private static final String JMSX_GROUP_ID = "JMSXGroupID" ;
-        /**
-         * Client JMSX Group Seq.
-         */
-        private static final String JMSX_GROUP_SEQ = "JMSXGroupSeq" ;
+    /**
+     * Client JMSX Group ID.
+     */
+    private static final String JMSX_GROUP_ID = "JMSXGroupID" ;
+    /**
+     * Client JMSX Group Seq.
+     */
+    private static final String JMSX_GROUP_SEQ = "JMSXGroupSeq" ;
+    
 	/**
      * Set JMS Header fields on the outgoing JMS Message.
      * </p>

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/jms/JMSPropertiesSetter.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/jms/JMSPropertiesSetter.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/notification/jms/JMSPropertiesSetter.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -40,6 +40,12 @@
 	String JMS_EXPIRATION = "javax.jms.message.expiration";
 	
 	/**
+	 * Key used when setting the JMSRedelivered as a 
+	 * property on an ESB Message instance.
+	 */
+	String JMS_REDELIVERED = "javax.jms.message.redelivered";
+	
+	/**
      * Sets JMS properties fields on the outgoing JMS Message.
      * </p>
      * 

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/JmsCourierIntegrationTest.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
+ * individual contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of individual
+ * contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.couriers;
+
+import static org.junit.Assert.*;
+
+import java.util.Properties;
+
+import javax.jms.JMSException;
+import javax.jms.Session;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.couriers.CourierException;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * Unit test for JmsCourier
+ * 
+ * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
+ *
+ */
+public class JmsCourierIntegrationTest
+{
+	@SuppressWarnings("unused")
+	private Logger log = Logger.getLogger( JmsCourierIntegrationTest.class );
+	
+	private JmsCourier jmsCourier;
+	
+	@Test
+	public void getJmsSession() throws CourierException, JMSException
+	{
+		Session jmsSession = jmsCourier.getJmsSession();
+		assertTrue( jmsSession.getTransacted() );
+		jmsCourier.cleanup();
+	}
+	
+	@Before
+	public void createJmsCourierInstance() throws CourierException
+	{
+		final Properties env = null;
+		final String messageSelector = null;
+		final boolean persistent = true;
+		final boolean transacted = true;
+		JMSEpr epr = new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, 
+				JMSEpr.QUEUE_TYPE, 
+				"queue/A",
+				"ConnectionFactory",
+				env,
+				messageSelector,
+				persistent,
+				transacted);
+		jmsCourier = new JmsCourier( epr );
+	}
+	
+	public static junit.framework.Test suite()
+	{
+		return new JUnit4TestAdapter( JmsCourierIntegrationTest.class );
+	}
+
+}

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/JmsConnectionPoolContainerUnitTest.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -74,12 +74,31 @@
 		final String password = "passwd";
 		final Properties env = null;
 		Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE,
-				username, password);
+				username, password, false);
 		assertEquals( username, poolKey.get( JMSEpr.JMS_SECURITY_PRINCIPAL_TAG ) );
 		assertEquals( password, poolKey.get( JMSEpr.JMS_SECURITY_CREDENTIAL_TAG ) );
 	}
 	
+	@Test
+	public void createPoolKey_with_transacted_properties()
+	{
+		final boolean transacted = true;
+		final Properties env = null;
+		Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE,
+				null, null, transacted);
+		assertEquals( transacted, Boolean.valueOf ( poolKey.get( JMSEpr.TRANSACTED_TAG ) ) );
+	}
 	
+	@Test
+	public void createPoolKey_with_non_transacted_properties()
+	{
+		final boolean transacted = false;
+		final Properties env = null;
+		Map<String, String> poolKey = JmsConnectionPoolContainer.createPoolKey( env, connectionFactory, QUEUE_TYPE,
+				null, null, transacted);
+		assertEquals( transacted, Boolean.valueOf ( poolKey.get( JMSEpr.TRANSACTED_TAG ) ) );
+	}
+	
 	public static junit.framework.Test suite()
 	{
 		return new JUnit4TestAdapter( JmsConnectionPoolContainerUnitTest.class );

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/JMSEprUnitTest.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -208,6 +208,29 @@
 		assertEquals( Session.DUPS_OK_ACKNOWLEDGE, ackMode.getAcknowledgeModeInt() );
 	}
 	
+	@Test
+	public void contstructor_non_transacted() throws CourierException, URISyntaxException
+	{
+		JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
+				expectedConnectionFactory,
+				nullEnvironment, expectedSelector, 
+				NON_PERSISTENT);
+		
+		assertEquals( false, jmsEpr.getTransacted() );
+	}
+	
+	@Test
+	public void contstructor_transacted() throws CourierException, URISyntaxException
+	{
+		final boolean transacted = true;
+		JMSEpr jmsEpr = new JMSEpr( ONE_ONE_PROTOCOL, expectedDestinationType, expectedDestination , 
+				expectedConnectionFactory,
+				nullEnvironment, expectedSelector, 
+				NON_PERSISTENT, transacted);
+		
+		assertEquals( transacted, jmsEpr.getTransacted() );
+	}
+	
 	private void assertDefaults(final String destination, final String connectionFactory, final String destinationType)
 	{
 		assertEquals( expectedDestination, destination );

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

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

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

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

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.xml	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/config/jbossesb_config_02.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -13,6 +13,7 @@
 				<property name="message-selector" value="service='Reconciliation'"/>
 				<property name="persistent" value="true" />
 				<property name="acknowledge-mode" value="AUTO_ACKNOWLEDGE" />
+				<property name="transacted" value="false" />
 			</bus>
 		</bus-provider>
 		
@@ -29,6 +30,7 @@
 				<property name="message-selector" value="service='Reconciliation'" />
 				<property name="persistent" value="true" />
 				<property name="acknowledge-mode" value="AUTO_ACKNOWLEDGE" />
+				<property name="transacted" value="false" />
 			</bus>
 		</bus-provider>
 		

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetterUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetterUnitTest.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/DefaultESBPropertiesSetterUnitTest.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -128,6 +128,17 @@
 		assertEquals( propertyValue, toESBMessage.getProperties().getProperty( propertyKey )) ;
 	}
 	
+	@Test
+	public void setPropertiesFromJMSMessage_withJMSRedelivererdProperty_false() throws JMSException
+	{
+		boolean redelivered = false;
+		fromJMSTextMessage.setJMSRedelivered( redelivered );
+		
+		strategy.setPropertiesFromJMSMessage( fromJMSTextMessage , toESBMessage );
+		
+		assertEquals( redelivered, toESBMessage.getProperties().getProperty( JMSPropertiesSetter.JMS_REDELIVERED )) ;
+	}
+	
 	@Before
 	public void setup()
 	{

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/notification/NotifyQueuesUnitTest.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -25,46 +25,29 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import java.io.Serializable;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.nio.ByteBuffer;
 
-import javax.jms.BytesMessage;
 import javax.jms.DeliveryMode;
-import javax.jms.Destination;
 import javax.jms.ExceptionListener;
 import javax.jms.JMSException;
-import javax.jms.MapMessage;
 import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
 import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
 import javax.jms.QueueConnection;
-import javax.jms.QueueSender;
-import javax.jms.Session;
-import javax.jms.StreamMessage;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
 import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
 import javax.naming.Context;
-import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
 import junit.framework.JUnit4TestAdapter;
 
 import org.apache.log4j.Logger;
 import org.jboss.internal.soa.esb.rosetta.pooling.ConnectionException;
-import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.body.content.BytesBody;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 import org.jboss.soa.esb.message.format.MessageFactory;
 import org.jboss.soa.esb.message.format.MessageType;
 import org.junit.After;
@@ -72,7 +55,6 @@
 import org.junit.Test;
 import org.mockejb.jms.MockQueue;
 import org.mockejb.jms.MockTopic;
-import org.mockejb.jms.ObjectMessageImpl;
 import org.mockejb.jms.QueueConnectionFactoryImpl;
 import org.mockejb.jndi.MockContextFactory;
 
@@ -94,10 +76,16 @@
 	@Before
 	public void setUp() {
         try {
-    		MockContextFactory.setAsInitial();		
-    		Context ctx = new InitialContext();
-    		ctx.rebind(NotifyQueues.CONNECTION_FACTORY, new MockQueueConnectionFactory());
-    		ctx.close();
+    		MockContextFactory.setAsInitial();
+                final Context ctx = NamingContextPool.getNamingContext(null);
+                try
+                {
+                    ctx.rebind(NotifyQueues.CONNECTION_FACTORY, new MockQueueConnectionFactory());
+                }
+                finally
+                {
+                    NamingContextPool.releaseNamingContext(ctx) ;
+                }
     		rootEl = new ConfigTree("rootEl");
     
     		addMessagePropertyConfigs(rootEl);
@@ -115,9 +103,6 @@
 	
 	@After
 	public void tearDown() throws Exception {
-        if(notifyQueues != null) {
-            notifyQueues.release();
-        }
         MockContextFactory.revertSetAsInitial();
 	}
 	
@@ -172,12 +157,6 @@
 		assertEquals( 600l, notifyQueues.timeToLives[0] );
 	}
 	
-	@Test
-	public void release() 
-	{
-		notifyQueues.release();
-	}
-	
 	private void checkQueueTextMessage(MockQueue mockQueue, int messageIdx, String expectedText) throws JMSException {
 		assertTrue(mockQueue.getMessages().size() > messageIdx);		
 		Message message = mockQueue.getMessageAt(0);
@@ -220,22 +199,34 @@
 		queueEl.setAttribute(NotifyJMS.ATT_DEST_NAME, queueName);
 	}
 
-	private MockQueue createAndBindQueue(String queueName) throws NamingException {
+	private MockQueue createAndBindQueue(String queueName) throws NamingException, NamingContextException {
 		MockQueue mockQueue = new MockQueue(queueName);
 				
-		Context ctx = new InitialContext();
-		ctx.rebind(queueName, mockQueue);
-		ctx.close();
+                final Context ctx = NamingContextPool.getNamingContext(null);
+                try
+                {
+                    ctx.rebind(queueName, mockQueue);
+                }
+                finally
+                {
+                    NamingContextPool.releaseNamingContext(ctx) ;
+                }
 		return mockQueue;
 	}
 
 	@SuppressWarnings("unused")
-	private MockTopic createAndBindTopic(String topicName) throws NamingException {
+	private MockTopic createAndBindTopic(String topicName) throws NamingException, NamingContextException {
 		MockTopic mockTopic = new MockTopic(topicName);
 		
-		Context ctx = new InitialContext();
-		ctx.rebind(topicName, mockTopic);
-		ctx.close();
+		final Context ctx = NamingContextPool.getNamingContext(null);
+		try
+		{
+		    ctx.rebind(topicName, mockTopic);
+		}
+		finally
+		{
+		    NamingContextPool.releaseNamingContext(ctx) ;
+		}
 		return mockTopic;
 	}
         

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

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/rosetta/pooling/JmsConnectionPoolingIntegrationTest.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -33,10 +33,8 @@
 import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool;
 import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPoolContainer;
 import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.jboss.soa.esb.helpers.NamingContext;
-import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
+import org.jboss.soa.esb.common.Environment;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
@@ -194,9 +192,9 @@
     public Properties getEnvironment()
     {
     	  Properties environment = new Properties();
-          environment.setProperty(Context.PROVIDER_URL, NamingContext.JBOSS_PROVIDER_URL);
-          environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, NamingContext.JBOSS_INITIAL_CONTEXT_FACTORY);
-          environment.setProperty(Context.URL_PKG_PREFIXES, NamingContext.JBOSS_URL_PKG_PREFIX);
+          environment.setProperty(Context.PROVIDER_URL, Environment.JBOSS_PROVIDER_URL);
+          environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, Environment.JBOSS_INITIAL_CONTEXT_FACTORY);
+          environment.setProperty(Context.URL_PKG_PREFIXES, Environment.JBOSS_URL_PKG_PREFIX);
           return environment;
     }
     

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/helloworld_tx_sql_action/jboss-esb.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -13,8 +13,9 @@
           			status-column="STATUS_COL"
 				order-by="DATA_COLUMN"	
 				where-condition="DATA_COLUMN like 'data%'"
-
+					message-column="message"
           			message-id-column="UNIQUE_ID"
+          			insert-timestamp-column="TIMESTAMP_COL"
           		/>
           	</sql-bus>
           </sql-provider>

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted)

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

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

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/deployment.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/deployment.xml	2008-01-17 11:12:03 UTC (rev 17918)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/deployment.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -1,4 +0,0 @@
-<jbossesb-deployment>
-  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb</depends>
-  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw</depends>
-</jbossesb-deployment>

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/deployment.xml (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/deployment.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/deployment.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/deployment.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,4 @@
+<jbossesb-deployment>
+  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb</depends>
+  <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw</depends>
+</jbossesb-deployment>

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml	2008-01-17 11:12:03 UTC (rev 17918)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw"
-    xmbean-dd="xmdesc/Queue-xmbean.xml">
-    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-	<depends>jboss.messaging:service=PostOffice</depends>
-  </mbean>
-
-  <mbean code="org.jboss.jms.server.destination.QueueService"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb"
-    xmbean-dd="xmdesc/Queue-xmbean.xml">
-	<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
-	<depends>jboss.messaging:service=PostOffice</depends>
-  </mbean>
-
-</server>

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbm-queue-service.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+	<depends>jboss.messaging:service=PostOffice</depends>
+  </mbean>
+
+  <mbean code="org.jboss.jms.server.destination.QueueService"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb"
+    xmbean-dd="xmdesc/Queue-xmbean.xml">
+	<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+	<depends>jboss.messaging:service=PostOffice</depends>
+  </mbean>
+
+</server>

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml	2008-01-17 11:12:03 UTC (rev 17918)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
-  </mbean>
-
-  <mbean code="org.jboss.mq.server.jmx.Queue"
-    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb">
-    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
-	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
-  </mbean>
-</server>

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbmq-queue-service.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+  </mbean>
+
+  <mbean code="org.jboss.mq.server.jmx.Queue"
+    name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb">
+    <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
+	<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
+  </mbean>
+</server>

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jboss-esb.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/jboss-esb.xml	2008-01-17 11:12:03 UTC (rev 17918)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jboss-esb.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -1,71 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
-
-    <providers>
-          <jms-jca-provider name="JBossMessaging" connection-factory="XAConnectionFactory"
-                        jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-                        jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-                      
-              <jms-bus busid="quickstartGwChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/quickstart_jms_transacted_Request_gw"
-					  transacted="true"
-                   />
-              </jms-bus>
-              <jms-bus busid="quickstartEsbChannel">
-                  <jms-message-filter
-                      dest-type="QUEUE"
-                      dest-name="queue/quickstart_jms_transacted_Request_esb"
-					  transacted="true"
-                  />
-              </jms-bus>
-
-          </jms-jca-provider>
-      </providers>
-      
-      <services>
-        <service 
-        	category="JMSSecuredESB" 
-        	name="SimpleListener" 
-        	description="JMS Secured quickstart sample">
-            <listeners>
-                <jms-listener name="JMS-Gateway"
-                    busidref="quickstartGwChannel"
-                    maxThreads="1"
-                    is-gateway="true"
-                />
-                <jms-listener name="jmssecured"
-                              busidref="quickstartEsbChannel"
-                              maxThreads="1"/>
-            </listeners>
-            <actions mep="OneWay">
-            
-				<action name="printMessage" class="org.jboss.soa.esb.actions.SystemPrintln">
-					<property name="message" value="JMS Transacted Quickstart start..."/>
-					<property name="printfull" value="false"/>
-				</action>
-
-				<action name="insertDBAction" class="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.DBInsertAction">
-					<property name="datasource-name" value="java:QuickstartDS"/>
-					<property name="db-insert-sql" value="insert into jms_transacted_table(data_column) values(?)"/>
-				</action>
-                    
-				<!-- 
-					Will throw an Exception upon every other first. This should trigger the transaction to be 
-					rolledback and the message placed back onto the JMS queue.
-				-->
-				<action name="throwExceptionAction" class="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction"/>
-				
-				<action name="printMessageDone" class="org.jboss.soa.esb.actions.SystemPrintln">
-					<property name="message" value="JMS Transacted Quickstart processed sucessfully"/>
-					<property name="printfull" value="false"/>
-				</action>
-				                    
-				<!-- The next action is for Continuous Integration testing -->
-				<action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
-            </actions>
-        </service>
-      </services>
-     
-</jbossesb>

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jboss-esb.xml (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/jboss-esb.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jboss-esb.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jboss-esb.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,71 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
+
+    <providers>
+          <jms-jca-provider name="JBossMessaging" connection-factory="XAConnectionFactory"
+                        jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+                        jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
+                      
+              <jms-bus busid="quickstartGwChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/quickstart_jms_transacted_Request_gw"
+					  transacted="true"
+                   />
+              </jms-bus>
+              <jms-bus busid="quickstartEsbChannel">
+                  <jms-message-filter
+                      dest-type="QUEUE"
+                      dest-name="queue/quickstart_jms_transacted_Request_esb"
+					  transacted="true"
+                  />
+              </jms-bus>
+
+          </jms-jca-provider>
+      </providers>
+      
+      <services>
+        <service 
+        	category="JMSSecuredESB" 
+        	name="SimpleListener" 
+        	description="JMS Secured quickstart sample">
+            <listeners>
+                <jms-listener name="JMS-Gateway"
+                    busidref="quickstartGwChannel"
+                    maxThreads="1"
+                    is-gateway="true"
+                />
+                <jms-listener name="jmssecured"
+                              busidref="quickstartEsbChannel"
+                              maxThreads="1"/>
+            </listeners>
+            <actions mep="OneWay">
+            
+				<action name="printMessage" class="org.jboss.soa.esb.actions.SystemPrintln">
+					<property name="message" value="JMS Transacted Quickstart start..."/>
+					<property name="printfull" value="false"/>
+				</action>
+
+				<action name="insertDBAction" class="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.DBInsertAction">
+					<property name="datasource-name" value="java:QuickstartDS"/>
+					<property name="db-insert-sql" value="insert into jms_transacted_table(data_column) values(?)"/>
+				</action>
+                    
+				<!-- 
+					Will throw an Exception upon every other first. This should trigger the transaction to be 
+					rolledback and the message placed back onto the JMS queue.
+				-->
+				<action name="throwExceptionAction" class="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction"/>
+				
+				<action name="printMessageDone" class="org.jboss.soa.esb.actions.SystemPrintln">
+					<property name="message" value="JMS Transacted Quickstart processed sucessfully"/>
+					<property name="printfull" value="false"/>
+				</action>
+				                    
+				<!-- The next action is for Continuous Integration testing -->
+				<action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
+            </actions>
+        </service>
+      </services>
+     
+</jbossesb>

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml	2008-01-17 11:12:03 UTC (rev 17918)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  JBoss, Home of Professional Open Source
-  Copyright 2006, JBoss Inc., and others contributors as indicated 
-  by the @authors tag. All rights reserved. 
-  See the copyright.txt in the distribution for a
-  full listing of individual contributors. 
-  This copyrighted material is made available to anyone wishing to use,
-  modify, copy, or redistribute it subject to the terms and conditions
-  of the GNU Lesser General Public License, v. 2.1.
-  This program is distributed in the hope that it will be useful, but WITHOUT A 
-  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
-  PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
-  You should have received a copy of the GNU Lesser General Public License,
-  v.2.1 along with this distribution; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
-  MA  02110-1301, USA.
-  
-  (C) 2005-2006,
-  @author JBoss Inc.
--->
-<!-- $Id: jbossesb-unittest-properties.xml $ -->
-<!--
-  These options are described in the JBossESB manual.
-  Defaults are provided here for convenience only.
- 
-  Please read through this file prior to using the system, and consider
-  updating the specified entries.
--->
-<esb
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
-    <properties name="core">
-		<property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
-		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
-		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
-    </properties>
-    <properties name="registry">      
-    	<property name="org.jboss.soa.esb.registry.queryManagerURI"     		
-    		value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>    		
-    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"     		
-    		value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
-    	<property name="org.jboss.soa.esb.registry.implementationClass" 
-    		value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.factoryClass" 
-    		value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.user" 
-    		value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.registry.password" 
-    	  value="password"/>
-    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
-    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" 
-    		value="org.apache.ws.scout.transport.RMITransport"/>
-    </properties>
-    <properties name="transports" depends="core">
-    	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
-    	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
-    	<property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
-    </properties>
-    <properties name="connection">
-    	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool=size" value="10"/>
-    	<property name="blocking-timeout-millis" value="5000"/>
-    	<property name="abandoned-connection-timeout" value="10000"/>
-    	<property name="abandoned-connection-time-interval" value="30000"/>
-    </properties>
-    <properties name="dbstore">
-		<property name="org.jboss.soa.esb.persistence.db.connection.url" 	value="jdbc:hsqldb:hsql://localhost:9001/"/>
-		<property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		value="org.hsqldb.jdbcDriver"/>
-		<property name="org.jboss.soa.esb.persistence.db.user" 			value="sa"/>
-		<property name="org.jboss.soa.esb.persistence.db.pwd" 			value=""/>		
-		<property name="org.jboss.soa.esb.persistence.db.pool.initial.size"	value="2"/>
-		<property name="org.jboss.soa.esb.persistence.db.pool.min.size"	value="2"/>
-		<property name="org.jboss.soa.esb.persistence.db.pool.max.size"	value="5"/>
-		<!--table managed by pool to test for valid connections - created by pool automatically -->
-		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
-		<!-- # of milliseconds to timeout waiting for a connection from pool -->
-		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
-                <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
-    </properties>
-    <properties name="messagerouting">
-    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
-    </properties>
-</esb>

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-properties.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2006, JBoss Inc., and others contributors as indicated 
+  by the @authors tag. All rights reserved. 
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors. 
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU Lesser General Public License, v. 2.1.
+  This program is distributed in the hope that it will be useful, but WITHOUT A 
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+  PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+  You should have received a copy of the GNU Lesser General Public License,
+  v.2.1 along with this distribution; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  MA  02110-1301, USA.
+  
+  (C) 2005-2006,
+  @author JBoss Inc.
+-->
+<!-- $Id: jbossesb-unittest-properties.xml $ -->
+<!--
+  These options are described in the JBossESB manual.
+  Defaults are provided here for convenience only.
+ 
+  Please read through this file prior to using the system, and consider
+  updating the specified entries.
+-->
+<esb
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
+    <properties name="core">
+		<property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
+		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
+		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+    </properties>
+    <properties name="registry">      
+    	<property name="org.jboss.soa.esb.registry.queryManagerURI"     		
+    		value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>    		
+    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"     		
+    		value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
+    	<property name="org.jboss.soa.esb.registry.implementationClass" 
+    		value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.factoryClass" 
+    		value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.user" 
+    		value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.registry.password" 
+    	  value="password"/>
+    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" 
+    		value="org.apache.ws.scout.transport.RMITransport"/>
+    </properties>
+    <properties name="transports" depends="core">
+    	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
+    	<property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
+    </properties>
+    <properties name="connection">
+    	<property name="min-pool-size" value="5"/>
+    	<property name="max-pool=size" value="10"/>
+    	<property name="blocking-timeout-millis" value="5000"/>
+    	<property name="abandoned-connection-timeout" value="10000"/>
+    	<property name="abandoned-connection-time-interval" value="30000"/>
+    </properties>
+    <properties name="dbstore">
+		<property name="org.jboss.soa.esb.persistence.db.connection.url" 	value="jdbc:hsqldb:hsql://localhost:9001/"/>
+		<property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		value="org.hsqldb.jdbcDriver"/>
+		<property name="org.jboss.soa.esb.persistence.db.user" 			value="sa"/>
+		<property name="org.jboss.soa.esb.persistence.db.pwd" 			value=""/>		
+		<property name="org.jboss.soa.esb.persistence.db.pool.initial.size"	value="2"/>
+		<property name="org.jboss.soa.esb.persistence.db.pool.min.size"	value="2"/>
+		<property name="org.jboss.soa.esb.persistence.db.pool.max.size"	value="5"/>
+		<!--table managed by pool to test for valid connections - created by pool automatically -->
+		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
+		<!-- # of milliseconds to timeout waiting for a connection from pool -->
+		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
+                <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
+    </properties>
+    <properties name="messagerouting">
+    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+    </properties>
+</esb>

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-service.xml
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/jbossesb-service.xml	2008-01-17 11:12:03 UTC (rev 17918)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-service.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
-   <mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
-       name="jboss.esb:service=QuickstartDatabaseInitializer">
-      <attribute name="Datasource">java:/QuickstartDS</attribute>
-      <attribute name="ExistsSql">select * from jms_transacted_table</attribute>
-      <attribute name="SqlFiles">
-	hsqldb/create.sql
-      </attribute>
-      <depends>jboss.jca:name=QuickstartDS,service=DataSourceBinding</depends>
-   </mbean>
-</server>

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-service.xml (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/jbossesb-service.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-service.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jbossesb-service.xml	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+   <mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
+       name="jboss.esb:service=QuickstartDatabaseInitializer">
+      <attribute name="Datasource">java:/QuickstartDS</attribute>
+      <attribute name="ExistsSql">select * from jms_transacted_table</attribute>
+      <attribute name="SqlFiles">
+	hsqldb/create.sql
+      </attribute>
+      <depends>jboss.jca:name=QuickstartDS,service=DataSourceBinding</depends>
+   </mbean>
+</server>

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jndi.properties
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/jndi.properties	2008-01-17 11:12:03 UTC (rev 17918)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jndi.properties	2008-01-17 14:35:24 UTC (rev 17930)
@@ -1,5 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jndi.properties (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/jndi.properties)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jndi.properties	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/jndi.properties	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+

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

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

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

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

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

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

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

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

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/hsqldb (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/hsqldb)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql	2008-01-17 11:12:03 UTC (rev 17918)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql	2008-01-17 14:35:24 UTC (rev 17930)
@@ -1,5 +0,0 @@
-create table jms_transacted_table
-(
-unique_id INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,
-data_column VARCHAR(255) NOT NULL
-);

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/hsqldb/create.sql	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,5 @@
+create table jms_transacted_table
+(
+unique_id INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,
+data_column VARCHAR(255) NOT NULL
+);

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org/jboss)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org/jboss/soa)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted)

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java	2008-01-17 11:12:03 UTC (rev 17918)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -1,106 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
- * individual contributors as indicated by the @authors tag. See the
- * copyright.txt in the distribution for a full listing of individual
- * contributors.
- * 
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- * 
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- * 
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.samples.quickstart.jmstransacted.test;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-
-import javax.naming.InitialContext;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.sql.DataSource;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.actions.ActionLifecycle;
-import org.jboss.soa.esb.actions.ActionLifecycleException;
-import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
- *
- */
-public class DBInsertAction implements ActionLifecycle
-{
-	private Logger log = Logger.getLogger( DBInsertAction.class );
-	
-	private String sql;
-	private String dataSourceName;
-	
-	private int counter = 1;
-	
-	public DBInsertAction(final ConfigTree config) throws ConfigurationException 
-	{
-		dataSourceName = config.getRequiredAttribute( "datasource-name" );
-		sql = config.getRequiredAttribute( "db-insert-sql" );
-		
-	}
-	
-	public Message process( final Message message ) throws ActionProcessingException
-	{
-		Connection con = null;
-		PreparedStatement stmnt = null;
-		final String inputText = message.getBody().get() + " counter[" + counter + "]";
-		try
-		{
-			con = getConnection();
-			stmnt = con.prepareStatement( sql );
-			stmnt.setString( 1, inputText );
-			int executeUpdate = stmnt.executeUpdate();
-			
-			if ( executeUpdate == 1 )
-				log.info("Successfully inserted [" + inputText + "] into jms_transacted_table");
-			else 
-				log.info("Failed to inserted [" + inputText + "] into jms_transacted_table");
-			
-			counter++;
-		}
-		catch (Exception e)
-		{
-			log.error( "Exception " , e );
-			throw new ActionProcessingException( e );
-		}
-		finally
-		{
-			if (stmnt != null) 	try { stmnt.close();} 	catch (SQLException e) { log.warn( e ); /* ignore */ }
-			if (con != null) 	try { con.close();  } 	catch (SQLException e) { log.warn( e ); /* ignore */ }
-		}
-
-		return message;
-	}
-
-	public void destroy() throws ActionLifecycleException { }
-
-	public void initialise() throws ActionLifecycleException { }
-	
-	private Connection getConnection() throws NamingException, SQLException
-	{
-		Context ctx = new InitialContext();
-		DataSource ds = (DataSource)ctx.lookup( dataSourceName );
-		return ds.getConnection();
-	}
-
-}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/DBInsertAction.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,106 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
+ * individual contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of individual
+ * contributors.
+ * 
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ * 
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.samples.quickstart.jmstransacted.test;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+import javax.naming.InitialContext;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.actions.ActionLifecycle;
+import org.jboss.soa.esb.actions.ActionLifecycleException;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * 
+ * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
+ *
+ */
+public class DBInsertAction implements ActionLifecycle
+{
+	private Logger log = Logger.getLogger( DBInsertAction.class );
+	
+	private String sql;
+	private String dataSourceName;
+	
+	private int counter = 1;
+	
+	public DBInsertAction(final ConfigTree config) throws ConfigurationException 
+	{
+		dataSourceName = config.getRequiredAttribute( "datasource-name" );
+		sql = config.getRequiredAttribute( "db-insert-sql" );
+		
+	}
+	
+	public Message process( final Message message ) throws ActionProcessingException
+	{
+		Connection con = null;
+		PreparedStatement stmnt = null;
+		final String inputText = message.getBody().get() + " counter[" + counter + "]";
+		try
+		{
+			con = getConnection();
+			stmnt = con.prepareStatement( sql );
+			stmnt.setString( 1, inputText );
+			int executeUpdate = stmnt.executeUpdate();
+			
+			if ( executeUpdate == 1 )
+				log.info("Successfully inserted [" + inputText + "] into jms_transacted_table");
+			else 
+				log.info("Failed to inserted [" + inputText + "] into jms_transacted_table");
+			
+			counter++;
+		}
+		catch (Exception e)
+		{
+			log.error( "Exception " , e );
+			throw new ActionProcessingException( e );
+		}
+		finally
+		{
+			if (stmnt != null) 	try { stmnt.close();} 	catch (SQLException e) { log.warn( e ); /* ignore */ }
+			if (con != null) 	try { con.close();  } 	catch (SQLException e) { log.warn( e ); /* ignore */ }
+		}
+
+		return message;
+	}
+
+	public void destroy() throws ActionLifecycleException { }
+
+	public void initialise() throws ActionLifecycleException { }
+	
+	private Connection getConnection() throws NamingException, SQLException
+	{
+		Context ctx = new InitialContext();
+		DataSource ds = (DataSource)ctx.lookup( dataSourceName );
+		return ds.getConnection();
+	}
+
+}

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java	2008-01-17 11:12:03 UTC (rev 17918)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated 
- * by the @authors tag. All rights reserved. 
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.jmstransacted.test;
-
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-/**
- * 
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
- *
- */
-public class SendJMSMessage 
-{
-    private QueueConnection connection;
-    private QueueSession session;
-    private Queue queue;
-    
-    public void setupConnection() throws JMSException, NamingException
-    {
-		InitialContext iniCtx = new InitialContext();
-
-    	QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
-    	
-    	connection = queueConnectionFactory.createQueueConnection();
-    	
-    	queue = (Queue) iniCtx.lookup("queue/quickstart_jms_transacted_Request_gw");
-    	session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	connection.start();
-    	System.out.println("Connection Started");
-    }
-    
-    public void stop() throws JMSException 
-    { 
-        connection.stop();
-        session.close();
-        connection.close();
-    }
-    
-    public void sendAMessage(String msg) throws JMSException {
-    	
-        QueueSender sender = session.createSender(queue);        
-        ObjectMessage objectMsg = session.createObjectMessage(msg);
-        
-        sender.send(objectMsg);        
-        sender.close();
-    }
-       
-    
-    public static void main(String args[]) throws Exception
-    {        	    	
-    	SendJMSMessage sm = new SendJMSMessage();
-    	sm.setupConnection();
-    	sm.sendAMessage(args[0]); 
-    	sm.stop();
-    }
-    
-}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/SendJMSMessage.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.jmstransacted.test;
+
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+/**
+ * 
+ * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
+ *
+ */
+public class SendJMSMessage 
+{
+    private QueueConnection connection;
+    private QueueSession session;
+    private Queue queue;
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+		InitialContext iniCtx = new InitialContext();
+
+    	QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
+    	
+    	connection = queueConnectionFactory.createQueueConnection();
+    	
+    	queue = (Queue) iniCtx.lookup("queue/quickstart_jms_transacted_Request_gw");
+    	session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	connection.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        connection.stop();
+        session.close();
+        connection.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender sender = session.createSender(queue);        
+        ObjectMessage objectMsg = session.createObjectMessage(msg);
+        
+        sender.send(objectMsg);        
+        sender.close();
+    }
+       
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	sm.setupConnection();
+    	sm.sendAMessage(args[0]); 
+    	sm.stop();
+    }
+    
+}

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java	2008-01-17 11:12:03 UTC (rev 17918)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated 
- * by the @authors tag. All rights reserved. 
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.jmstransacted.test;
-
-import static org.jboss.soa.esb.notification.jms.JMSPropertiesSetter.JMS_REDELIVERED;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.actions.ActionLifecycle;
-import org.jboss.soa.esb.actions.ActionLifecycleException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * ThrowExceptionAction is a simple action that throws an exception <br>
- * if the message has not been redelivered (first call to this action). 
- * </p>
- * Note that this class in only intended to be used with the
- * jms_transacted quickstart.
- * </p>
- * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
- *
- */
-public class ThrowExceptionAction implements ActionLifecycle
-{
-	private Logger log = Logger .getLogger( ThrowExceptionAction.class );
-	
-	public ThrowExceptionAction( final ConfigTree config ) { }
-	
-	/**
-	 * Checks if the ESB Messae property 'javax.jms.message.redelivered' 
-	 * is false, in which case an IllegalArgumentException will be thrown. <br>
-	 * This will will cause the message to be redelivered by JMS transaction 
-	 * handling.
-	 * 
-	 * @param message		- ESB Message object
-	 * @return Message		- unchanged ESB Message Object
-	 */
-	public Message process( final Message message )
-	{
-		final Boolean redelivered = (Boolean) message.getProperties().getProperty( JMS_REDELIVERED );
-		log.info("[" +JMS_REDELIVERED + ":" + redelivered + "]" );
-		
-		if ( redelivered )
-			return message;
-		else
-			throw new IllegalStateException( "[Throwing Exception to trigger a transaction rollback]");
-	}
-	
-	public void processException(final Message message, final Throwable th)   {  }
-	public void destroy() throws ActionLifecycleException {}
-	public void initialise() throws ActionLifecycleException {}
-	
-}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java (from rev 17918, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR7/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/jms_transacted/src/org/jboss/soa/esb/samples/quickstart/jmstransacted/test/ThrowExceptionAction.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.jmstransacted.test;
+
+import static org.jboss.soa.esb.notification.jms.JMSPropertiesSetter.JMS_REDELIVERED;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.actions.ActionLifecycle;
+import org.jboss.soa.esb.actions.ActionLifecycleException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * ThrowExceptionAction is a simple action that throws an exception <br>
+ * if the message has not been redelivered (first call to this action). 
+ * </p>
+ * Note that this class in only intended to be used with the
+ * jms_transacted quickstart.
+ * </p>
+ * @author <a href="mailto:daniel.bevenius at gmail.com">Daniel Bevenius</a>				
+ *
+ */
+public class ThrowExceptionAction implements ActionLifecycle
+{
+	private Logger log = Logger .getLogger( ThrowExceptionAction.class );
+	
+	public ThrowExceptionAction( final ConfigTree config ) { }
+	
+	/**
+	 * Checks if the ESB Messae property 'javax.jms.message.redelivered' 
+	 * is false, in which case an IllegalArgumentException will be thrown. <br>
+	 * This will will cause the message to be redelivered by JMS transaction 
+	 * handling.
+	 * 
+	 * @param message		- ESB Message object
+	 * @return Message		- unchanged ESB Message Object
+	 */
+	public Message process( final Message message )
+	{
+		final Boolean redelivered = (Boolean) message.getProperties().getProperty( JMS_REDELIVERED );
+		log.info("[" +JMS_REDELIVERED + ":" + redelivered + "]" );
+		
+		if ( redelivered )
+			return message;
+		else
+			throw new IllegalStateException( "[Throwing Exception to trigger a transaction rollback]");
+	}
+	
+	public void processException(final Message message, final Throwable th)   {  }
+	public void destroy() throws ActionLifecycleException {}
+	public void initialise() throws ActionLifecycleException {}
+	
+}

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/load_generator/readme.txt
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/load_generator/readme.txt	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/quickstarts/load_generator/readme.txt	2008-01-17 14:35:24 UTC (rev 17930)
@@ -22,12 +22,12 @@
 
 To Run '.esb' archive mode:
 ===========================
-  1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
+  1. In a command terminal window in this folder ("Window1"), type 'ant deploy-jms-dests' and then 'ant deploy'.
   2. Open another command terminal window in this folder ("Window2"), type
      'ant runtest'.
   3. Switch back to Application Server console to see the output from the ESB
-  4. In this folder ("Window1"), type 'ant undeploy'.
-  
+  4. In this folder ("Window1"), type 'ant undeploy' and then 'ant undeploy-jms-dests'.
+
 Load Test Targets
 ===========================
 runtest - Runs the load agent to simulate load and the load reporter to report on load

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/jcr/JCRConnectionManager.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/jcr/JCRConnectionManager.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbossesb/src/main/java/org/jboss/internal/soa/esb/persistence/format/jcr/JCRConnectionManager.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -39,7 +39,8 @@
 import org.apache.jackrabbit.core.TransientRepository;
 import org.apache.jackrabbit.core.config.RepositoryConfig;
 import org.jboss.soa.esb.common.Configuration;
-import org.jboss.soa.esb.helpers.NamingContext;
+import org.jboss.soa.esb.helpers.NamingContextException;
+import org.jboss.soa.esb.helpers.NamingContextPool;
 import org.jboss.system.server.ServerConfig;
 import org.jboss.system.server.ServerConfigLocator;
 
@@ -109,12 +110,18 @@
 						Configuration.getJndiServerContextFactory());
 				environment.setProperty(Context.URL_PKG_PREFIXES,
 						Configuration.getJndiServerPkgPrefix());
-				Context context = NamingContext.getServerContext(environment);
 				try {
-					repository = (Repository) context.lookup(Configuration.getJcrStoreJNDIPath());
-				} catch (NamingException e) {
-					throw new RepositoryException(e);
-				}
+        				Context context = NamingContextPool.getNamingContext(environment);
+        				try {
+        					repository = (Repository) context.lookup(Configuration.getJcrStoreJNDIPath());
+        				} catch (NamingException e) {
+        					throw new RepositoryException(e);
+        				} finally {
+        				    NamingContextPool.releaseNamingContext(context) ;
+        				}
+                                } catch (NamingContextException nce) {
+                                    throw new RepositoryException(nce);
+                                }
 			}
 			// If no JNDI path is specified, init the repository with default
 			// settings based on the respository.xml in the conf directory.

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/CallbackCommand.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/CallbackCommand.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/cmd/CallbackCommand.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -91,6 +91,9 @@
                 if (nodeId != token.getNode().getId()) {
                     throw new CallbackException("Token id " + tokenId + " from process instance " + processInstanceId + " is no longer on expected node") ;
                 }
+                if (token.hasEnded()) {
+                    throw new CallbackException("Token id " + tokenId + " from process instance " + processInstanceId + " has already terminated") ;
+                }
                 discovered = true ;
                 break;
             }

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksInstanceManager.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksInstanceManager.java	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksInstanceManager.java	2008-01-17 14:35:24 UTC (rev 17930)
@@ -21,12 +21,10 @@
 
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.util.ClassUtil;
-import org.jboss.soa.esb.helpers.NamingContext;
 import org.jboss.internal.soa.esb.assertion.AssertArgument;
 import org.apache.log4j.Logger;
 import org.milyn.Smooks;
 import org.milyn.SmooksException;
-import org.milyn.resource.URIResourceLocator;
 import org.xml.sax.SAXException;
 
 import javax.jms.*;

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/mysql.properties
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/mysql.properties	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/mysql.properties	2008-01-17 14:35:24 UTC (rev 17930)
@@ -1,4 +1,4 @@
 db.dialect=org.hibernate.dialect.MySQLDialect
 connection.datasource=java:/ManagementDS
 db.datasource=ManagementDS
-database.depends=<depends>jboss.jdbc:datasource=ManagementDS,service=metadata</depends>
+database.depends=

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-esb/src/main/resources/mysql/create_database.sql
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-esb/src/main/resources/mysql/create_database.sql	2008-01-17 14:13:26 UTC (rev 17929)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management-esb/src/main/resources/mysql/create_database.sql	2008-01-17 14:35:24 UTC (rev 17930)
@@ -13,7 +13,7 @@
         STATDATE datetime,
         timevalue float,
         countvalue integer,
-        textvalue varchar(255),
+        textvalue text,
         primary key (id)
     );
 
@@ -53,4 +53,4 @@
 		add index FKD2EA449F4522DA9F(OPID),
 		add constraint FKD2EA449F4522DA9F 
 		foreign key (OPID)
-		references JMXOPERATION(opid);
\ No newline at end of file
+		references JMXOPERATION(opid);




More information about the jboss-svn-commits mailing list