-
1. Re: injecting org.jboss.seam.contexts.Context
admin.admin.email.tld May 7, 2008 6:07 PM (in response to admin.admin.email.tld)well I just ran a test. I have a session-scoped SFSB. I am not setting the sessionContext variable to null in the @PrePassivate method and am not seeing any exception in the log when the ejb container passivates the SFSB instance.
that's interesting...
-
2. Re: injecting org.jboss.seam.contexts.Context
admin.admin.email.tld May 7, 2008 6:21 PM (in response to admin.admin.email.tld)javax.persistence.EntityManager does not implement the Serializable interface.
EntityManager instance variable is not being set to null either in @PrePassivate method but no errors passivating SFSB instance.
@In private EntityManager entityManager;
If Hibernate is the persistence provider, what class implements this interface and does it implement the Serializable interface?
-
3. Re: injecting org.jboss.seam.contexts.Context
matt.drees May 8, 2008 6:42 AM (in response to admin.admin.email.tld)This works because Seam injection occurs before every method, and after the method completes, all the injected values are disinjected/nulled.
So you don't need to worry about serializability of objects in properties annotated @In.
-
4. Re: injecting org.jboss.seam.contexts.Context
admin.admin.email.tld May 9, 2008 5:20 PM (in response to admin.admin.email.tld)
Matt Drees wrote on May 08, 2008 06:42 AM:
This works because Seam injection occurs before every method, and after the method completes, all the injected values are disinjected/nulled.
So you don't need to worry about serializability of objects in properties annotated @In.do you have a reference to an official doc on that?
I'm seeing the following code on page 795 of Java Persistence with Hibernate in the RegisterBean SFSB:
@In(create=true) private transient FacesMessages facesMessages;
so why is the transient keyword there if you're right about the @In annotation?