use of org.jboss.ejb.client.SessionID in project wildfly by wildfly.
the class LocalEjbReceiver method createSession.
@Override
protected <T> StatefulEJBLocator<T> createSession(StatelessEJBLocator<T> statelessLocator, NamingProvider namingProvider) throws Exception {
final EjbDeploymentInformation ejbInfo = findBean(statelessLocator);
final EJBComponent component = ejbInfo.getEjbComponent();
if (!(component instanceof StatefulSessionComponent)) {
throw EjbLogger.ROOT_LOGGER.notStatefulSessionBean(statelessLocator.getAppName(), statelessLocator.getModuleName(), statelessLocator.getDistinctName(), statelessLocator.getBeanName());
}
final StatefulSessionComponent statefulComponent = (StatefulSessionComponent) component;
final SessionID sessionID = statefulComponent.createSession();
return statelessLocator.withSession(sessionID);
}
Aggregations