protected StatefulContainer getStatefulContainer(int ejbIndex, JBossSessionBeanMetaData beanMetaData) throws Exception
{
String containerName = getAspectDomain(ejbIndex, defaultSFSBDomain);
DomainDefinition domain = AspectManager.instance().getContainer(containerName);
if (domain == null)
{
throw new RuntimeException("Could not get container for bean class " + beanMetaData.getEjbClass()
+ " with bean name " + beanMetaData.getEjbName() + " because no container configured with name '"
+ containerName + "'");
}
return new StatefulContainer(di.getClassLoader(), className, ejbNames.get(ejbIndex),
(Domain) domain.getManager(), ctxProperties, deployment, beanMetaData, deployment
.getAsynchronousProcessor());
}