} catch (Exception e) {
throw new OpenEJBException(e);
}
SystemInstance system = SystemInstance.get();
SafeToolkit toolkit = SafeToolkit.getToolkit("OpenEJB");
if (appServer == null) {
ApplicationServer defaultServer = (ApplicationServer) toolkit.newInstance("org.apache.openejb.core.ServerFederation");
appServer = defaultServer;
}
system.setComponent(ApplicationServer.class, appServer);
/*
* Output startup message
*/
OpenEjbVersion versionInfo = OpenEjbVersion.get();
if (initProps.getProperty("openejb.nobanner") == null) {
System.out.println("Apache OpenEJB " + versionInfo.getVersion() + " build: " + versionInfo.getDate() + "-" + versionInfo.getTime());
System.out.println("" + versionInfo.getUrl());
}
Logger logger2 = Logger.getInstance(LogCategory.OPENEJB, "org.apache.openejb.util.resources");
logger2.info("startup.banner", versionInfo.getUrl(), new Date(), versionInfo.getCopyright(),
versionInfo.getVersion(), versionInfo.getDate(), versionInfo.getTime());
logger.info("openejb.home = " + SystemInstance.get().getHome().getDirectory().getAbsolutePath());
logger.info("openejb.base = " + SystemInstance.get().getBase().getDirectory().getAbsolutePath());
Properties props = new Properties(SystemInstance.get().getProperties());
if (initProps == null) {
logger.debug("startup.noInitializationProperties");
} else {
props.putAll(initProps);
}
/* Uses the EnvProps.ASSEMBLER property to obtain the Assembler impl.
Default is org.apache.openejb.assembler.classic.Assembler */
String className = props.getProperty(EnvProps.ASSEMBLER);
if (className == null) {
className = props.getProperty("openejb.assembler", "org.apache.openejb.assembler.classic.Assembler");
} else {
logger.warning("startup.deprecatedPropertyName", EnvProps.ASSEMBLER);
}
logger.debug("startup.instantiatingAssemblerClass", className);
Assembler assembler = null;
try {
assembler = (Assembler) toolkit.newInstance(className);
} catch (OpenEJBException oe) {
logger.fatal("startup.assemblerCannotBeInstantiated", oe);
throw oe;
} catch (Throwable t) {
String msg = messages.message("startup.openejbEncounteredUnexpectedError");