User: starksm
Date: 01/11/26 20:25:11
Modified: src/main/org/jboss/ejb/plugins Tag: Branch_2_4
AbstractInstanceCache.java
Log:
There is no need to keep the class loader with the passivation job instance.
Revision Changes Path
No revision
No revision
1.10.2.5 +5 -7 jboss/src/main/org/jboss/ejb/plugins/AbstractInstanceCache.java
Index: AbstractInstanceCache.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/AbstractInstanceCache.java,v
retrieving revision 1.10.2.4
retrieving revision 1.10.2.5
diff -u -r1.10.2.4 -r1.10.2.5
--- AbstractInstanceCache.java 2001/11/27 01:16:21 1.10.2.4
+++ AbstractInstanceCache.java 2001/11/27 04:25:11 1.10.2.5
@@ -64,7 +64,7 @@
* @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="[EMAIL PROTECTED]">Scott Stark</a>
*
- * @version $Revision: 1.10.2.4 $
+ * @version $Revision: 1.10.2.5 $
*
* <p><b>Revisions:</b>
*
@@ -624,8 +624,7 @@
// with a valid key because it may get freed to the InstancePool, then
// reused before the PassivationJob executes.
// marcf, actually for simplicity I have removed the "freed" call in
the pool (check entity pool)
- ClassLoader jobCL = bean.getContainer().getClassLoader();
- PassivationJob job = new PassivationJob(bean, key, jobCL)
+ PassivationJob job = new PassivationJob(bean, key)
{
public void execute() throws Exception
{
@@ -660,9 +659,10 @@
BeanLock lock = getContainer().getLockManager().getLock(id);
lock.sync();
ClassLoader cl =
Thread.currentThread().getContextClassLoader();
+ ClassLoader beanCL = getContainer().getClassLoader();
try
{
- Thread.currentThread().setContextClassLoader(this.m_cl);
+ Thread.currentThread().setContextClassLoader(beanCL);
// marcf: the mutex is not good as we need a thread
reentrant one, for now we
// use straight synchronization on the ctx as there is a
one-one relationship
// Also the ctx are not reused any longer so no chance of
using the wrong ctx
@@ -818,13 +818,11 @@
protected Object m_key;
protected boolean m_cancelled;
protected boolean m_executed;
- protected ClassLoader m_cl;
- PassivationJob(EnterpriseContext ctx, Object key, ClassLoader cl)
+ PassivationJob(EnterpriseContext ctx, Object key)
{
m_context = ctx;
m_key = key;
- m_cl = cl;
}
public abstract void execute() throws Exception;
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development