{
EJBContainer container = EJBContainer.class.cast(service);
// TODO: use an informer
JavaEEModule module = container.getModule();
String moduleName = stripSuffix(module.getName());
JavaEEApplication app = module.getApplication();
String appName = app != null ? stripSuffix(app.getName()) : null;
String scopedBeanName = "application=" + (appName != null ? appName : moduleName) + ",module=" + moduleName + ",component=" + container.getEjbName();
String encFactoryBeanName = "jboss.ejb3:" + scopedBeanName + ",service=EjbEncFactory";
// create an EjbEncFactory for this container
{
BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(encFactoryBeanName, NamingComponentEjbEncFactory.class.getName());