// entity instance as "no longer in use". If it registered a tx EntityBeanSynchronization, then releasing the lock is
// taken care off by a tx synchronization callbacks.
//if is important to note that we increase the lock count on every invocation
//which means we need to release it on every invocation except for the one where we actually registered the TX synchronization
if (currentTransactionKey == null) {
instance.store();
releaseInstance(instance, true);
} else if (!syncRegistered) {
component.getCache().release(instance, true);
lock.unlock();
}