ejbJar.addEnterpriseBean(new StatefulBean(Red.class));
ejbJar.addEnterpriseBean(new StatefulBean(Crimson.class));
ejbJar.addEnterpriseBean(new StatefulBean(Scarlet.class));
List<ContainerTransaction> declared = ejbJar.getAssemblyDescriptor().getContainerTransaction();
declared.add(new ContainerTransaction(TransAttribute.REQUIRED, "*", "Crimson", "*"));
declared.add(new ContainerTransaction(TransAttribute.REQUIRES_NEW, "*", "Crimson", "create"));
ContainerTransaction o = new ContainerTransaction(TransAttribute.SUPPORTS, "*", "Crimson", "create");
o.getMethod().get(0).setMethodIntf(MethodIntf.HOME);
declared.add(o);
declared.add(new ContainerTransaction(TransAttribute.REQUIRES_NEW, "*", "Crimson", "remove"));
declared.add(new ContainerTransaction(TransAttribute.REQUIRES_NEW, Color.class.getName(), "Scarlet", "*"));
declared.add(new ContainerTransaction(TransAttribute.NEVER, Red.class.getName(), "Scarlet", "red"));
declared.add(new ContainerTransaction(TransAttribute.REQUIRED, "Scarlet", Scarlet.class.getMethod("scarlet")));
EjbJarInfo ejbJarInfo = config.configureApplication(ejbJar);
assembler.createApplication(ejbJarInfo);
InitialContext context = new InitialContext();