use of org.jboss.as.ejb3.component.EjbComponentInstance in project wildfly by wildfly.
the class CurrentInvocationContext method getEjbContext.
public static EJBContextImpl getEjbContext() {
final InterceptorContext context = get();
if (context == null) {
throw EjbLogger.ROOT_LOGGER.noEjbContextAvailable();
}
final ComponentInstance component = context.getPrivateData(ComponentInstance.class);
if (!(component instanceof EjbComponentInstance)) {
throw EjbLogger.ROOT_LOGGER.currentComponentNotAEjb(component);
}
return ((EjbComponentInstance) component).getEjbContext();
}
Aggregations