activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r691124 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
Date Tue, 02 Sep 2008 06:46:33 GMT
Author: rajdavies
Date: Mon Sep  1 23:46:32 2008
New Revision: 691124

URL: http://svn.apache.org/viewvc?rev=691124&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-1919

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java?rev=691124&r1=691123&r2=691124&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
Mon Sep  1 23:46:32 2008
@@ -296,6 +296,9 @@
     public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException
{
         checkClosedOrFailed();
         ensureConnectionInfoSent();
+        if(!transacted && acknowledgeMode==Session.SESSION_TRANSACTED) {
+           throw new JMSException("acknowledgeMode SESSION_TRANSACTED cannot be used for
an non-transacted Session");
+        }
         return new ActiveMQSession(this, getNextSessionId(), transacted ? Session.SESSION_TRANSACTED
: (acknowledgeMode == Session.SESSION_TRANSACTED
             ? Session.AUTO_ACKNOWLEDGE : acknowledgeMode), isDispatchAsync(), isAlwaysSessionAsync());
     }



Mime
View raw message