@Override public void start(final StartContext context) throws StartException { final BatchEnvironment batchEnvironment = this.batchEnvironment = batchEnvironmentInjector.getValue(); // Get the class loader from the environment classLoader = batchEnvironment.getClassLoader(); suspendControllerInjector.getValue().registerActivity(serverActivity); }
/** * Starts the service. Registers server activity, sets transaction listener on local transaction context, and creates and * installs deployment controller service. * * @param context start context */ public void start(StartContext context) { final SuspendController suspendController = suspendControllerInjectedValue.getValue(); suspendController.registerActivity(this); final LocalTransactionContext localTransactionContext = localTransactionContextInjectedValue.getValue(); localTransactionContext.registerCreationListener(this); }
@Override public void init() { if (endpoint == null) { throw EjbLogger.ROOT_LOGGER.endpointUnAvailable(this.getComponentName()); } super.init(); suspendController.registerActivity(serverActivity); if (this.pool != null) { this.pool.start(); } }
suspendControllerInjector.getValue().registerActivity(recoverySuspendController);
@Override public void start(StartContext context) throws StartException { suspendControllerInjectedValue.getValue().registerActivity(suspendListener); if(suspendControllerInjectedValue.getValue().getState() == SuspendController.State.RUNNING) { defaultHandler.setSuspended(false); } else { defaultHandler.setSuspended(true); } ControlledProcessStateService controlledProcessStateService = controlledProcessStateServiceInjectedValue.getValue(); //may be null for tests if(controlledProcessStateService != null && controlledProcessStateService.getCurrentState() == ControlledProcessState.State.STARTING) { gateHandlerWrapper = new GateHandlerWrapper(queueRequestsOnStart ? -1 : defaultResponseCode); controlledProcessStateService.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { controlledProcessStateService.removePropertyChangeListener(this); if(gateHandlerWrapper != null) { gateHandlerWrapper.open(); gateHandlerWrapper = null; } rootHandler = null; } }); } server.getValue().registerHost(this); UndertowLogger.ROOT_LOGGER.hostStarting(name); }
suspendControllerInjectedValue.getValue().registerActivity(serverActivity.get()); }); ServletContextListener sl = new ServletContextListener() {
@Override public void start(StartContext startContext) throws StartException { shutdownControllerInjectedValue.getValue().registerActivity(this); timer = new Timer(); }
@Override public void start(final StartContext context) throws StartException { final BatchEnvironment batchEnvironment = this.batchEnvironment = batchEnvironmentInjector.getValue(); // Get the class loader from the environment classLoader = batchEnvironment.getClassLoader(); suspendControllerInjector.getValue().registerActivity(serverActivity); }
@Override public void start(StartContext context) { UndertowService service = this.configuration.getUndertowService(); ContainerEventHandler eventHandler = this.configuration.getContainerEventHandler(); this.connector = new UndertowConnector(this.configuration.getListener()); this.serverName = this.configuration.getServer().getName(); this.server = new UndertowServer(this.serverName, service, this.connector); // Register ourselves as a listener to the container events service.registerListener(this); // Initialize mod_cluster and start it now eventHandler.init(this.server); eventHandler.start(this.server); // Start the periodic STATUS thread ThreadGroup group = new ThreadGroup(UndertowEventHandlerAdapterService.class.getSimpleName()); ThreadFactory factory = doPrivileged(new PrivilegedAction<ThreadFactory>() { @Override public ThreadFactory run() { return new JBossThreadFactory(group, Boolean.FALSE, null, "%G - %t", null, null); } }); this.executor = Executors.newScheduledThreadPool(1, factory); this.executor.scheduleWithFixedDelay(this, 0, this.configuration.getStatusInterval().toMillis(), TimeUnit.MILLISECONDS); this.configuration.getSuspendController().registerActivity(this); }
suspendControllerInjector.getValue().registerActivity(recoverySuspendController);
suspendControllerInjector.getValue().registerActivity(recoverySuspendController);
@Override public void start(StartContext context) throws StartException { suspendControllerInjectedValue.getValue().registerActivity(suspendListener); if(suspendControllerInjectedValue.getValue().getState() == SuspendController.State.RUNNING) { defaultHandler.setSuspended(false); } else { defaultHandler.setSuspended(true); } ControlledProcessStateService controlledProcessStateService = controlledProcessStateServiceInjectedValue.getValue(); //may be null for tests if(controlledProcessStateService != null && controlledProcessStateService.getCurrentState() == ControlledProcessState.State.STARTING) { gateHandlerWrapper = new GateHandlerWrapper(queueRequestsOnStart ? -1 : defaultResponseCode); controlledProcessStateService.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { controlledProcessStateService.removePropertyChangeListener(this); if(gateHandlerWrapper != null) { gateHandlerWrapper.open(); gateHandlerWrapper = null; } rootHandler = null; } }); } server.getValue().registerHost(this); UndertowLogger.ROOT_LOGGER.hostStarting(name); }
@Override public void start(StartContext context) throws StartException { suspendControllerInjectedValue.getValue().registerActivity(suspendListener); if(suspendControllerInjectedValue.getValue().getState() == SuspendController.State.RUNNING) { defaultHandler.setSuspended(false); } else { defaultHandler.setSuspended(true); } ControlledProcessStateService controlledProcessStateService = controlledProcessStateServiceInjectedValue.getValue(); //may be null for tests if(controlledProcessStateService != null && controlledProcessStateService.getCurrentState() == ControlledProcessState.State.STARTING) { gateHandlerWrapper = new GateHandlerWrapper(queueRequestsOnStart ? -1 : defaultResponseCode); controlledProcessStateService.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { controlledProcessStateService.removePropertyChangeListener(this); if(gateHandlerWrapper != null) { gateHandlerWrapper.open(); gateHandlerWrapper = null; } rootHandler = null; } }); } server.getValue().registerHost(this); UndertowLogger.ROOT_LOGGER.hostStarting(name); }
suspendControllerInjectedValue.getValue().registerActivity(serverActivity.get()); }); ServletContextListener sl = new ServletContextListener() {
suspendControllerInjectedValue.getValue().registerActivity(serverActivity.get()); }); ServletContextListener sl = new ServletContextListener() {