The @PersistenceContext injection is only supported in managed objects (EJBs, servlets etc...). Where are you injecting this PersistenceContext? In JBoss-4.2.x the injection of PersistenceContext is probably not supported in web tier too (because 4.2.x is a J2EE1.4 server with EJB3 patch).
If yes - than how do I make use of a container managed Entity Manager minus the injection ?
A JNDI lookup will give you the persistence context. See "3.4.2. Referencing from Global JNDI" at EntityManager configuration in JBoss
Joined: Jun 19, 2008
Thanks Jaikiran for the inputs .
In my sample test that I am doing - I am invoking a jsp from browser
The jsp is creating an instance of a simple Java Class that I call as the "delegate" . The delegate is being injected with the PC
I know this is not good design where JSP is starting the invocation - but I just wanted to play around with ejb's
Since my " delegate " is not managed - it too cannot make use of DI ?