• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • DSO:L1
  • hhuynh
  • Reporter: asi
  • August 16, 2007
  • 1
  • Watchers: 1
  • October 27, 2008
  • September 06, 2007

Description

If an app invoke hibernate SessionFactory.close() when running ehcache, it will shutdown CacheMaanger. When running in a cluster, since the CacheManager is shared, other node will get an IllegalStateException when trying to access the CacheManager later.

Comments

Fiona OShea 2007-08-17

Take care of this at the Hibernate level

Antonio Si 2007-08-20

For the time being, I am making the SessionFactory.close() method an no-op.

Please let me know if there is any concerns/issues.

Russell Pitre 2007-08-30

This jira issue says there is a workaround but does not describe what it is. Does anyone know what the workaround is?

Antonio Si 2007-08-30

The SessionFactory.close() calls org.hibernate.cache.EhCache.destroy() which removes a cache and calls org.hibernate.cache.EhCacheProvider.stop() which shutdowns the CacheManager.

For the time being, we are making these 2 methods an no-op when hibernate with ehcache as 2nd level cache running in a clustered mode.

Russell Pitre 2007-08-30

I’m running Terracotta 2.4.1 at the moment. How do i configure this for the time being untill the fix is released?

Antonio Si 2007-09-06

The fixes will be available in the upcoming releases or our nightly build.