jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tore Halset <hal...@pvv.ntnu.no>
Subject shutdown
Date Fri, 12 Oct 2007 08:07:31 GMT
Hello.

My JCS live in a WAR deployed in JBoss. I am trying to shutdown my  
disc based JCS during redeployment. To do this, I have a servlet  
Filter that has the following method. Is this the best way to detect  
undeployment?

public void destroy() {
   if(!jcsdown) {
   CompositeCacheManager compositeCacheManager =  
CompositeCacheManager.getInstance();
   compositeCacheManager.release();
   compositeCacheManager.shutDown();
   jcsdown = true;
  }
}

It looks like the cache are shut down and the .key are updated. The  
object in memory are however not spooled to disc. JCS logs the  
following exception.

09:54:11,594 ERROR [IndexedDiskCache] Region [myRegion] Failure  
updating element, key: myKey old: null
java.lang.InterruptedException
         at  
EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock 
$WriterLock.acquire(WriterPreferenceReadWriteLock.java:234)
         at  
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.doUpdate 
(IndexedDiskCache.java:433)
         at org.apache.jcs.auxiliary.disk.AbstractDiskCache 
$MyCacheListener.handlePut(AbstractDiskCache.java:603)
         at org.apache.jcs.engine.CacheEventQueue$PutEvent.doRun 
(CacheEventQueue.java:688)
         at org.apache.jcs.engine.CacheEventQueue 
$AbstractCacheEvent.run(CacheEventQueue.java:607)
         at org.apache.jcs.engine.CacheEventQueue$QProcessor.run 
(CacheEventQueue.java:575)

What should I do to make the object in memory spooled to disc during  
shutdown and prevent this InterruptedException?

Attached is the complete log output.

Regards,
  - Tore.


09:54:11,182 INFO  [CompositeCache] In DISPOSE, [myRegion] fromRemote  
[false]
Region Name = myRegion
HitCountRam = 0
HitCountAux = 0
---------------------------LRU Memory Cache
List Size = 1
Map Size = 1
Put Count = 1
Hit Count = 0
Miss Count = 1
---------------------------Indexed Disk Cache
Is Alive = true
Key Map Size = 0
Data File Length = 0
Hit Count = 0
Bytes Free = 0
Optimize Operation Count = 0
Times Optimized = 0
Recycle Count = 0
Recycle Bin Size = 0
Startup Size = 0
Purgatory Hits = 0
Purgatory Size = 0
Working = true
Alive = false
Empty = true
Size = 0
09:54:11,182 INFO  [CompositeCache] In DISPOSE, [myRegion] auxiliary  
[org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache@6d3ac6]
09:54:11,183 INFO  [CacheEventQueue] Cache event queue created:  
CacheEventQueue [listenerId=-1825356115, cacheName=myRegion]
09:54:11,184 INFO  [CompositeCache] In DISPOSE, [myRegion] put 1 into  
auxiliary org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache@6d3ac6
09:54:11,285 INFO  [AbstractDiskCache] No longer waiting for event  
queue to finish: Cache Event Queue
Working = true
Alive = true
Empty = true
Size = 0
09:54:11,285 INFO  [AbstractDiskCache] In dispose, destroying event  
queue.
09:54:11,285 INFO  [CacheEventQueue] Destroying queue, stats =  Cache  
Event Queue
Working = true
Alive = false
Empty = true
Size = 0
09:54:11,286 INFO  [CacheEventQueue] Cache event queue destroyed:  
CacheEventQueue [listenerId=-1825356115, cacheName=myRegion]
09:54:11,594 ERROR [IndexedDiskCache] Region [myRegion] Failure  
updating element, key: myKey old: null
java.lang.InterruptedException
         at  
EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock 
$WriterLock.acquire(WriterPreferenceReadWriteLock.java:234)
         at  
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.doUpdate 
(IndexedDiskCache.java:433)
         at org.apache.jcs.auxiliary.disk.AbstractDiskCache 
$MyCacheListener.handlePut(AbstractDiskCache.java:603)
         at org.apache.jcs.engine.CacheEventQueue$PutEvent.doRun 
(CacheEventQueue.java:688)
         at org.apache.jcs.engine.CacheEventQueue 
$AbstractCacheEvent.run(CacheEventQueue.java:607)
         at org.apache.jcs.engine.CacheEventQueue$QProcessor.run 
(CacheEventQueue.java:575)
09:54:11,690 INFO  [IndexedDiskCache] Region [myRegion] Shutdown  
complete.
09:54:11,690 INFO  [CompositeCache] In DISPOSE, [myRegion] disposing  
of memory cache.
09:54:11,690 INFO  [AbstractMemoryCache] Memory Cache dispose  
called.  Shutting down shrinker thread if it is running.
09:54:11,691 INFO  [CompositeCache] In DISPOSE, [myRegion] fromRemote  
[false]
Region Name = myRegion
HitCountRam = 0
HitCountAux = 0
---------------------------LRU Memory Cache
List Size = 0
Map Size = 0
Put Count = 1
Hit Count = 0
Miss Count = 1
---------------------------Indexed Disk Cache
Is Alive = false
Key Map Size = 0
Data File Length = -1
Hit Count = 0
Bytes Free = 0
Optimize Operation Count = 0
Times Optimized = 0
Recycle Count = 0
Recycle Bin Size = 0
Startup Size = 0
Purgatory Hits = 0
Purgatory Size = 0
Working = true
Alive = false
Empty = true
Size = 0





---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Mime
View raw message