When injecting the Seam Managed Persistence Context in a Stateful Session bean,
it does not get injected and subsequent references to the entityManager throws
a NullPointer Exception.
The below code demonstrated the problem, When @Stateful is removed everything
works fine.
@Name("forward")
| @Scope(value=ScopeType.CONVERSATION)
| @Stateful
| public class Forward implements ForwardLocal{
| @In
| private EntityManager em;
|
| List<User> users;
|
|
| @Create
| public void init() {
| users= em.createQuery(" from User as u").getResultList();
|
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052410#4052410
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052410
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user