views:

116

answers:

1

We would like to migrate an application written using EJB2.1 beans (both Entity and Sessions beans) to EJB3 to improve on maintanance and use new features in the EJB3 spec.

How would we do the migration and give the users the guarantee (if any) that the migrated system still works just as the old one. The original app didn't have test cases.

+2  A: 

How would we do the migration

I highly recommend to get EJB 3 in Action. It has a whole chapter dedicated to the migration to EJB 3 in which the authors explain how you can mix EJB 2.x and EJB 3, how to convert an application completely to EJB 3, provide guidelines for the migration of EJB 2.x component to EJB 3. Quoting the conclusion of the chapter:

Migration of session beans and MDBs to EJB 3 is easy but still requires you to carefully plan the process because client applications may break due to changes in the client view of EJBs between EJB 2 and EJB 3. Migration of CMP entity beans is the most difficult task, but you can simplify the migration if you use design patterns such as DTO, Session Façade, and DAO.

This chapter also explained how to convert JDBC DAOs to use the EJB 3 JPA. Finally, you saw that the migration from using existing O/R mapping frameworks to using the EJB 3 JPA is a very straightforward task. With these guidelines and a good knowledge of your applications, you will have no problem migrating your applications to use EJB 3.

IMO, getting a copy would be well worth it.

Meanwhile, here are a few articles that might help:

The original app didn't have test cases.

Creating integration and/or functional tests before the migration of each business flow is a must if you want to guarantee you won't introduce any regression. I consider this task to be part of the migration.

Pascal Thivent
thanks, especially for the EJB3 In Action book.
n002213f
@n002213f You're welcome. And good luck!
Pascal Thivent