JBossSessionBean31MetaData singletonBean = (JBossSessionBean31MetaData) beanMetaData;
// Create a singleton container
ClassLoader classLoader = unit.getClassLoader();
String domainName = AOPBasedSingletonContainer.getAOPDomainName();
DomainDefinition singletonContainerAOPDomain = AspectManager.instance().getContainer(domainName);
if (singletonContainerAOPDomain == null)
{
throw new DeploymentException(domainName + " AOP domain not configured - cannot deploy EJB named "
+ beanMetaData.getEjbName() + " in unit " + unit);
}
Hashtable<String, String> ctxProperties = new Hashtable<String, String>();
AOPBasedSingletonContainer singletonContainer;
try
{
singletonContainer = new AOPBasedSingletonContainer(classLoader, singletonBean.getEjbClass(), singletonBean
.getEjbName(), (Domain) singletonContainerAOPDomain.getManager(), ctxProperties, singletonBean, unit, asyncExecutorService);
}
catch (ClassNotFoundException cnfe)
{
throw new DeploymentException(cnfe);
}