@Override public void handleEvent(ServiceController controller, LifecycleEvent event) { latch.awaitUninterruptibly(); if (event == LifecycleEvent.DOWN) { try { final ServiceController<?> RaxmlController = registry.getService(ServiceName.of(ConnectorServices.RA_SERVICE, id)); Activation raxml = (Activation) RaxmlController.getValue(); ((ResourceAdapterXmlDeploymentService) controller.getService()).setRaxml(raxml); controller.compareAndSetMode(ServiceController.Mode.NEVER, originalMode); } finally { controller.removeListener(this); } } } });
/** {@inheritDoc} */ @Override public boolean compareAndSetMode(final Mode expected, final Mode newMode) { return getDelegate().compareAndSetMode(expected, newMode); }
@Override public void start(StartContext context) throws StartException { // No point in throwing away the index once it is created. context.getController().compareAndSetMode(ServiceController.Mode.ON_DEMAND, ServiceController.Mode.ACTIVE); }
public boolean compareAndSetMode(Mode expected, org.jboss.msc.service.ServiceController.Mode newMode) { checkModeTransition(newMode); return controller.compareAndSetMode(expected, newMode); }
@Override public void start(StartContext context) throws StartException { // No point in throwing away the index once it is created. context.getController().compareAndSetMode(ServiceController.Mode.ON_DEMAND, ServiceController.Mode.ACTIVE); }
public boolean compareAndSetMode(Mode expected, org.jboss.msc.service.ServiceController.Mode newMode) { checkModeTransition(newMode); return controller.compareAndSetMode(expected, newMode); }
/** {@inheritDoc} */ @Override public boolean compareAndSetMode(final Mode expected, final Mode newMode) { return getDelegate().compareAndSetMode(expected, newMode); }
public void deActivate() { // passivate the activation service only if the ActiveMQ server is deactivated when it fails back // and *not* during AS7 service container shutdown or reload (AS7-6840 / AS7-6881) if (activeMQActivationController != null) { if (!activeMQActivationController.getState().in(STOPPING, REMOVED)) { // [WFLY-4597] When Artemis is deactivated during failover, we block until its // activation controller is REMOVED before giving back control to Artemis. // This allow to properly stop any service depending on the activation controller // and avoid spurious warning messages because the resources used by the services // are stopped outside the control of the services. final CountDownLatch latch = new CountDownLatch(1); activeMQActivationController.compareAndSetMode(ACTIVE, REMOVE); activeMQActivationController.addListener(new LifecycleListener() { @Override public void handleEvent(ServiceController<?> controller, LifecycleEvent event) { if (event == LifecycleEvent.REMOVED) { latch.countDown(); } } }); try { latch.await(5, TimeUnit.SECONDS); } catch (InterruptedException e) { } activeMQActivationController = null; } } } });
public void deActivate() { // passivate the activation service only if the ActiveMQ server is deactivated when it fails back // and *not* during AS7 service container shutdown or reload (AS7-6840 / AS7-6881) if (activeMQActivationController != null) { if (!activeMQActivationController.getState().in(STOPPING, REMOVED)) { // [WFLY-4597] When Artemis is deactivated during failover, we block until its // activation controller is REMOVED before giving back control to Artemis. // This allow to properly stop any service depending on the activation controller // and avoid spurious warning messages because the resources used by the services // are stopped outside the control of the services. final CountDownLatch latch = new CountDownLatch(1); activeMQActivationController.compareAndSetMode(ACTIVE, REMOVE); activeMQActivationController.addListener(new LifecycleListener() { @Override public void handleEvent(ServiceController<?> controller, LifecycleEvent event) { if (event == LifecycleEvent.REMOVED) { latch.countDown(); } } }); try { latch.await(5, TimeUnit.SECONDS); } catch (InterruptedException e) { } activeMQActivationController = null; } } } });
public boolean compareAndSetMode(final Mode expected, final Mode newMode) { checkModeTransition(newMode); boolean changed = getDelegate().compareAndSetMode(expected, newMode); Step step = registryActiveStep; if (changed && step != null) { step.serviceModeChanged(getDelegate()); } return changed; }
public boolean compareAndSetMode(final Mode expected, final Mode newMode) { checkModeTransition(newMode); boolean changed = getDelegate().compareAndSetMode(expected, newMode); Step step = registryActiveStep; if (changed && step != null) { step.serviceModeChanged(getDelegate()); } return changed; }
public synchronized void start(final StartContext context) throws StartException { context.getController().compareAndSetMode(ServiceController.Mode.ON_DEMAND, ServiceController.Mode.ACTIVE); extensions.clear(); for (File root : extensionRoots) {
public synchronized void start(final StartContext context) throws StartException { context.getController().compareAndSetMode(ServiceController.Mode.ON_DEMAND, ServiceController.Mode.ACTIVE); extensions.clear(); for (File root : extensionRoots) {
public synchronized void start(final StartContext context) throws StartException { serviceContainer = context.getController().getServiceContainer(); context.getController().compareAndSetMode(ServiceController.Mode.ON_DEMAND, ServiceController.Mode.ACTIVE); extensions.clear(); for (File root : extensionRoots) {
public synchronized void start(final StartContext context) throws StartException { serviceContainer = context.getController().getServiceContainer(); context.getController().compareAndSetMode(ServiceController.Mode.ON_DEMAND, ServiceController.Mode.ACTIVE); extensions.clear(); for (File root : extensionRoots) {
@Override public void handleEvent(ServiceController controller, LifecycleEvent event) { latch.awaitUninterruptibly(); if (event == LifecycleEvent.DOWN) { try { final ServiceController<?> RaxmlController = registry.getService(ServiceName.of(ConnectorServices.RA_SERVICE, id)); Activation raxml = (Activation) RaxmlController.getValue(); ((ResourceAdapterXmlDeploymentService) controller.getService()).setRaxml(raxml); controller.compareAndSetMode(ServiceController.Mode.NEVER, originalMode); } finally { controller.removeListener(this); } } } });