-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: migration to EJB 3.0 with hibernate
PostPosted: Mon Nov 28, 2005 4:23 am 
Newbie

Joined: Mon Nov 28, 2005 3:30 am
Posts: 2
Hi,

my project involves taking an EJB 2.x app and migrating(re-writting) it to EJB 3.0 using hibernate, where the older app used CMP & xdoclet for some code generation.

If somebody could offer steps on how I could go about this, would be great.

_________________
arizona state university undergrad


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 10:36 am 
Beginner
Beginner

Joined: Mon Jun 06, 2005 4:23 am
Posts: 41
Location: Hagenberg, AUSTRIA
hi!

here are some steps which you want to try:

1st: read the ejb3.0 and hibernate persistence specifications which can be found at the hibernate.org

2nd step: reverse engineer database tables. use the hibernate tools plugin for eclipse which supports ejb3 annotations. if you have a proper designed database-schema then the plugin recognizes the primary keys, foreign keys and their related associations. there are some ant tasks which do that for you, too. within this step you need to configure the connection to the database within a "hibernate-config-file". a reverse-engineering file could be useful. docu for all that features can be found under hibernate.org as mentioned.

3rd step: migrate the rest of your application using the right annotations.

xdoclet is not required any long when using ejb3.0 and hibernate.

hope that helps in some way.

best regards
patrik

ps.: a sample sourcecode can be found at http://caveatemptor.hibernate.org


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 2:10 pm 
Newbie

Joined: Mon Nov 28, 2005 3:30 am
Posts: 2
Thank you for your reply, I am still in the dark about how xdoclet would not be required though, will study the resources that you have cited. Would the app still work if I left the original Xdoclet annotations in there while adjusting it for EJB 3.0 and hibernate?

Thank you

_________________
arizona state university undergrad


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 29, 2005 2:54 am 
Beginner
Beginner

Joined: Mon Jun 06, 2005 4:23 am
Posts: 41
Location: Hagenberg, AUSTRIA
i don't know exactly, i haven't try something like this before...

i guess they're ignored because they're within comments...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 29, 2005 4:05 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
It must be easy to migrate if application is designed using "value object" and "session facade" stuff. Just drop entity beans, annotate "value object" and write queries using EntityManager API in "facade" implementation. If you access entity beans directly then it must be a problem to migrate, probably you will need to redesign application.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.