geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Re: JPA in geronimo
Date Wed, 28 Feb 2007 21:24:27 GMT
On Feb 28, 2007, at 12:50 PM, Jacek Laskowski wrote:

> On 2/28/07, Lasantha Ranaweera <lasantha@opensource.lk> wrote:
>
>> For the JPA side I think now we need not hard coded openjpa JPA  
>> provider
>> class name.  Am I correct David (Is there any situations where  
>> both CMP
>> and JPA comes together)?
>
> As far as I understand the spec, ear can contain CMPs and JPA
> entities. It's not recommended that CMPs and JPAs are mixed together
> in one jar file, but it's very legitimate to have them separated in
> two jars bundled in one ear (I'd be glad if someone - perhaps one with
> leading 'D' in his first name, could verify my understanding, though
> ;-)).

That is the standard recommendation, but doesn't hold for Geronimo or  
OpenEJB.  The reason that experts recommend this is because normally  
the CMP and JPA are separate persistence systems.  This means that  
you have two separate caches, locks, flush semantics and so on, so if  
you are not careful you can corrupt your database.  In OpenEJB we  
chose to use JPA for the CMP implementation, which means you only  
have one system with two views, so you in general don't have the  
perviously mentioned problems.

-dain

Mime
View raw message