}
@Override
protected <T> StatefulEJBLocator<T> openSession(EJBReceiverContext context, Class<T> viewType, String appName, String moduleName, String distinctName, String beanName) throws IllegalArgumentException {
final EjbDeploymentInformation ejbInfo = findBean(appName, moduleName, distinctName, beanName);
final EJBComponent component = ejbInfo.getEjbComponent();
if (!(component instanceof StatefulSessionComponent)) {
throw new IllegalArgumentException("EJB " + beanName + " is not a Stateful Session bean in app: " + appName + " module: " + moduleName + " distinct name:" + distinctName);
}
final StatefulSessionComponent statefulComponent = (StatefulSessionComponent) component;
final SessionID sessionID = statefulComponent.createSession();