On Jul 28, 2009, at 1:44 PM, Chan Kelwin Hillary wrote:
I have a stateless EJB Session bean that successfully instantiates the
EntityManger using the @PersistenceContext annotation.
Not commonly seen or known, but all dependency injection annotations
can actually be used to configure lookup strings as well. Here's a
doc that shows the usage of @Resource on a class and the xml that the
annotation implies:
http://openejb.apache.org/3.0/resource-ref-for-datasource.html
The same thing can be done with @PersistenceContext, @PersistenceUnit,
@EJB and so on. Just added an equivalent page for you that shows it:
http://cwiki.apache.org/OPENEJBx30/persistence-context.html
-David