[jboss-user] [JBoss Seam] - SMPC in a SFSB throws a nullpointer
moshe@egis-software.com
do-not-reply at jboss.com
Fri Jun 8 03:05:10 EDT 2007
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
More information about the jboss-user
mailing list