}
if(finderMethod.getParameterTypes().length != 1) {
throw MESSAGES.illegalNumberOfArgumentsForFindByPrimaryKey(finderMethod.getParameterTypes().length);
}
final ReadyEntityCache cache = cmpComponent.getCache();
if(cache.containsNotRemoved(context.getParameters()[0])) {
return this.localHome ? cmpComponent.getEJBLocalObject(context.getParameters()[0]) : cmpComponent.getEJBObject(context.getParameters()[0]);
}
}else if(!store.getCmpConfig().isSyncOnCommitOnly()) {
cmpComponent.synchronizeEntitiesWithinTransaction(entityContext.getTransaction());
}