* service, preventing the creation of a session from the configured
* session factory (if there is one configured).
* @throws ClassCastException if another persistence service is configured then the default.
*/
public void setSession(Session session) {
DbPersistenceService persistenceService = (DbPersistenceService) getPersistenceService();
if (persistenceService==null) return;
persistenceService.setSession(session);
}