Search in sources :

Example 1 with SuspendController

use of org.jboss.as.server.suspend.SuspendController in project wildfly by wildfly.

the class EJBSuspendHandlerService method start.

/**
     * 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);
}
Also used : SuspendController(org.jboss.as.server.suspend.SuspendController) LocalTransactionContext(org.wildfly.transaction.client.LocalTransactionContext)

Example 2 with SuspendController

use of org.jboss.as.server.suspend.SuspendController in project wildfly by wildfly.

the class EJBSuspendHandlerService method stop.

/**
     * Stops the service. Unregisters service activity and clears transaction listener.
     * @param context stop context
     */
public void stop(StopContext context) {
    final SuspendController suspendController = suspendControllerInjectedValue.getValue();
    suspendController.unRegisterActivity(this);
    final LocalTransactionContext localTransactionContext = localTransactionContextInjectedValue.getValue();
    localTransactionContext.removeCreationListener(this);
}
Also used : SuspendController(org.jboss.as.server.suspend.SuspendController) LocalTransactionContext(org.wildfly.transaction.client.LocalTransactionContext)

Aggregations

SuspendController (org.jboss.as.server.suspend.SuspendController)2 LocalTransactionContext (org.wildfly.transaction.client.LocalTransactionContext)2