User: patriot1burke
Date: 02/04/09 22:32:58
Modified: src/main/org/jboss/ejb BeanLock.java BeanLockManager.java
Container.java
Log:
pass along the container to the BeanLockManager and BeanLock. Also changed the
API of BeanLock from releaseMethodLock() to
endInvocation(Invocation mi)
Revision Changes Path
1.14 +8 -8 jboss/src/main/org/jboss/ejb/BeanLock.java
Index: BeanLock.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/BeanLock.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- BeanLock.java 19 Dec 2001 03:39:14 -0000 1.13
+++ BeanLock.java 10 Apr 2002 05:32:58 -0000 1.14
@@ -18,7 +18,7 @@
* @author <a href="[EMAIL PROTECTED]">Bill Burke</a>
* @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
*
- * @version $Revision: 1.13 $
+ * @version $Revision: 1.14 $
*
* <p><b>Revisions:</b><br>
* <p><b>2001/07/29: marcf</b>
@@ -59,6 +59,10 @@
public void setTimeout(int timeout);
/**
+ * set the ejb container of this lock.
+ */
+ public void setContainer(Container container);
+ /**
* Obtain exclusive access to this lock instance.
*/
public void sync();
@@ -140,14 +144,10 @@
public void addMethodLock();
/**
- * Release the lock. A thread that got the lock through a successful
- * call to {@link #schedule} should call this method to release the
- * lock again.
- * <p>
- * If we reach the count of zero it means the instance is free from
- * threads (and reentrency) we wake up the next thread in the currentLock.
+ * Callback to the BeanLock to inform it that a method invocation has ended.
+ * A common use of this method is to release a method lock.
*/
- public void releaseMethodLock();
+ public void endInvocation(Invocation mi);
/**
* Increment the reference count of this lock.
1.7 +3 -1 jboss/src/main/org/jboss/ejb/BeanLockManager.java
Index: BeanLockManager.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/BeanLockManager.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- BeanLockManager.java 24 Nov 2001 20:43:22 -0000 1.6
+++ BeanLockManager.java 10 Apr 2002 05:32:58 -0000 1.7
@@ -19,7 +19,7 @@
* @author <a href="[EMAIL PROTECTED]">Bill Burke</a>
* @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
*
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
* <p><b>Revisions:</b><br>
* <p><b>20010802: marcf</b>
* <ol>
@@ -59,6 +59,7 @@
lock.setId(id);
lock.setReentrant(reentrant);
lock.setTimeout(txTimeout);
+ lock.setContainer(container);
}
catch (Exception e ) {e.printStackTrace();}
@@ -84,5 +85,6 @@
public void setLockCLass(Class lockClass) {this.lockClass=lockClass;}
public void setReentrant(boolean reentrant) {this.reentrant = reentrant;}
+ public void setContainer(Container container) {this.container = container;}
}
1.84 +2 -1 jboss/src/main/org/jboss/ejb/Container.java
Index: Container.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/Container.java,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- Container.java 17 Mar 2002 12:59:44 -0000 1.83
+++ Container.java 10 Apr 2002 05:32:58 -0000 1.84
@@ -82,7 +82,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Scott Stark</a>.
* @author <a href="[EMAIL PROTECTED]">Bill Burke</a>
* @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a>
-* @version $Revision: 1.83 $
+* @version $Revision: 1.84 $
** <p><b>Revisions:</b>
*
* <p><b>2001/07/26 bill burke:</b>
@@ -310,6 +310,7 @@
public void setLockManager(BeanLockManager lockManager)
{
this.lockManager = lockManager;
+ lockManager.setContainer(this);
}
public void setRealmMapping(RealmMapping rm)
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development