//First try loading with the Login's class loader
platformClass = this.getClass().getClassLoader().loadClass(platformClassName);
DatasourcePlatform platform = null;
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
platform = (DatasourcePlatform)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(platformClass));
} catch (PrivilegedActionException exception) {
throw exception.getException();
}
} else {
platform = (DatasourcePlatform)PrivilegedAccessHelper.newInstanceFromClass(platformClass);
}
usePlatform(platform);
// EclipseLink 23869 - Initialize plaformOperators eagerly to avoid concurrancy issuese.
platform.getPlatformOperators();
} catch(Throwable cne) {
//next try using ConversionManager
try {
platformClass = ConversionManager.loadClass(platformClassName);
Platform platform = null;
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
platform = (Platform)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(platformClass));
} catch (PrivilegedActionException exception) {
throw ValidationException.platformClassNotFound(exception.getException(), platformClassName);
}
} else {
platform = (Platform)PrivilegedAccessHelper.newInstanceFromClass(platformClass);