[jboss-user] [JBossCache] - Re: Write lock is not released
vitamin-c
do-not-reply at jboss.com
Thu Sep 6 08:34:31 EDT 2007
"manik.surtani at jboss.com" wrote :
| It looks like the current WL holder and the RL requestor are not the same:
|
| | ... could not be acquired by <zzz:4256>:162303 ...
| |
| and
|
| | ... Write lock owner: Thread[ReportDataTaskRunner-20521017-1,5,jboss] ...
| |
|
Is it OK that RL requestor thread uses a GlobalTransaction, whereas WL owner thread doesn't?
Here's the code, where a GlobalTransaction is assigned to a thread requesting a lock (either RL or WL):
| package org.jboss.cache.interceptors;
| ...
| public class LockInterceptor extends Interceptor {
| ...
| public Object invoke(MethodCall m) throws Throwable {
| ...
| GlobalTransaction gtx=null;
| ...
| if(tx_mgr != null && (tx=tx_mgr.getTransaction()) != null && isValid(tx)) { // ACTIVE or PREPARING
| if(!transactions.contains(tx)) {
| gtx=cache.getCurrentTransaction(tx);
| if(gtx == null)
| throw new Exception("failed to get global transaction");
| ...
| else {
| gtx=cache.getTransactionTable().get(tx);
| }
| ...
|
Assuming that transaction manager presents, it is still unclear will a thread receive a non-null gtx, since cache.getTransactionTable().get(tx) doesn't check for null return value. According to metastaz's observations a thread may or may not receive a gtx, which looks like a bug, doesn't it?
Thanks,
Alexey
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081653#4081653
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081653
More information about the jboss-user
mailing list