[jboss-dev-forums] [JBoss AS7 Development] - Re: jboss7 quickstarts entitymanager injection question

robert walker do-not-reply at jboss.com
Mon Nov 7 16:48:08 EST 2011


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/635433#635433

--------------------------------------------------------------
thanks for the reply

i must be missing someting, each example, login or kitchensink has there own persistence.xml file
which gives the PU a name, whcih i would think would be needed by the class in the src code injecting the EntityManager.

for login's  persistence.xml 

<persistence-unit name="loginDatabase">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>

and for kitchsink  persistence.xml 

<persistence-unit name="primary">
      <!-- If you are running in a production environment, add a managed 
         data source, the example data source is just for proofs of concept! -->
      <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>

but neither of the managed beans use code to inject a PU named "loginDatabase" or "primary"


--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/635433#635433]

Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20111107/ea650146/attachment.html 


More information about the jboss-dev-forums mailing list