User: dsundstrom
Date: 01/11/02 13:12:10
Modified: src/main/org/jboss/ejb/plugins/lock BeanLockSupport.java
Log:
Added support for non-entrant messages to be passed through invocation
chain. A method invocation is non-entrant if it is on a reentrant bean,
a known non-entrant method, such as getHandle, or a method defined on a
sub-interface of NonentrantMessage.
These changes have been reviewed and approved by Bill Burke.
Revision Changes Path
1.6 +18 -12 jboss/src/main/org/jboss/ejb/plugins/lock/BeanLockSupport.java
Index: BeanLockSupport.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/lock/BeanLockSupport.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- BeanLockSupport.java 2001/09/11 18:35:01 1.5
+++ BeanLockSupport.java 2001/11/02 21:12:10 1.6
@@ -29,7 +29,7 @@
*
* @author <a href="[EMAIL PROTECTED]">Bill Burke</a>
* @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*
* <p><b>Revisions:</b><br>
* <p><b>2001/07/29: marcf</b>
@@ -147,23 +147,29 @@
protected boolean isCallAllowed(MethodInvocation mi)
{
+ // is this a reentrant bean
if (reentrant)
{
return true;
}
- else
+
+ // is this a known non-entrant method
+ Method m = mi.getMethod();
+ if (m.equals(getEJBHome) ||
+ m.equals(getHandle) ||
+ m.equals(getPrimaryKey) ||
+ m.equals(isIdentical) ||
+ m.equals(remove))
{
- Method m = mi.getMethod();
- if (m.equals(getEJBHome) ||
- m.equals(getHandle) ||
- m.equals(getPrimaryKey) ||
- m.equals(isIdentical) ||
- m.equals(remove))
- {
- return true;
- }
+ return true;
+ }
+
+ // if this is a non-entrant message to the container let it through
+ if(NonentrantMessage.class.isAssignableFrom( m.getDeclaringClass() ))
+ {
+ return true;
}
-
+
return false;
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development