/** * Create a new instance synchronization instance. */ InstanceSynchronization(Transaction tx, EntityEnterpriseContext ctx) { this.tx = tx; this.ctx = ctx; this.lock = container.getLockManager().getLock(ctx.getCacheKey()); }
BeanLock lock = getLockManager().getLock(id); lock.sync(); try
lock = container.getLockManager().getLock(key); try
if(id != null) BeanLock lock = container.getLockManager().getLock(id); try
public Object invokeHome(Invocation mi) throws Exception { EntityEnterpriseContext ctx = (EntityEnterpriseContext)mi.getEnterpriseContext(); Transaction tx = mi.getTransaction(); Object rtn = getNext().invokeHome(mi); // An anonymous context was sent in, so if it has an id it is a real instance now if(ctx.getId() != null) { // it doesn't need to be read, but it might have been changed from the db already. ctx.setValid(true); if(tx != null) { BeanLock lock = container.getLockManager().getLock(ctx.getCacheKey()); try { lock.schedule(mi); register(ctx, tx); // Set tx lock.endInvocation(mi); } finally { container.getLockManager().removeLockRef(lock.getId()); } } } return rtn; }
BeanLock lock = getContainer().getLockManager().getLock(id); boolean lockedBean = false; try
EnterpriseContext ctx = null; BeanLock lock = container.getLockManager().getLock(methodID); boolean callerRunAsIdentityPresent = SecurityActions.peekRunAsIdentity() != null; boolean pushSecurityContext = SecurityActions.getSecurityContext() == null;
BeanLock lock = container.getLockManager().getLock(ctx.getCacheKey());