• Post Reply Bookmark Topic Watch Topic
  • New Topic

Pro EJB 3.0: Refactoring

 
Anthony Karta
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike,

just my curiosity.

How hard is it (or is it possible and is it worthed) to refactor exisiting ejb 2.0 code to ejb 3.0?

Will ejb 2.0 application run on EE 5 application server?

thanks again
anthony
 
Mike Keith
author
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the general EJB 3.0 sense, and in a component scenario, it is far more likely to want to take a session bean and rejig it to make use of either the simplified implementation, or the simplified client interface. Both of these are possible. You can export both types of interfaces when using EJB 3.0, which will help a great deal when/if somebody wants to migrate or even just simplify their application.
 
Merrick Schincariol
author
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We included a chapter on migration and refactoring to provide some ideas on how to go about moving from EJB 2.x to EJB 3.0. The difficulty depends a lot on your current application architecture, but in general if you have embraced the existing J2EE patterns, there are opportunities to introduce JPA by taking advantage of the decoupling and isolation that these patterns promote.

Cheers,

Merrick
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Surely this isn't the Fowler's Refactoring
that's intended here, is it?

Going to EJB 3.0 doesn't mean the previous
code/design smelled badly.

What do you think?

Cheers,

Gian
 
Anthony Karta
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, from what I heard ejb 2.0 is a bad design! same with Microsoft COM object solution. bad thing is software engineering keep evoluting, not like accounting major.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no, EJB 2 is not an intrinsically bad design. It's just been abused to do a lot of things it shouldn't have been used for and has been superceded by different programming and design paradigms.
At the time it was created it was the normal way of doing things, it wasn't until a few years later and the takeoff of the "agile" craze that people started to think that having heavyweight components living inside a heavy application server which does a lot of magic might not always be the best way of doing things.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!