[jboss-cvs] JBoss Messaging SVN: r3127 - in trunk/src/main/org/jboss/jms/client: container and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 20 10:51:11 EDT 2007


Author: timfox
Date: 2007-09-20 10:51:10 -0400 (Thu, 20 Sep 2007)
New Revision: 3127

Modified:
   trunk/src/main/org/jboss/jms/client/JBossConnectionConsumer.java
   trunk/src/main/org/jboss/jms/client/container/SessionAspect.java
Log:
small fix


Modified: trunk/src/main/org/jboss/jms/client/JBossConnectionConsumer.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/JBossConnectionConsumer.java	2007-09-20 13:13:36 UTC (rev 3126)
+++ trunk/src/main/org/jboss/jms/client/JBossConnectionConsumer.java	2007-09-20 14:51:10 UTC (rev 3127)
@@ -122,11 +122,7 @@
       // Create a consumer. The ClientConsumer knows we are a connection consumer so will
       // not call pre or postDeliver so messages won't be acked, or stored in session/tx.
       sess = conn.createSessionDelegate(false, Session.CLIENT_ACKNOWLEDGE, false);
-      
-      SessionState sstate = (SessionState)((DelegateSupport)sess).getState();
-      
-      sstate.setTreatAsNonTransactedWhenNotEnlisted(false);
-
+          
       cons = sess.createConsumerDelegate(dest, messageSelector, false, subName, true, true);
 
       ConsumerState state = (ConsumerState)((DelegateSupport)cons).getState();

Modified: trunk/src/main/org/jboss/jms/client/container/SessionAspect.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/SessionAspect.java	2007-09-20 13:13:36 UTC (rev 3126)
+++ trunk/src/main/org/jboss/jms/client/container/SessionAspect.java	2007-09-20 14:51:10 UTC (rev 3127)
@@ -912,7 +912,8 @@
     * */
    private boolean isXAAndConsideredNonTransacted(SessionState state)
    {
-      return state.isXA() && (state.getCurrentTxId() instanceof LocalTx) && state.getTreatAsNonTransactedWhenNotEnlisted();
+      return state.isXA() && (state.getCurrentTxId() instanceof LocalTx) && state.getTreatAsNonTransactedWhenNotEnlisted()
+             && state.getDistinguishedListener() == null;
    }
 
    // Inner Classes -------------------------------------------------




More information about the jboss-cvs-commits mailing list