// Cannot start logging until session and log and initialized, so log start of predeploy here.
session.log(SessionLog.FINEST, SessionLog.JPA, "predeploy_begin", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), session.getName(), state, factoryCount});
if (isSessionLoadedFromSessionsXML) {
if (this.compositeEmSetupImpl == null && this.staticWeaveInfo == null) {
JPAClassLoaderHolder privateClassLoaderHolder = session.getServerPlatform().getNewTempClassLoader(persistenceUnitInfo);
classLoaderToUse = privateClassLoaderHolder.getClassLoader();
} else {
classLoaderToUse = persistenceUnitInfo.getNewTempClassLoader();
}
// Loading session from sessions-xml.
String tempSessionName = sessionName;