[jboss-cvs] JBoss Messaging SVN: r2342 - branches/Branch_1_0_1_SP/src/main/org/jboss/jms/client/container.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Feb 16 07:26:16 EST 2007
Author: timfox
Date: 2007-02-16 07:26:16 -0500 (Fri, 16 Feb 2007)
New Revision: 2342
Modified:
branches/Branch_1_0_1_SP/src/main/org/jboss/jms/client/container/SessionAspect.java
Log:
http://jira.jboss.org/jira/browse/JBMESSAGING-852
Modified: branches/Branch_1_0_1_SP/src/main/org/jboss/jms/client/container/SessionAspect.java
===================================================================
--- branches/Branch_1_0_1_SP/src/main/org/jboss/jms/client/container/SessionAspect.java 2007-02-16 12:25:11 UTC (rev 2341)
+++ branches/Branch_1_0_1_SP/src/main/org/jboss/jms/client/container/SessionAspect.java 2007-02-16 12:26:16 UTC (rev 2342)
@@ -206,15 +206,25 @@
AckInfo ack = (AckInfo)acks.get(0);
- if (cancel)
+ try
{
- sd.cancelDeliveries(acks);
+ if (cancel)
+ {
+ sd.cancelDeliveries(acks);
+ }
+ else
+ {
+ sd.acknowledge(ack);
+ }
}
- else
+ finally
{
- sd.acknowledge(ack);
+ //We clear the state in a finally so if an ack/cancel fails then
+ //we don't get a knock on exception on the next ack since we haven't
+ //cleared the state:
+ //http://jira.jboss.org/jira/browse/JBMESSAGING-852
+ state.getToAck().clear();
}
- state.getToAck().clear();
}
else
{
More information about the jboss-cvs-commits
mailing list