* sets the hibernate session factory into the default configured persistence
* service, overwriting the configured session factory (if there is one configured).
* @throws ClassCastException if another persistence service is configured then the default.
*/
public void setSessionFactory(SessionFactory sessionFactory) {
PersistenceService persistenceService = getPersistenceService();
if (persistenceService==null) return;
persistenceService.setSessionFactory(sessionFactory);
}