public void lifecycleEvent(LifecycleEvent event) { String type = event.getType(); if (Lifecycle.AFTER_STOP_EVENT.equals(type)) { TomcatLoader.this.destroy(); } } });
/** * {@inheritDoc} */ public void init(Properties properties) throws Exception { // Enable System EJBs like the MEJB and DeployerEJB initDefaults(properties); // Loader maybe the first thing executed in a new classloader // so we must attempt to initialize the system instance. SystemInstance.init(properties); initialize(properties); }
public void initDefaults(Properties properties) { setIfNull(properties, "openejb.system.apps", "true"); setIfNull(properties, "openejb.deployments.classpath", "false"); setIfNull(properties, "openejb.deployments.classpath.filter.systemapps", "false"); //Sets default service provider setIfNull(properties, "openejb.provider.default", "org.apache.tomee"); }
/** * this method will be split in two to be able to use SystemInstance in between both invocations * ie use configuration before effective boot */ @Deprecated public void init(final Properties properties) throws Exception { initSystemInstance(properties); initialize(properties); }
optionalService(properties, "org.apache.tomee.webservices.TomeeJaxRsService"); optionalService(properties, "org.apache.tomee.webservices.TomeeJaxWsService"); processRunningApplications(tomcatWebAppBuilder, standardServer);
final TomcatLoader loader = new TomcatLoader(); loader.initSystemInstance(properties); loader.initialize(properties);
TomcatLoader loader = new TomcatLoader(); loader.init(properties);
public void initSystemInstance(final Properties properties) throws Exception { // Enable System EJBs like the MEJB and DeployerEJB initDefaults(properties); // Loader maybe the first thing executed in a new classloader // so we must attempt to initialize the system instance. SystemInstance.init(properties); }
if (optionalService(properties, "org.apache.tomee.webservices.TomeeJaxRsService")) { optionalService(properties, "org.apache.tomee.webservices.TomeeJaxWsService"); processRunningApplications(tomcatWebAppBuilder, standardServer);
public void initDefaults(final Properties properties) { try { SecurityEnv.init(); } catch (final Throwable t) { // ignore } setIfNull(properties, "authconfigprovider.factory", "false"); setIfNull(properties, "openejb.deployments.classpath", "false"); setIfNull(properties, "openejb.deployments.classpath.filter.systemapps", "false"); //Sets default service provider setIfNull(properties, "openejb.provider.default", "org.apache.tomee"); }
/** * {@inheritDoc} */ @Override public synchronized void afterStop(final StandardServer standardServer) { // clean ear based webapps after shutdown for (final ContextInfo contextInfo : infos.values()) { if (contextInfo != null && contextInfo.deployer != null) { final StandardContext standardContext = contextInfo.standardContext; final HostConfig deployer = contextInfo.deployer; deployer.unmanageApp(standardContext.getPath()); final File realPath = Contexts.warPath(standardContext); if (realPath != null) { deleteDir(realPath); } } } TomcatLoader.destroy(); }