* 2 usages
*/
public Instance(Properties initProps, ApplicationServer appServer) throws OpenEJBException {
initialized = new Exception("Initialized at "+new Date()).fillInStackTrace();
Logger logger = Logger.getInstance(LogCategory.OPENEJB_STARTUP, "org.apache.openejb.util.resources");
try {
SystemInstance.init(initProps);
} 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());