try {
List<Object> l = ExtensionManager.findServices(null, Platform.class, FACTORY_CLASS);
if(l.size()>0) {
// Only get the first one...
try {
IPlatformFactory factory = (IPlatformFactory)l.get(0);
return factory.createPlatform();
} catch(Throwable e) {
e.printStackTrace();
}
}
} catch(Throwable e) {
// Not found...
}
// 2+- Try to find a factory with fixed name
// This is left temporally as it won't be in use when the Domino server will be restructured
try {
Class<?> factoryClass = Class.forName(FACTORY_CLASS); // $NON-NLS-1$
try {
IPlatformFactory factory = (IPlatformFactory)factoryClass.newInstance();
return factory.createPlatform();
} catch(Throwable e) {
e.printStackTrace();
}
} catch(Throwable e) {
// Not found...