geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: AW: using OpenJPA in EJB2.1 application (was: ejb2.1 to Geronimo2.0 migration strategy)
Date Thu, 01 Feb 2007 19:49:13 GMT

On Feb 1, 2007, at 10:48 AM, Hans J. Prueller wrote:

> david,
>
>
>
> thank you for your comments.
>
>
>
> please note: our problem is that we have to migrate a project  
> consisting of about 70 CMP/CMR’ed entity beans (ejb2.1).
>
> it will be impossible for us to migrate the whole app at once from  
> ejb2.1 to openJPA or something else. so what my plan
>
> is, is to continue running the application within our current  
> ejb2.1 container and perform a step-by-step migration of the
>
> ejb2.1 entity beans from ejb2.1 to openJPA – still running within  
> our ejb2.1 container.
>
>
>
> as soon as all “old” entity beans are migrated to openJPA we then  
> could easily switch the whole app to Geronimo.

Sorry, I forgot you are trying to run your app in a _different_  
ejb2.1 container :-)

You should still be able to specify the mapping in a mapping.xml.   
However I suspect if you can convince the other app server to run  
under jdk 1.5 openjpa will be able to deal with annotations just as  
it does in geronimo.

I think the major problem you are likely to run into is that unless  
there's container managed persitence contexts your transaction  
behavior is going to be difficult to control.

thanks
david jencks

>
>
> Hans
>
>
>
> Von: David Jencks [mailto:david_jencks@yahoo.com]
> Gesendet: Donnerstag, 01. Februar 2007 18:29
> An: user@geronimo.apache.org
> Betreff: Re: using OpenJPA in EJB2.1 application (was: ejb2.1 to  
> Geronimo2.0 migration strategy)
>
>
>
>
>
> On Feb 1, 2007, at 7:41 AM, Hans J. Prueller wrote:
>
>
>
>
> Hi together,
>
>
>
> I decided that it would be a valuable way to migrate existing  
> CMP2.1 EJBs to OpenJPA, as this should also work
>
> OUTSIDE a Java EE 5 (and therefore inside EJB2.1) container. The  
> problem I see is that I have to provide the OpenJPA
>
> mappings as Java5 annotations, and EJB2.1 projects are bound to  
> Java 1.4 – without having annotations.
>
> run geronimo under jdk 1.5.  This will work unless you are using  
> corba.  The almost released 1.2 might work if you are using corba.
>
>
>
>
> Is there a way of providing the mapping via XML-descriptor too?
>
>
>
> yes, as per jpa spec.
>
>
> Does anybody see other possible failures when running OpenJPA  
> within a Java EE 1.4 container?
>
>
>
> I'm not sure why you don't want to use annotations. You should use  
> the geronimo 1.2 not-quite-released version which includes jpa and  
> in particular openjpa support.  I converted the daytrader  
> performance test app to use jpa and it works fine.  In particular  
> you can use container managed entity managers/persistence contexts  
> rather than app managed ones.  You might like to take a look at  
> daytrader trunk, it has all the annotations and a jpa plan.  You do  
> need to run geronimo under jdk 1.5 for this to work.
>
>
>
> svn co https://svn.apache.org/repos/asf/geronimo/daytrader/trunk  
> daytrader
>
>
>
> thanks
>
> david jencks
>
>
>
>
>
>
>
>
>
>
> regards,
> Hans
>
>
>
>
>
> ===========================
> virtually hanzz...
>
>
>
> http://hanzz.zapto.org (personal)
> http://www.cse.dmu.ac.uk/~hansp (research)
>
>
>
>
>
>
>
>
>


Mime
View raw message