"RobJellinghaus" wrote :
| Why does @PersistenceContext work here but @In doesn't? I think I'm good to
go now (modulo the possibility that I'm still arranging my components the wrong way,
but some more code iteration will clue me in there). But I'm still curious why the
first way didn't work; I think there's some deep Seam knowledge in there
somewhere...?
|
Its because all of your @Ins and @Outs are Seam managed components and PersistenceContext
is not. Its dependency injection by the EJB Container for the EntityManager object into
your Beans. If you had a Seam Component that wraps the EntityManager, then you could use
the @In there to get the variable but since thats not the case, your object wasnt getting
initialized. Refer to
http://java.sun.com/javaee/5/docs/api/javax/persistence/PersistenceContex...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967427#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...