Hello,
In order to avoid locking for TX or CTX in the
EntityInstanceInterceptor, I've basically added a flag to indicate whether the
bean can be optimized for read only operation. In the
EntityInstanceInterceptor, where the loop actually wait for the lock I've added
a condition
isReadOptimized = metadata.isReadOptimized();
if(!isReadOptimized)
{ ...
...
go about as usual trying to aquire lock etc
}
mi.setEnterpriseContext(ctx);
return
getNext().invoke(mi);
and in the finally clause
if (ctx != null && (!isReadOptimized))
{
//business as usual code
}
What is good is that I no longer have my response times creeping up under
sustained loads.
Does
this look alright? Does anyone anticipate any other problems due to this. Would
really appreciate if folks who really have the 'bigger picture' can let me
know.
Thanks
Vinay
|
- Re: [JBoss-dev] Avoiding Locks for READ-ONLY Be... K.V. Vinay Menon
- Re: [JBoss-dev] Avoiding Locks for READ-ON... Dan OConnor
- Re: [JBoss-dev] Avoiding Locks for REA... K.V. Vinay Menon
- Re: [JBoss-dev] Avoiding Locks for READ-ON... Georg Rehfeld
- Re: [JBoss-dev] Avoiding Locks for REA... K.V. Vinay Menon
- RE: [JBoss-dev] Avoiding Locks for... Bill Burke
- Re: [JBoss-dev] Avoiding Locks... danch (Dan Christopherson)
- Re: [JBoss-dev] Avoiding Locks... Georg Rehfeld
- RE: [JBoss-dev] Avoiding ... Bill Burke
- Re: [JBoss-dev] Avoid... danch (Dan Christopherson)
- RE: [JBoss-dev] A... Bill Burke