Package org.apache.webbeans.container
Class SerializableBeanVault
- java.lang.Object
-
- org.apache.webbeans.container.SerializableBeanVault
-
public class SerializableBeanVault extends Object
This class acts as a storage for
SerializableBeans.The Background:
Any Contextual<T> which holds it's information on a storage which may get serialized, like e.g. the SessionContext, the ConversationContext or any 3-rd party Context for a NormalScoped(passivating=true) and therefore PassivationCapable Scope needs to be Serializable.
Normal
Beans are not serializable because they contain non transportable information. But eachPassivationCapableBeanis uniquely identifyable via it's id and can be restored byBeanManager.getPassivationCapableBean(String).Since a custom Context implementation doesn't know when it gets passivated (for a Http Session this is pretty seldom), the Contextual
handed over to the Context implementation must be Serializable.
-
-
Constructor Summary
Constructors Constructor Description SerializableBeanVault()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> javax.enterprise.context.spi.Contextual<T>getSerializableBean(javax.enterprise.context.spi.Contextual<T> bean)
-