"gavin.king(a)jboss.com" wrote : Passivation definitely does not imply serialization.
EJB 3 4.2.1:
The Bean Provider is required to ensure that the PrePassivate method leaves the instance ?elds and the ?elds of its associated interceptors ready to be serialized by the container.
I like the 'may' bit of JPA. Now we ammend that with our own:
Passivation and replication of an XPC and it's managed entities will not detach a managed entity.
Leaves us with the 'how do we do that?'
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079112#4079112
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079112
"bstansberry(a)jboss.com" wrote : "wolfc" wrote : Given those rules an entity drawn from a xpc and directly refered (from a field) by a SFSB must act as I said.
|
| JPA 3.2.4 says serializing an entity "may result" in a detached entity; it doesn't say it must. So, seems to me we have flexibility.
When the JPA spec talks about serializing entities it is definitely not talking about any serialization that might happen during passivation (that is an implementation detail of the container and is not visible to, or part of the contract with, the application).
What it is talking about is entities returned by remote method.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078966#4078966
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078966
"wolfc" wrote : Passivation/activation isn't a problem, because by definition we only passivate if the entities are serializable (EJB 3 4.2) and we treat the entity as a serializable object. Thus the entity becomes detached after activation (JPA 3.2.4). All working according to spec.
This definitely not allowed by the spec. An entity should remain managed across passivation/activation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078965#4078965
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078965