} else if ( -1 == pentahoObjectFactoryConfigFile.indexOf( "/" ) ) { //$NON-NLS-1$
pentahoObjectFactoryConfigFile =
solutionPath + SYSTEM_FOLDER + "/" + pentahoObjectFactoryConfigFile; //$NON-NLS-1$
}
// else objectFactoryCreatorCfgFile contains the full path.
IPentahoObjectFactory pentahoObjectFactory;
try {
Class<?> classObject = Class.forName( pentahoObjectFactoryClassName );
pentahoObjectFactory = (IPentahoObjectFactory) classObject.newInstance();
} catch ( Exception e ) {
String msg =
Messages.getInstance().getErrorString(
"SolutionContextListener.ERROR_0002_BAD_OBJECT_FACTORY", pentahoObjectFactoryClassName ); //$NON-NLS-1$
// Cannot proceed without an object factory, so we'll put some context around what
// we were trying to do throw a runtime exception
throw new RuntimeException( msg, e );
}
pentahoObjectFactory.init( pentahoObjectFactoryConfigFile, context );
PentahoSystem.registerPrimaryObjectFactory( pentahoObjectFactory );
}