use of org.jboss.as.ejb3.context.CurrentInvocationContext in project wildfly by wildfly.
the class NonFunctionalTimerService method assertInvocationAllowed.
private void assertInvocationAllowed() {
AllowedMethodsInformation.checkAllowed(MethodType.TIMER_SERVICE_METHOD);
final InterceptorContext currentInvocationContext = CurrentInvocationContext.get();
if (currentInvocationContext == null) {
return;
}
// If the method in current invocation context is null,
// then it represents a lifecycle callback invocation
Method invokedMethod = currentInvocationContext.getMethod();
if (invokedMethod == null) {
// it's a lifecycle callback
Component component = currentInvocationContext.getPrivateData(Component.class);
if (!(component instanceof SingletonComponent)) {
throw EjbLogger.EJB3_TIMER_LOGGER.failToInvokeTimerServiceDoLifecycle();
}
}
}
Aggregations