geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans J. Prueller" <hans.pruel...@gmx.net>
Subject AW: AW: using OpenJPA in EJB2.1 application (was: ejb2.1 to Geronimo2.0 migration strategy)
Date Thu, 01 Feb 2007 20:21:12 GMT
>> 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.

 

fine. 

 

>> 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.

 

I hoped that I could configure openJPA to use the transaction manager
provided by the container - for example we

successfully integrated Hibernate Persistence and CMP Persistence within our
application, both running within

the same transactions. there has been something like a plugin developed:

 

<property name="hibernate.transaction.manager_lookup_class">

org.hibernate.transaction.JOTMTransactionManagerLookup

</property>

 

Is there any means of "plugging" transaction manager into openJPA
persistence?

 

HANS

 

  _____  

Von: David Jencks [mailto:david_jencks@yahoo.com] 
Gesendet: Donnerstag, 01. Februar 2007 20:49
An: user@geronimo.apache.org
Betreff: Re: AW: using OpenJPA in EJB2.1 application (was: ejb2.1 to
Geronimo2.0 migration strategy)

 

 

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>
https://svn.apache.org/repos/asf/geronimo/daytrader/trunk daytrader

 

thanks

david jencks

 

 






 

regards,
Hans

 

 

=========================== 
virtually hanzz...

 

 <http://hanzz.zapto.org> http://hanzz.zapto.org (personal)
 <http://www.cse.dmu.ac.uk/~hansp> http://www.cse.dmu.ac.uk/~hansp
(research)

 






 





 


Mime
View raw message