public class EJBSuspendHandlerService extends Object implements org.jboss.msc.service.Service<EJBSuspendHandlerService>, org.jboss.as.server.suspend.ServerActivity, org.wildfly.transaction.client.CreationListener, Synchronization
| Modifier and Type | Field and Description |
|---|---|
static org.jboss.msc.service.ServiceName |
SERVICE_NAME
EJBSuspendHandlerService name
|
| Constructor and Description |
|---|
EJBSuspendHandlerService(boolean gracefulTxnShutdown)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptInvocation(org.jboss.invocation.InterceptorContext context)
Indicates if a invocation should be accepted: which will happen only if server is not suspended, or if the invocation
involves a still active transaction.
|
void |
afterCompletion(int status)
Notifies handler that an active transaction has completed.
|
void |
beforeCompletion()
Notifies handler that an active transaction is about to complete.
|
void |
enableGracefulTxnShutdown(boolean gracefulTxnShutdown)
Sets a new value for
gracefulTxnShutdown. |
org.jboss.msc.value.InjectedValue<DeploymentRepository> |
getDeploymentRepositoryInjectedValue()
Returns deployment repository injected value.
|
org.jboss.msc.value.InjectedValue<org.wildfly.transaction.client.LocalTransactionContext> |
getLocalTransactionContextInjectedValue()
Returns local transaction context injected value.
|
org.jboss.msc.value.InjectedValue<org.jboss.as.server.suspend.SuspendController> |
getSuspendControllerInjectedValue()
Returns suspend controller injected value.
|
EJBSuspendHandlerService |
getValue()
Returns service value.
|
void |
invocationComplete()
Notifies handler that an active invocation is complete.
|
boolean |
isSuspended()
Indicates if ejb subsystem is suspended.
|
void |
preSuspend(org.jboss.as.server.suspend.ServerActivityCallback listener)
Pre suspend.
|
void |
resume()
Notifies local transaction context that server is resumed, and restarts deployment controller.
|
void |
start(org.jboss.msc.service.StartContext context)
Starts the service.
|
void |
stop(org.jboss.msc.service.StopContext context)
Stops the service.
|
void |
suspended(org.jboss.as.server.suspend.ServerActivityCallback listener)
Notifies local transaction context that server is suspended, and only completes suspension if
there are no active invocations nor transactions.
|
void |
transactionCreated(org.wildfly.transaction.client.AbstractTransaction transaction,
org.wildfly.transaction.client.CreationListener.CreatedBy createdBy)
Notifies handler that a new transaction has been created.
|
public static final org.jboss.msc.service.ServiceName SERVICE_NAME
public EJBSuspendHandlerService(boolean gracefulTxnShutdown)
gracefulTxnShutdown - value of model attributepublic void enableGracefulTxnShutdown(boolean gracefulTxnShutdown)
gracefulTxnShutdown.gracefulTxnShutdown - new value of the model attributepublic org.jboss.msc.value.InjectedValue<org.jboss.as.server.suspend.SuspendController> getSuspendControllerInjectedValue()
public org.jboss.msc.value.InjectedValue<org.wildfly.transaction.client.LocalTransactionContext> getLocalTransactionContextInjectedValue()
public org.jboss.msc.value.InjectedValue<DeploymentRepository> getDeploymentRepositoryInjectedValue()
public EJBSuspendHandlerService getValue()
getValue in interface org.jboss.msc.value.Value<EJBSuspendHandlerService>public void start(org.jboss.msc.service.StartContext context)
start in interface org.jboss.msc.Servicecontext - start contextpublic void stop(org.jboss.msc.service.StopContext context)
stop in interface org.jboss.msc.Servicecontext - stop contextpublic void preSuspend(org.jboss.as.server.suspend.ServerActivityCallback listener)
preSuspend in interface org.jboss.as.server.suspend.ServerActivitylistener - callback listenerpublic void suspended(org.jboss.as.server.suspend.ServerActivityCallback listener)
suspended in interface org.jboss.as.server.suspend.ServerActivitylistener - callback listenerpublic void resume()
resume in interface org.jboss.as.server.suspend.ServerActivitypublic boolean acceptInvocation(org.jboss.invocation.InterceptorContext context)
throws SystemException
context - interceptor contexttrue if invocation can be accepted by invoking interceptorSystemExceptionpublic void invocationComplete()
public void transactionCreated(org.wildfly.transaction.client.AbstractTransaction transaction,
org.wildfly.transaction.client.CreationListener.CreatedBy createdBy)
transactionCreated in interface org.wildfly.transaction.client.CreationListenerpublic void beforeCompletion()
beforeCompletion in interface Synchronizationpublic void afterCompletion(int status)
afterCompletion in interface Synchronizationpublic boolean isSuspended()
true if ejb susbsystem suspension is started (regardless of whether it completed or not)Copyright © 2018 JBoss by Red Hat. All rights reserved.