checkEntityManagerScopePassivable(lockMode);
}
}
private void checkEntityManagerScopePassivable(LockModeType lockMode) {
EntityManagerConfig configuration = getConfiguration();
if (configuration.getEntityManagerScope()==EntityManagerScope.CONVERSATION
|| configuration.getEntityManagerScope()==EntityManagerScope.SESSION
|| configuration.getEntityManagerScope()==EntityManagerScope.VIEW){
if (lockMode!=null
&& lockMode!=LockModeType.NONE
&& lockMode!=LockModeType.OPTIMISTIC_FORCE_INCREMENT){
String message = getBundle().getString("passivable-scope-without-optimistic-lock" , configuration.getEntityManagerScope().toString());
getLogger().error(message);
throw new DemoiselleException(message);
}
}
}