This content has been marked as final.
Show 2 replies
-
1. Re: PersistanceUnit for the ear
jplessinger Dec 12, 2008 3:32 PM (in response to jplessinger)If anyone else has this problem and finds this post I find the solution here, took me a while to get the search terms right.
https://jira.jboss.org/jira/browse/EJBTHREE-1252 -
2. Re: PersistanceUnit for the ear
jplessinger Dec 12, 2008 3:42 PM (in response to jplessinger)I should clearify a bit.
I like to keep my entity beans separate from my business logic EJB. I also use the entity beans in other applications. I created a jar containing the entity beans and a persistence.xml file
To inject the PersitanceContext into a sessoin bean I used the line below.@PersistanceContext(unitName="XXXentity.jar#PersistenceUnit")
Yes the "XXX" is just random.
I also had to put the entity.jar in a<module/>
section in the applicaton.xml file