RE: [Opensymphony-oscache] Deadlock using GeneralCacheAdministrator
"Chris Miller" <[email protected]> Thu, 01 Sep 2005 09:58:36 +0000
| Newsgroups | gmane.comp.java.open-symphony.os-cache |
|---|---|
| Message-ID | <[email protected]> |
Sounds like the classic dining philosophers problem. You need to ensure that locks are aquired in the same order from all parts of your code. Since OSCache has no knowledge of JBoss or its mutexes, I'm not sure there's much that can be done from the OSCache side of the fence (even using non-blocking retrieves will potentially cause problems with entries that don't exist, since simultaneous requests for a non-exisitant entry will still block). You need to ensure that all code paths that potentially use both a JBoss transaction and make an OSCache retrieve always result in these two locks being aquired in the same order. Sound reasonable?