-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Can a persistence-unit packaged in a normal jar?
PostPosted: Thu Sep 04, 2008 1:59 pm 
Regular
Regular

Joined: Sun Sep 25, 2005 11:35 pm
Posts: 57
I have bunch of JPA annotated entities along with a persistence.xml packaged as a normal jar. I package this jar in a EAR (along with a WAR) and deploy the whole thing under JBoss AS. The persistence unit is not recognized (I get an error saying myappEntityManagerFactory does not exist in JNDI).

If I package the jar as an EJB, the persistence unit is recognized and everything works ok. Does this mean that a persistence unit has to always be packaged as an EJB and hence I am tied to an EJB container?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.