I am giving a talk (BOF-Migrating EJB 1.X to EJB 2.x container) at the upcoming JavaOne conference and would like to also include experiences of other developers so I welcome your input:
1. What was the biggest challenge with the migration?
2. what was your migration and implementation strategy?
3. Did it result in improved performance? By how much?
4. how long did the migration take?
5. what are some of the lessons you have learned if any?
I will acknowledge your inputs in my talk. Thanks.
I migrated an application from Websphere 3.5 (EJB 1.1) to JBoss (EJB 2.x). The application contained stateful and stateless session beans and container-managed entity beans.
1. The biggest challenge I faced was substituting vendor-specific implementation code and deployment settings where necessary. I also had to write EJB 2.x compliant EJB-QL and make changes to conform to the new specification (e.g., replace Enumeration with Collection on aggregate finders and replace deprecated exception handling).
2. My basic strategy was to get my entity and session beans to conform to the specification and to properly deploy them with JBoss. I used JUnit to ensure that functional integrity was preserved. Because I used a Business Delegate pattern along with a Session facade, the migration was very simple.
3. Performance improved dramatically, but I attribute this more to using an Oracle database with JBoss as opposed to a DB2 database implementation integrated with Websphere. I do not have any metrics to quantify the degree of improvement.
4. 2 days. This includes switching database providers as well.
5. I have learned that vendor-specific implementations can hinder the "write once, run anywhere" principle. The change in specification also requires additional development/migration time as well. However, I have also learned that by properly using design patterns and container-managed persistence, migration from one platform to another can be handled with relative ease.
I migrated from Weblogic 5.1 to 6.1. As part of this migration we converted all our EJB1.x beans to EJB2.0
1. The biggest challenge we had was the number of beans we had migrate. There were 100 EJBs [ 40SLSB and 60EB ]
2. The strategy was to convert all the entity beans first and write appropriate test cases for them, followed by converting the session beans and writing test cases for them.
3. Well, we still have to go live with the migrated system. But I am assuming there will be significant performance improvement.
4. Entire migration with development of test cases took us just above 4 months. [ we had 4 - 5 resources actively working on during this period ]
5. Some major lessons learnt include ..
* What it takes to convert a bean from EJB1.x to EJB2.x [ can't return Enumeration etc.. ]
* Were forced to convert a few CMPs to BMPs as part of the migration.
* During the migration we found other bottlenecks in the system which were hiding for a long time
* And finally the importance of unit tests and a proper build environment for faster/reliable development