0

I'm in the middle of converting a 10-year-old Java EE application to more modern standards. The next phase of this effort involves replacing my EJB 1.1 code with EJB 3.0 code. I've done a lot of reading up on EJB 3.0. However, there seems to be relatively little information on making the direct jump from 1.1 to 3.0, perhaps because the technology evolved so much between the two releases. Can anyone who has gone through this exercise before offer any advice or pointers to any useful reference material? The plan at the moment is to try and preserve as much as possible in the facades, and just let NetBeans create the new EJB classes automatically from the database schema.

Steve Ferguson
  • 792
  • 3
  • 10
  • 21

1 Answers1

1

I fear that it's easier and faster to reimplement the application (or at least the parts you cannot leave untouched and still use as a legacy service) from scratch, even though it may be harder to explain to management.

Concerning specific help, Adam Bien speaks a lot of transferring J2EE projects to Java EE (although they are usually 2.x) in his talks and he has a good book on how the design patterns changed between the 2 and how to change your code accordingly, maybe this helps:

http://press.adam-bien.com/real-world-java-ee-patterns-rethinking-best-practices.htm

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Alexander Rühl
  • 6,769
  • 9
  • 53
  • 96
  • Thank you for the pointers. I'll check into the book and see if that help me move forward. We have no choice but to migrate the app, as our entire infrastructure on which it currently runs is so old that none of the components are supported any longer. And it seems none of the available options among current offerings supports the old technology in use here. – Steve Ferguson Jul 26 '11 at 19:23
  • Well, I wish you good luck, but this seems to me a huge kind of work. Changing a 10 years old application in IT is like trying to plug your electronic typewriter as a printer into your laptop computer. No seriously, wouldn't it be an option to show to management that re-implementing parts of the application and providing a new hardware for that would be faster and cheaper than trying to port an antique application on an antique infrastructure? You maybe could still be able to use core components which do not have to be changed as legacy systems. – Alexander Rühl Jul 27 '11 at 07:50
  • This is to some extent the approach we've settled on. I've recreated the session beans by using NetBeans to build the stubs, then copying over the business methods and making some tweaks. I'll be recreating the entity beans from scratch using NetBeans and just hooking it up to our db schema so it can do most of the work for me. The integration with the rest of the POJOs in the code base has been reasonably straightforward. There are a few strange edge cases I have to iron out, but I think we're moving. The whole thing shouldn't take more than a month to complete, I expect. – Steve Ferguson Jul 28 '11 at 12:40
  • Hi Steve, could you please briefly list your approach. I am in a similar situation now and need to upgrade ejb 1.1 to 3 thanks – oortcloud_domicile Mar 20 '12 at 18:23