• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 1.1 to EJB 2.0 conversion  RSS feed

 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've just read some basic specs about EJB 2.0 and I am a little bit disapointed.
My understanding is that if I have an CMP EJB 1.1 and I want to convert it to 2.0, I nearly have to recode it from scratch.
1. the fields are not defined anymore in the class, but abstracts getter/setters instead
2. the bean has now to be abstract, while it was not the case in 1.1
3. the DD has a new syntax
4. there is a set of new methods to implement (actually, this is not the worth. It's just an add, not a modification)
It' sounds like I'm compelled to do a lot of work to take advantage of the 2.0 power.
Any obvious alternative solutions I've missed ?
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The rule is that all the application server vendors must support backward compatibility. But if you want to take advantage of the new functionality then you must re-code your EJBs. Of course, you could probably write a program to convert source from the old to the new format. Maybe I'll do that if I have the time.
------------------
Tom
Sun Certified Programmer for the Java� 2 Platform
Moderator of the forums:
J2EE and EJB
Other Java APIs
 
Phil Sharp
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vendors may or may not provide converters for you.
We use WebLogic and they provided a converter - DDConverter. See WebLogic EJB doc for more info if thats what you use. I presume other vendors provide similar utilities.
Have to say it did not work that well for us and we still ended up making manual changes on top but its a start.
Phil
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course a converter could provide some help to speed up the conversion process.
Nevertheless, I've never seen such a tool working so well that it does not need to perform some work "manually"
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!