final EjbModule ejbModule = new EjbModule(new EjbJar(), new OpenejbJar());
ejbModule.getEjbJar().addEnterpriseBean(new StatelessBean(FooBean.class));
final EjbDeployment ejbDeployment = new EjbDeployment(null, "FooBean", "FooBean");
ejbDeployment.getJndi().add(new Jndi("thename", "Local"));
ejbDeployment.getJndi().add(new Jndi("anothername", "Remote"));
ejbDeployment.getJndi().add(new Jndi("loldstyle", "LocalHome"));
ejbDeployment.getJndi().add(new Jndi("roldstyle", "RemoteHome"));
ejbModule.getOpenejbJar().addEjbDeployment(ejbDeployment);
assembler.createApplication(config.configureApplication(ejbModule));
final InitialContext initialContext = new InitialContext();