* allows users to provide a jdbc connection to be used when the hibernate
* session is created.
* @throws ClassCastException if another persistence service is configured then the default.
*/
public void setConnection(Connection connection) {
DbPersistenceService persistenceService = (DbPersistenceService) getPersistenceService();
if (persistenceService==null) return;
persistenceService.setConnection(connection);
}