This actually handles bootstrapping (read up the doc on how it does it), which is tricky in EJB modules, since there’s no standard EJB context listener mechanism as there is for web containers. Many app server vendors do have EJB module lifecycle hooks/interfaces you can implement – but obviously they’re proprietary and make your app less portable, so I’d rather avoid them if I can, I still don’t see why this feature isn’t part of the spec… clearly there are use cases, and clearly since there are non-standard implementations, it’s feasible to do and define behavior for.
– which receives the container-injected persistence unit and then registers it into the JNDI registry keyed by the name “barEntityManagerFactory”. The Spring XML config will need a bean created through a JNDI look-up of “barEntityManager”, and inject that in to the DAO Spring-managed bean.
Lots of repetition up there! (Note I said it was for my benefit :P).
Now I can finally watch some Naruto!