Update of /cvsroot/hibernate/Hibernate3/src/org/hibernate/cache
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17010/src/org/hibernate/cache
Modified Files:
Tag: Branch_3_1
TreeCache.java
Log Message:
HHH-1251 : non-replicated clearing of TreeCache on SessionFactory shutdown
Index: TreeCache.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate3/src/org/hibernate/cache/TreeCache.java,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -u -d -r1.17 -r1.17.2.1
--- TreeCache.java 10 Aug 2005 04:54:07 -0000 1.17
+++ TreeCache.java 21 Feb 2006 14:07:58 -0000 1.17.2.1
@@ -126,7 +126,17 @@
}
public void destroy() throws CacheException {
- clear();
+ try {
+ // NOTE : evict() operates locally only (i.e., does not propogate
+ // to any other nodes in the potential cluster). This is
+ // exactly what is needed when we destroy() here; destroy() is used
+ // as part of the process of shutting down a SessionFactory; thus
+ // these removals should not be propogated
+ cache.evict( new Fqn( regionName ) );
+ }
+ catch( Exception e ) {
+ throw new CacheException( e );
+ }
}
public void lock(Object key) throws CacheException {
|