[jboss-cvs] JBoss Messaging SVN: r2442 - trunk/src/main/org/jboss/jms/client/container.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Feb 26 06:22:42 EST 2007
Author: ovidiu.feodorov at jboss.com
Date: 2007-02-26 06:22:42 -0500 (Mon, 26 Feb 2007)
New Revision: 2442
Modified:
trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java
Log:
minor refactoring
Modified: trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java 2007-02-26 11:07:12 UTC (rev 2441)
+++ trunk/src/main/org/jboss/jms/client/container/FailoverValveInterceptor.java 2007-02-26 11:22:42 UTC (rev 2442)
@@ -119,35 +119,22 @@
log.debug(this + " resuming " + methodName + "()");
- Object target = invocation.getTargetObject();
-
- // Set retry flag as true on send & sendTransaction
+ // Set retry flag as true on send() and sendTransaction()
// more details at http://jira.jboss.org/jira/browse/JBMESSAGING-809
-
- if (methodName.equals("send") &&
- target instanceof ClientSessionDelegate)
+ if (invocation.getTargetObject() instanceof ClientSessionDelegate &&
+ (methodName.equals("send") || methodName.equals("sendTransaction")))
{
- log.debug("#### Capturing send invocation.. setting check to true");
+ log.debug(this + " caught " + methodName + "() invocation, enabling check for duplicates");
Object[] arguments = ((MethodInvocation)invocation).getArguments();
arguments[1] = Boolean.TRUE;
((MethodInvocation)invocation).setArguments(arguments);
}
- else
- if (methodName.equals("sendTransaction") &&
- target instanceof ClientConnectionDelegate)
- {
- log.debug("#### Capturing sendTransaction invocation.. setting check to true");
- Object[] arguments = ((MethodInvocation)invocation).getArguments();
- arguments[1] = Boolean.TRUE;
- ((MethodInvocation)invocation).setArguments(arguments);
- }
return invocation.invokeNext();
}
catch (Throwable e)
{
// not failover-triggering, rethrow
-
if (trace) { log.trace(this + " caught not failover-triggering throwable, rethrowing " + e); }
throw e;
}
More information about the jboss-cvs-commits
mailing list