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 Attachments
Average (0 Votes)
The average rating is 0.0 stars out of 5.
Threaded Replies Author Date
Will the end result be that Liferay orm... Richard Knight June 30, 2009 12:34 PM
No. The mappings will be available as orm.xml... Prashant Dighe August 30, 2009 5:53 PM

Will the end result be that Liferay orm mappings will be available through JPA annotations?
Posted on 6/30/09 12:34 PM.
No. The mappings will be available as orm.xml just like hibernate mappings are in hbm.xml
Posted on 8/30/09 5:53 PM in reply to Richard Knight.