Hi, I'm trying to set up my first JPA app, and while I'm able to get it to work outside a
J2EE container, or within a J2EE container using the following code:
I'm unable to get it to work using the @PersistenceContext annotation. My understanding was that the two below things would both successfully load the EntityManager in the same 'em' reference:
1..
2..
But when I run option 2, I get this error:
I'm sure there's something dumb I'm missing, but if anyone could tell me what it is, I'd be grateful
ps. I am using
JBoss 6 and MySQL, if that is relevant.