}
protected ServiceContainer getServiceContainer(int ejbIndex, JBossServiceBeanMetaData beanMetaData) throws Exception
{
String containerName = getAspectDomain(ejbIndex, defaultServiceDomain);
DomainDefinition domain = AspectManager.instance().getContainer(containerName);
if (domain == null)
throw new RuntimeException("No container configured with name '"
+ containerName + "''");
return new ServiceContainer(deployment.getMbeanServer(), di.getClassLoader(), className,
ejbNames.get(ejbIndex), (Domain) domain.getManager(), ctxProperties,
deployment, beanMetaData);
}