User: fleury
Date: 00/09/26 18:01:13
Modified: src/main/org/jboss/ejb/plugins
EntityInstanceInterceptor.java
NoPassivationEntityInstanceCache.java
StatefulSessionInstanceInterceptor.java
Log:
Updated interceptors
Revision Changes Path
1.11 +4 -0
jboss/src/main/org/jboss/ejb/plugins/EntityInstanceInterceptor.java
Index: EntityInstanceInterceptor.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/EntityInstanceInterceptor.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- EntityInstanceInterceptor.java 2000/09/26 22:37:15 1.10
+++ EntityInstanceInterceptor.java 2000/09/27 01:01:11 1.11
@@ -42,7 +42,7 @@
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
-* @version $Revision: 1.10 $
+* @version $Revision: 1.11 $
*/
public class EntityInstanceInterceptor
extends AbstractInterceptor
@@ -160,6 +160,10 @@
// Try your luck again
ctx = null;
continue;
+ } else
+ {
+ //take it!
+ ctx.lock();
}
}
1.12 +3 -1
jboss/src/main/org/jboss/ejb/plugins/NoPassivationEntityInstanceCache.java
Index: NoPassivationEntityInstanceCache.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/NoPassivationEntityInstanceCache.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- NoPassivationEntityInstanceCache.java 2000/09/26 20:18:51 1.11
+++ NoPassivationEntityInstanceCache.java 2000/09/27 01:01:12 1.12
@@ -37,7 +37,7 @@
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Andy Schaefer</a>
-* @version $Revision: 1.11 $
+* @version $Revision: 1.12 $
*/
public class NoPassivationEntityInstanceCache
implements EntityInstanceCache
@@ -101,6 +101,8 @@
// Use the CacheKey for the rest of the method
CacheKey cacheKey = (CacheKey) id;
+
+ System.out.println("Get "+cacheKey+" from cache");
EntityEnterpriseContext ctx;
1.7 +5 -17
jboss/src/main/org/jboss/ejb/plugins/StatefulSessionInstanceInterceptor.java
Index: StatefulSessionInstanceInterceptor.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/StatefulSessionInstanceInterceptor.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- StatefulSessionInstanceInterceptor.java 2000/09/27 00:35:56 1.6
+++ StatefulSessionInstanceInterceptor.java 2000/09/27 01:01:12 1.7
@@ -32,7 +32,7 @@
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
-* @version $Revision: 1.6 $
+* @version $Revision: 1.7 $
*/
public class StatefulSessionInstanceInterceptor
extends AbstractInterceptor
@@ -73,32 +73,20 @@
// It is a new context for sure so we can lock it
ctx.lock();
-
try
{
// Invoke through interceptors
return getNext().invokeHome(mi);
} finally
{
+ // Release the lock
+ ctx.unlock();
+
// Still free? Not free if create() was called successfully
if (ctx.getId() == null)
{
-
container.getInstancePool().free(mi.getEnterpriseContext());
- } else
- {
- // DEBUG Logger.log("Session was created; not
returned to pool");
-
- // Create was called succesfully we go to the cache
- synchronized (ctx) {
-
- // Release the lock
- ctx.unlock();
-
- //Let the waiters know
- //ctx.notifyAll();
- }
- }
+ }
}
}