[jboss-cvs] jboss-ejb3/src/main/org/jboss/ejb3/stateful ...
Ben Wang
bwang at jboss.com
Tue Jul 25 12:46:13 EDT 2006
User: bwang
Date: 06/07/25 12:46:13
Modified: src/main/org/jboss/ejb3/stateful
ProxiedStatefulBeanContext.java
StatefulBeanContext.java
StatefulRemoveInterceptor.java
Log:
Ported fixes from 4.0
Revision Changes Path
1.5 +8 -10 jboss-ejb3/src/main/org/jboss/ejb3/stateful/ProxiedStatefulBeanContext.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ProxiedStatefulBeanContext.java
===================================================================
RCS file: /cvsroot/jboss/jboss-ejb3/src/main/org/jboss/ejb3/stateful/ProxiedStatefulBeanContext.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- ProxiedStatefulBeanContext.java 24 Jul 2006 16:59:03 -0000 1.4
+++ ProxiedStatefulBeanContext.java 25 Jul 2006 16:46:13 -0000 1.5
@@ -38,7 +38,7 @@
* Comment
*
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
*/
public class ProxiedStatefulBeanContext extends StatefulBeanContext implements
Externalizable
@@ -104,15 +104,13 @@
parentRef = (StatefulBeanContextReference) in.readObject();
}
- public void prePassivate()
- {
- // noop
- }
-
- public void postActivate()
- {
- // noop
- }
+// public void prePassivate()
+// {
+// }
+
+// public void postActivate()
+// {
+// }
public List<StatefulBeanContext> getContains()
{
1.27 +10 -3 jboss-ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: StatefulBeanContext.java
===================================================================
RCS file: /cvsroot/jboss/jboss-ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- StatefulBeanContext.java 19 May 2006 09:50:54 -0000 1.26
+++ StatefulBeanContext.java 25 Jul 2006 16:46:13 -0000 1.27
@@ -48,7 +48,7 @@
* Comment
*
* @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision: 1.26 $
+ * @version $Revision: 1.27 $
*/
public class StatefulBeanContext extends BaseContext implements Externalizable
{
@@ -180,8 +180,7 @@
public void postActivate()
{
- if(container == null) getContainer(); // initialize the container first
- container.invokePostActivate(this); // EJBTHREE-574
+ getContainer().invokePostActivate(this); // handled in getInstance()
}
public void popContainedIn()
@@ -273,6 +272,9 @@
{
throw new RuntimeException(e);
}
+
+ // Finally, remove myself
+ ((StatefulContainer)getContainer()).getCache().remove(id);
}
private void closeExtendedPCs()
@@ -308,6 +310,7 @@
if (bean == null)
{
extractBeanAndInterceptors();
+ // getContainer().invokePostActivate(this);
}
return bean;
}
@@ -352,6 +355,7 @@
}
}
contains = (List<StatefulBeanContext>) beanAndInterceptors[3];
+/* We should let pm to handle this.
if (contains != null)
{
for (StatefulBeanContext ctx : contains)
@@ -359,6 +363,7 @@
ctx.getContainer().invokePostActivate(ctx);
}
}
+*/
}
catch (IOException e)
{
@@ -391,6 +396,7 @@
beanAndInterceptors[2] = list;
}
beanAndInterceptors[3] = contains;
+/* Since replication also uses this. We c'ant call this directly. Let pm handle this.
if (contains != null)
{
for (StatefulBeanContext ctx : contains)
@@ -398,6 +404,7 @@
ctx.prePassivate();
}
}
+*/
beanMO = new MarshalledObject(beanAndInterceptors);
out.writeObject(beanMO);
}
1.9 +4 -1 jboss-ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: StatefulRemoveInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-ejb3/src/main/org/jboss/ejb3/stateful/StatefulRemoveInterceptor.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- StatefulRemoveInterceptor.java 10 May 2006 19:44:51 -0000 1.8
+++ StatefulRemoveInterceptor.java 25 Jul 2006 16:46:13 -0000 1.9
@@ -123,7 +123,10 @@
}
else
{
- container.getCache().remove(id);
+ // Release it properly.
+ StatefulBeanContext ctx = container.getCache().get(id);
+ container.getPool().remove(ctx);
+// container.getCache().remove(id);
}
}
}
More information about the jboss-cvs-commits
mailing list