• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

EJB 1.1 to EJB 2.0 conversion

 
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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"
 
But how did the elephant get like that? What did you do? I think all we can do now is read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic