bootstrap.setCreate("initialize");
bootstrap.setStart("boot");
bootstrap.setDestroy("shutdown");
bootstrap.addDependency("RealTransactionManager"); // so we know TM is present in JBossTransactionServices
// call dynamic dependency creator for EJBs
ParameterMetaDataBuilder install = bootstrap.addInstallWithParameters("createDepenencies", "DynamicDependencyCreator", null, ControllerState.CONFIGURED);
install.addParameterMetaData(Object.class.getName(), bootstrapName);
install.addParameterMetaData(Iterable.class.getName(), bootstrap.createInject(ejbServicesValue.getUnderlyingValue(), "ejbContainerNames"));
install.addParameterMetaData(String.class.getName(), "Start");
install.addParameterMetaData(String.class.getName(), "Start");
ParameterMetaDataBuilder jndiInstall = bootstrap.addInstallWithParameters("bind", "JndiBinder");
jndiInstall.addParameterMetaData(DeploymentUnit.class.getName(), unit);
ParameterMetaDataBuilder jndiUninstall = bootstrap.addUninstallWithParameters("unbind", "JndiBinder");
jndiUninstall.addParameterMetaData(DeploymentUnit.class.getName(), unit);
unit.addAttachment(bootstrapName + "_" + BeanMetaData.class.getSimpleName(), bootstrap.getBeanMetaData());
}