db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Serialization of PersistenceManagers
Date Fri, 26 Oct 2007 18:12:25 GMT
This is one of the last items before we release JDO 2.1.

We need to specify the behavior of a persistence manager if it  
implements Serializable and its writeObject method is called.  
Subsequently, the stream is materialized in a different context and  
the persistence manager is created from the stream. What are the  
conditions that would allow the persistence manager to reactivate  
itself from the restored state?

Use case: In an ejb container, a persistence manager is a persistent  
property of a Stateful Session Bean. The bean is serialized for  
storage. The bean might then be passivated and removed from the  
container. At some future time, and perhaps in some different VM, the  
bean might be activated, and the persistence manager along with all  
the other state is restored. Subsequently, an invocation on the bean  
occurs and a business method calls a method on the persistence manager.

Use case: In a web application, a persistence manager is a value of a  
session attribute. The session state is serialized and stored.  At  
some future time, and perhaps in some different VM, the session might  
be activated, and the persistence manager along with all the other  
state is restored. Subsequently, a request is serviced by the session  
and a business method calls a method on the persistence manager.

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message