openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From titou10 titou10 <titou10.tito...@gmail.com>
Subject How to handle injections of java.util.List<> into @ConversationScoped beans?
Date Tue, 30 Jul 2013 17:15:13 GMT
Given the fact that, per the specs
(http://docs.jboss.com/cdi/spec/1.0/html/contexts.html section 6.6),
"For every bean which declares a passivating scope, and for every
stateful session bean, the container must validate that the bean truly
is passivation capable and that, in addition, its dependencies are
passivation capable.." "..the container automatically detects the
problem and treats it as a deployment problem."

Wit the following class, OWB fails to start as per the specs :

@ConversationScoped
public class TestBean2 implements Serializable {
   private static final long serialVersionUID = 1L;
   @Inject private List<TestObjectWhichIsSerialisable>  listTestObject;
}

Because List<> is not serializable

How do you people, handle this situation?
- Replace all declaration of List<> by the concrete implementation
class (it seems that all implementation of List<> are serializable) ?
- Declare those fields as transient and manage manually the passivation?
- "deactivate the container passivation feature" if possible in the
application server and tell OWB to not enforce this (how?) ?

We can not find a good solution for this and this appear to be a real
problem for us.

Mime
View raw message