[jboss-cvs] JBossAS SVN: r64907 - trunk/ejb3/src/main/org/jboss/ejb3/stateful.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 28 06:47:00 EDT 2007
Author: wolfc
Date: 2007-08-28 06:47:00 -0400 (Tue, 28 Aug 2007)
New Revision: 64907
Modified:
trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java
Log:
EJBTHREE-1016: fixed stateful replication regression
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java 2007-08-28 10:25:57 UTC (rev 64906)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulBeanContext.java 2007-08-28 10:47:00 UTC (rev 64907)
@@ -62,8 +62,8 @@
{
/** The serialVersionUID */
private static final long serialVersionUID = -102470788178912606L;
-
- protected static class Serialized implements Serializable
+
+ private static class Serialized implements Serializable
{
private static final long serialVersionUID = 1L;
@@ -75,8 +75,6 @@
private boolean removed;
private boolean replicationIsPassivation;
- protected transient StatefulBeanContext ctx;
-
private Object readResolve() throws ObjectStreamException
{
StatefulContainer container = Ejb3Registry.getContainer(containerName, StatefulContainer.class);
@@ -88,7 +86,6 @@
context.replicationIsPassivation = this.replicationIsPassivation;
// I'm deserializing, so I was passivated
context.passivated = true;
- ctx = context;
return context;
}
}
@@ -184,9 +181,6 @@
return copy;
}
- /**
- * Returns an EJB context which is usable in an EJB.
- */
@Override
public EJBContext getEJBContext()
{
@@ -870,17 +864,9 @@
}
}
- private transient Serialized state = null;
-
- /**
- * Use only during serialization!
- * @return
- */
- protected Serialized getState()
+ private Object writeReplace() throws ObjectStreamException
{
- if(state != null)
- return state;
- this.state = new Serialized();
+ Serialized state = new Serialized();
if (this.beanMO == null)
{
Object[] beanAndInterceptors = new Object[4];
@@ -918,7 +904,6 @@
state.beanMO = this.beanMO;
}
state.containerName = this.containerName;
- assert this.containerName != null;
state.id = this.id;
state.lastUsed = this.lastUsed;
state.metadata = this.metadata;
@@ -927,11 +912,6 @@
return state;
}
- private Object writeReplace() throws ObjectStreamException
- {
- return getState();
- }
-
// public void writeExternal(ObjectOutput out) throws IOException
// {
// out.writeUTF(containerName);
More information about the jboss-cvs-commits
mailing list