users@glassfish.java.net

Re: Persistence unit ref:

From: vince kraemer <Vince.Kraemer_at_Sun.COM>
Date: Wed, 09 Dec 2009 07:57:36 -0800

Hmmm.

I won't have time to do that for at least a couple days. I have a
couple NB issues that require plugin code changes to resolve that have
to take priority over helping someone restructure their app to resolve a
Spring related issue.

I think you will need to:

I think you may be able to just;
1. create a Java Library project, then
2. create a META-INF folder in the Source Packages, then
3. Cut/Paste the persistence.xml file from the old ejb jar project into
the project created at step 1...
4. Make the EJB and WEB app projects depenent on the JAR, using the
project properties...
5. Deploy.

vbk

Eve Pokua wrote:
> Vince,
>
> I need to add the per-unit-ref to my web.xml to make something in my
> spring work. I already know it deploys if I comment it out. If you
> could
> get the application to deploy by doing below without commenting the
> per-unit-ref out.
> Please, attach it and I will deploy it.
>
> Thanks
>
> eve
>
> /------- Additional comments from mm110999
> <mailto:mm110999_at_dev.java.net> Wed Dec 9 00:36:18 +0000 2009 -------/
> The PU defined at ejb-jar level is not visible to war. See section 6.2.2 of JSR
> 220 specs for more details. If you want to share a PU between two components of
> and ear, the best place to put it is under lib dir of the ear like as follows
>
> my.ear
> my.war
> my.ejb.jar
> lib/mypu.jar
> META-INF/persitence.xml
>
>