Pergunta

I need to use JPA 2 in my application. Currently the application uses hibernate 3 and is working full flegedly without any bug. The Client wants to include IBM JPA 2 implementation in place of hibernate.

I wanted to know what would be the steps involved in adding JPA in a existing hibernate application. Will I have to remove hibernate from dao classes only or will there be some more changes?

Foi útil?

Solução

You need to consider the following steps when migrating from Hibernate 3.0 to IBM JPA 2.0:

  1. Session vs EntityManager
  2. Slightly different query syntax
  3. Hibernate.cfg.xml to ORM and annotations
  4. Update code to run on WebSphere v7.0 (Since you need to use WebSphere)
  5. Update with new JPA 2.0 functionality
  6. Comparable functions: Caching
  7. Comparable functions: Criteria API
  8. Using the enhancer

According to the number of years the architect has experience and specifically in these 2 areas of Hibernate and JPA, the migration could take from 5 man-days to 10 man-days fully functional with no deadlocks or memory leaks.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top