This content has been marked as final.
Show 3 replies
-
1. Re: NullPointerException in PessimisticLockInterceptor
genman Sep 12, 2007 10:38 PM (in response to jacek187)It's hard to analyze the problem if you don't provide the version number you're using or the code you're running or the configuration.
As for sharing your opinion ... I don't know if it's designed to generate a helpful response. Do you want to be helped? -
2. Re: NullPointerException in PessimisticLockInterceptor
jacek187 Sep 14, 2007 6:10 AM (in response to jacek187)i have analyzed this problem and this is caused by asynchronus transaction rollback. More details in thread:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=118186,
When transaction entry is removed in separate thrad, corresponding TransactionEntry couldn't be foundm, so hasBeenRemovedInCurrentTx, has nul first argument and in first line NPE is thrown.private boolean hasBeenRemovedInCurrentTx(TransactionEntry te, Fqn f) { if (te.getRemovedNodes().contains(f)) return true; (...)
Jacek Halat -
3. Re: NullPointerException in PessimisticLockInterceptor
manik Sep 17, 2007 9:08 AM (in response to jacek187)"jacek187" wrote:
In my opinion TreeCache is yet NOT READY for production use. Probably it works in simple single-thread applications, but in real situations, with many concurent threads TreeCache dosen't work correctly...
No, more specifically, it IS ready for production use in multi threaded systems, but cleary does NOT behave well when used with a transaction manager that cleans up timed out transactions in a separate thread - specifically WebLogic's TM. This is evident in some of the JIRAs you have raised (such as JBCACHE-923).
The solution to this problem is unfortunately not that straightforward, since locks in JBC are obtained either on the Thread (in the case of non-tx operation) or a GlobalTransaction (in the case of running within a tx). Implicit in the design is that only one thread would ever use a GlobalTransaction object at a given time, and this is where it all breaks down when you have a TM that performs rollbacks in a separate thread. It opens up the possibility for the TM to be trying to obtain locks on a node to roll back, while your app thread tries to obtain locks on the same node to write to it. This WILL be allowed since they both pertain to the same GlobalTransaction object.
Jacek, I'd recommend joining the JBoss Cache dev mail list - we will be discussing this problem in more detail there.
Cheers,
Manik