Hi all,<div><br></div><div>in a servlet environment, you sometimes have to claim back a thread for your thread pool.</div><div>Jetty has a nice "denial of service attack" filter and a setting (maxIdleTime) interrupting servlet threads if nothing comes out (nothing is written in the pipe).</div>
<div><br></div><div>Well it does not play well with infinispan. Everybody knows that when you open a stream, the best way to reclaim scarce resources is to close it in a 'finally' statement. What about applying it to infinispan locking mechanism ? ;-)</div>
<div><br></div><div>Calls to acquireLock should be guarded by a finally {releaseLock} (at least to catch an interruptedException)</div><div><br></div><div>It looks very easy to implement, but since releaseLock does not seems to be called every time in the code, I need help !</div>
<div><br></div><div>The only places where aquireLock is called are CacheLoaderInterceptor.loadIfNeeded and EntryFactoryImpl.wrapEntryForWriting.</div><div><br></div><div>And BTW, the locks never expire ... so if you interrupt a thread and the lock is not released, you better say bye bye to the cache entry!</div>
<div><br></div><div>Cheers,</div><div><br></div><div>Phil</div>