String beanInstanceName = "jboss.ejb3:";
if (appName != null)
beanInstanceName += "application=" + appName + ",";
beanInstanceName += "module=" + moduleName + ",component=" + componentName + ",service=" + EJBBinder.class.getSimpleName();
BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(beanInstanceName, EJBBinder.class.getName());
builder.addConstructorParameter(SessionBeanType.class.getName(), builder.createInject(sessionBeanTypeName));
builder.addPropertyMetaData("globalContext", builder.createInject("NameSpaces", "globalContext"));
builder.addPropertyMetaData("proxyFactory", legacy);
builder.setStart("bind");
builder.setStop("unbind");