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

Reply via email to