servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r669822 - /servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/EndpointDeliveryChannel.java
Date Fri, 20 Jun 2008 08:45:16 GMT
Author: gnodet
Date: Fri Jun 20 01:45:16 2008
New Revision: 669822

URL: http://svn.apache.org/viewvc?rev=669822&view=rev
Log:
Fix transaction handling

Modified:
    servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/EndpointDeliveryChannel.java

Modified: servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/EndpointDeliveryChannel.java
URL: http://svn.apache.org/viewvc/servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/EndpointDeliveryChannel.java?rev=669822&r1=669821&r2=669822&view=diff
==============================================================================
--- servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/EndpointDeliveryChannel.java
(original)
+++ servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/EndpointDeliveryChannel.java
Fri Jun 20 01:45:16 2008
@@ -107,15 +107,17 @@
     }
 
     private void resumeTx(MessageExchange exchange) throws MessagingException {
-        Transaction tx = (Transaction) exchange.getProperty(MessageExchange.JTA_TRANSACTION_PROPERTY_NAME);
-        if (tx != null) {
-            TransactionManager txmgr = (TransactionManager) endpoint.getServiceUnit().getComponent().getComponentContext().getTransactionManager();
-            try {
-                txmgr.resume(tx);
-            } catch (InvalidTransactionException e) {
-                throw new MessagingException(e);
-            } catch (SystemException e) {
-                throw new MessagingException(e);
+        if (!endpoint.getServiceUnit().getComponent().getContainer().handleTransactions())
{
+            Transaction tx = (Transaction) exchange.getProperty(MessageExchange.JTA_TRANSACTION_PROPERTY_NAME);
+            if (tx != null) {
+                TransactionManager txmgr = (TransactionManager) endpoint.getServiceUnit().getComponent().getComponentContext().getTransactionManager();
+                try {
+                    txmgr.resume(tx);
+                } catch (InvalidTransactionException e) {
+                    throw new MessagingException(e);
+                } catch (SystemException e) {
+                    throw new MessagingException(e);
+                }
             }
         }
     }



Mime
View raw message