@Override
public Object processInvocation(InterceptorContext context) throws Exception {
StatefulSessionComponent component = getComponent(context, StatefulSessionComponent.class);
// TODO: this is a contract with the client interceptor
SessionID sessionId = context.getPrivateData(SessionID.class);
if (sessionId == null) {
throw EjbLogger.ROOT_LOGGER.statefulSessionIdIsNull(component.getComponentName());
}
ROOT_LOGGER.debugf("Looking for stateful component instance with session id: %s", sessionId);
StatefulSessionComponentInstance instance = component.getCache().get(sessionId);
if (instance == null) {
//This exception will be transformed into the correct exception type by the exception transforming interceptor
throw EjbLogger.ROOT_LOGGER.couldNotFindEjb(sessionId.toString());
}
try {
context.putPrivateData(ComponentInstance.class, instance);
return context.proceed();
} catch (Exception ex) {