[jboss-cvs] JBoss Messaging SVN: r8361 - branches/Branch_1_4/src/main/org/jboss/jms/client/container.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jun 21 09:59:58 EDT 2011
Author: gaohoward
Date: 2011-06-21 09:59:57 -0400 (Tue, 21 Jun 2011)
New Revision: 8361
Modified:
branches/Branch_1_4/src/main/org/jboss/jms/client/container/ClientConsumer.java
Log:
JBMESSAGING-1876
Optimization
Modified: branches/Branch_1_4/src/main/org/jboss/jms/client/container/ClientConsumer.java
===================================================================
--- branches/Branch_1_4/src/main/org/jboss/jms/client/container/ClientConsumer.java 2011-06-21 12:23:46 UTC (rev 8360)
+++ branches/Branch_1_4/src/main/org/jboss/jms/client/container/ClientConsumer.java 2011-06-21 13:59:57 UTC (rev 8361)
@@ -593,7 +593,7 @@
{
final DeliveryInfo info = new DeliveryInfo(m, consumerID, queueName, null, shouldAck, m.getSource());
- if (timeout <= 0)
+ if (timeout <= 0 || sessionDelegate.getTransacted())
{
ignore = ! sessionDelegate.preDeliver(info);
@@ -661,23 +661,6 @@
{
log.warn("Timed out waiting for post message processing " + m + " within time " + timeLeft);
ignore = false;
- if (sessionDelegate.getTransacted())
- {
- try
- {
- //to avoid message loss, we need to wait for the message added in the ack list of the current tx.
- if (trace) { log.trace("Waiting for the task to finish"); }
- ignore = f.get();
- }
- catch (InterruptedException e1)
- {
- log.warn("Interrupted during getting future result.", e);
- }
- catch (ExecutionException e1)
- {
- log.warn("Got exception getting future result.", e);
- }
- }
sessionDelegate.processMessageTimeout();
}
}
More information about the jboss-cvs-commits
mailing list