dbSession = (DatabaseSession) SessionManager.getManager().getSession(sessionLoader, sessionName, classLoader, false, true);
} else {
dbSession = (DatabaseSession) SessionManager.getManager().getSession(sessionLoader, sessionName, PrivilegedAccessHelper.privilegedGetClassLoaderForClass(this.getClass()), false, false, false);
}
if ((dbSession.getDatasourceLogin() == null) || !(dbSession.getDatasourceLogin().getDatasourcePlatform() instanceof XMLPlatform)) {
XMLPlatform platform = new SAXPlatform();
dbSession.setLogin(new XMLLogin(platform));
}
DatabaseSession session = dbSession.getProject().createDatabaseSession();
if (dbSession.getEventManager().hasListeners()) {
List listeners = dbSession.getEventManager().getListeners();