geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject Re: JPA plugin (was Re: Java 1.4 and JEE 5)
Date Sat, 12 Aug 2006 02:43:30 GMT
On 8/11/06, Jeff Genender <jgenender@apache.org> wrote:
> With regard to duplicating PUs, in theory, it shouldn't make a
> difference if the PU was already loaded in a parent loader.

I think it does.  The web app is not necessarily supposed to see JPA
configurations in an EJB JAR, only JPA configurations at the EAR
level.  And I don't think we have a way to distinguish between the
two.  Further, I don't think we'd want the web app to do it's own
processing of a persistence.xml at the EAR level -- I think we'd want
the EAR to do the processing and just expose that "common" JPA
configuration to the web app (the spec is pretty clear on that).
Whereas if the persistence.xml is in the web app, it should do all the
JPA processing as part of the web app deployment.

So I think that somehow we'd like a web app to be able to discriminate
between "persistence.xml in me" (do lots of deployment processing),
"persistence.xml in my EAR" (use shared configuration), and
"persistence.xml in other modules in the EAR that happen to have been
merged into the EAR ClassLoader" (ignore).

Thanks,
     Aaron

>  But unless
> the spi jar uses some sort of mechanism using static declarations or
> componanents like Spring, then it really shouldn't be an issue.  If it
> is, I think its reasonable to claim storage of duplicate PUs in the same
> package causing the problem (again, like the Spring Commons Logging
> problem).
>
> >
> > Thanks,
> >     Aaron
> >
> >> Aaron Mulder wrote:
> >> > So what happens if an EJB JAR has a persistence.xml and a web app in
> >> > the same EAR has a separate persistence.xml?  If we just look in the
> >> > class loader, when we go to deploy the web app, we'll see them both
> >> > because the EJB JAR is added to the parent classpath of the WAR.  Is
> >> > there a good way to distinguish "resource in my ClassLoader" from
> >> > "resources in my ClassLoader tree"?
> >> >
> >> > Thanks,
> >> >     Aaron
> >>
>

Mime
View raw message