Author: olamy
Date: Sat Dec 22 14:22:00 2012
New Revision: 1425283

URL: http://svn.apache.org/viewvc?rev=1425283&view=rev
Log:
dispose cache must be annotated with @PreDestroy to ensure correct shutdown

Modified:
    
archiva/redback/redback-components/trunk/spring-cache/spring-cache-providers/spring-cache-ehcache/src/main/java/org/apache/archiva/redback/components/cache/ehcache/EhcacheCache.java

Modified: 
archiva/redback/redback-components/trunk/spring-cache/spring-cache-providers/spring-cache-ehcache/src/main/java/org/apache/archiva/redback/components/cache/ehcache/EhcacheCache.java
URL: 
http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-cache/spring-cache-providers/spring-cache-ehcache/src/main/java/org/apache/archiva/redback/components/cache/ehcache/EhcacheCache.java?rev=1425283&r1=1425282&r2=1425283&view=diff
==============================================================================
--- 
archiva/redback/redback-components/trunk/spring-cache/spring-cache-providers/spring-cache-ehcache/src/main/java/org/apache/archiva/redback/components/cache/ehcache/EhcacheCache.java
 (original)
+++ 
archiva/redback/redback-components/trunk/spring-cache/spring-cache-providers/spring-cache-ehcache/src/main/java/org/apache/archiva/redback/components/cache/ehcache/EhcacheCache.java
 Sat Dec 22 14:22:00 2012
@@ -30,6 +30,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
 
 /**
  * EhcacheCache
@@ -214,6 +215,7 @@ public class EhcacheCache
         }
     }
 
+    @PreDestroy
     public void dispose()
     {
         if ( cacheManager.getStatus().equals( Status.STATUS_ALIVE ) )


Reply via email to