geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quintin Beukes <quin...@skywalk.co.za>
Subject Re: Persistence unit <class> annotation having no effect
Date Fri, 23 Oct 2009 18:59:48 GMT
Hey David,

Thanks for the response.

See below

> How many persistence.xml files are there?  AFAIK persistence units can't
> refer to each other, so you might be able to get things to work if the
> classes are distributed between jars A and B but there is only one
> persistence.xml, in B.  In this case I'd wonder why you needed two jars, why
> not just put everything in B?

It's a modular system. Some modules would be on a system, where others
aren't. Or you would have module A and instead of a B a customized one
called "Bcustom", and so on. So it has to be many JARs. Further, for
scanning to happen you have to include a persistence.xml in the JAR
which you want scanned.

> Not sure what management you are talking about here, and are you using
> hibernate jpa?

OpenJPA creates/manages the EntityManagers, EntityManagerFactories,
PersistenceUnits, etc.

>> Is there a way I can pass this responsibility over to OpenEJB instead?
>
> I don't think so.

Yes. This does seem a bit complex.

> If there are 2 persistence.xmls, IMO any time this works you've found a bug,
> and the bug might depend on a particular classloader structure that occurs
> in your tests but not runtime environment.

Which JPA spec version is supported by Geronimo? In the EJB3.0 spec
this is a requirement. In fact, if 2 separate PUs reference the same
entity class, they have to refer to the same persistent instances.

Q

Mime
View raw message