I the ejb draft spec says :
In advanced cases, a session object?s conversational state may contain open resources, such as open
sockets and open database cursors. A container cannot retain such open resources when a session bean
instance is passivated. A developer of a stateful session bean must close and open the resources in the
PrePassivate and PostActivate callback methods.
A container may only passivate a stateful session bean instance when the instance is not in a transaction.
8) Note that this requirement does not apply to the EntityManager and EntityManagerFactory objects.
Does this mean that jboss should passivate an unflushed EM?
open tx cannot be passivated since they are linked to a connection usually.
But unflushed em should be passivated.
So if your tx are closed, the em can be passivated even if em hasn't been flushed yet.