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 Anhänge
41010 Angesehen
Durchschnitt (0 Stimmen)
Die durchschnittliche Bewertung ist 0.0 von max. 5 Sternen.
Antworten im Thread Autor Datum
Will the end result be that Liferay orm... Richard Knight 30. Juni 2009 12:34
No. The mappings will be available as orm.xml... Prashant Dighe 30. August 2009 17:53

Will the end result be that Liferay orm mappings will be available through JPA annotations?
Gepostet am 30.06.09 12:34.
No. The mappings will be available as orm.xml just like hibernate mappings are in hbm.xml
Gepostet am 30.08.09 17:53 als Antwort auf Richard Knight.