File file = getFile("org/apache/openejb/openejb-itests-beans/3.0.0-SNAPSHOT/openejb-itests-beans-3.0.0-SNAPSHOT.jar");
if (file == null) return;
System.setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY, InitContextFactory.class.getName());
ConfigurationFactory config = new ConfigurationFactory();
Assembler assembler = new Assembler();
assembler.createProxyFactory(config.configureService(ProxyFactoryInfo.class));
assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
assembler.createConnectionManager(config.configureService(ConnectionManagerInfo.class));
// managed JDBC
assembler.createResource(config.configureService("Default JDBC Database", ResourceInfo.class));
// unmanaged JDBC
assembler.createResource(config.configureService("Default Unmanaged JDBC Database", ResourceInfo.class));
// JMS
assembler.createResource(config.configureService("Default JMS Resource Adapter", ResourceInfo.class));
assembler.createResource(config.configureService("Default JMS Connection Factory", ResourceInfo.class));
// containers
assembler.createContainer(config.configureService(BmpEntityContainerInfo.class));
assembler.createContainer(config.configureService(CmpEntityContainerInfo.class));
assembler.createContainer(config.configureService(StatefulSessionContainerInfo.class));
assembler.createContainer(config.configureService(StatelessSessionContainerInfo.class));
assembler.createContainer(config.configureService(MdbContainerInfo.class));
createAndDestroy(assembler, config, file);
createAndDestroy(assembler, config, file);
createAndDestroy(assembler, config, file);
}