How to configure on Tomcat

1. copy lib/development/spring-instrument-tomcat.jar to tomcat/lib/ext
2. Edit conf/Catalina/localhost/ROOT.xml and add this line in the "Context" element.

    <Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/>
3. Delete hibernate3.jar from WEB-INF/lib
4. Copy to WEB-INF/lib
5. configure

    1. persistence.provider=jpa
transaction.isolation.portal=-1   # Notice that the value is negative 1 which means default
    3. transaction.isolation.counter=-1 



  • Works only with TopLink and EclipseLink.
  • Although JPA is a spec, not everything works with just any JPA provider. See this blog for details.
    • Hibernate JPA has these bugs
    • OpenJPA has this bug


  1. Make it work with OpenJPA and Hibernate JPA
  2. Test with other transaction managers
  3. Test with other App Servers
  4. Dynamic Query API
  5. Implement query cache using provider specific hints
  6. Current ScrollableResults is a minimal, non-optimal implementation. Since JPA does not provide one, should implement our own or leverage various mechanisms in a provider specific manner. See toplink-tips and eclipselink-ext.
  7. Remove any hibernate dependence
    1. com.liferay.counter.service.persistence.IDGenerator (if unused, remove)
    2. com.liferay.portal.dao.shard.ShardSessionFactoryTargetSource
    3. Fix HIBERNATE_JDBC_BATCH_SIZE in BatchSessionImpl


0 archivos adjuntos
41013 Accesos
Promedio (0 Votos)
La valoración media es de 0.0 estrellas de 5.
Respuestas anidadas Autor Fecha
Will the end result be that Liferay orm... Richard Knight 30 de junio de 2009 12:34
No. The mappings will be available as orm.xml... Prashant Dighe 30 de agosto de 2009 17:53

Will the end result be that Liferay orm mappings will be available through JPA annotations?
Publicado el día 30/06/09 12:34.
No. The mappings will be available as orm.xml just like hibernate mappings are in hbm.xml
Publicado el día 30/08/09 17:53 en respuesta a Richard Knight.