Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Upgrade EJB2 Application to EJB3

 
Kevin Sheng
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have EJB2 application and I want to move it to EJB3. Has anyone ever done this? Is it worth doing it?
Your ideas are appreciated.
 
s patnaik
Ranch Hand
Posts: 45
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There definitely have been applications that moved to EJB 3.

Whether its worthy or not is for you to decide considering what you want to gain out of it !
 
Kevin Sheng
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply. Is there any guideline or recommended approach for doing it properly?

Many Thanks
 
s patnaik
Ranch Hand
Posts: 45
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats a pretty generic question. Have you tried googling for migrating from 2.x to 3.x? There are lots of books and online articles on it.
Off the top of my mind, I enjoyed reading EJB3 in action and that has a chapter for migrating.

 
David Blevins
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's been a while since anyone has tried it, but this Eclipse plugin does have some ability to convert EJB 2.x xml metadata to the equivalent EJB 3.x annotations:

http://www.apache.org/dist/openejb/eclipse-plugin/

It will read the ejb-jar.xml and actually insert the annotations in the code. Note this is maybe 1/3 of the effort. Converting Home and LocalHome to be business interfaces will take some work. As well if you have heavy use of CMP 2.x that will be quite a lot more work to convert to JPA.
 
Kevin Sheng
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the information.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic