You have the following:
1. An enterprise archive (EAR) with one persistence unit with unit name "TestPU".
2. A ejb-jar with one stateless session bean bundled in application module (EAR file)
Which code, when added to the stateless session bean class, injects a container-managed persistence context at runtime?
I assume the file structure is:
-- and etc (for example)
-- BeanService.class (the stateless bean) that injects the entity manager with persistence unit called TestPU.
I assume in the META-INF/persistence.xml of beans.jar, there is :
hmm, re-reading this makes me doubt: An enterprise archive (EAR) with one persistence unit with unit name "TestPU".
This implies that the persistence.xml is defined inside the EAR and that is only possible inside a jar file in the EAR library directory.... or do they mean it is defined in the EJB-JAR-file? Not clear to me, an apart from that the EJB-JAR is bundled in an EAR (2) but they don't say it is the same EAR as in 1....
Wanna see my flashlight? How about this tiny ad?
Devious Experiments for a Truly Passive Greenhouse!