robert walker [
http://community.jboss.org/people/robertwalker] created the discussion
"Re: jboss7 quickstarts entitymanager injection question"
To view the discussion, visit:
http://community.jboss.org/message/635436#635436
--------------------------------------------------------------
ok, this is becoming a bit clearer,
however
both examples (login and kitchensink) point to
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
in thier persistence.xml (each one gives a different name for thier persistence-unit name,
one named primary and the other loginDatabase)
so because both point to same the DS then
@Inject
EntityManager
works in both sample applications? Jboss can know which pu to assign to the
entitymanager?
the login app would not get associated with the PU for kithensink?
If I add my own, do I also use
@Inject // or maybe @PersistenceContext if not using the resource producer pattern
private EntityManager em;
thanks
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/635436#635436]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]