Assembler assembler = SystemInstance.get().getComponent(Assembler.class);
ConfigurationFactory config = new ConfigurationFactory();
EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(new StatelessBean("Orange", Fruit.class));
ejbJar.addEnterpriseBean(new StatelessBean("Apple", Fruit.class));
ejbJar.addEnterpriseBean(new StatelessBean("Peach", Fruit.class));
ejbJar.addEnterpriseBean(new StatelessBean("Pear", Fruit.class));
ejbJar.addEnterpriseBean(new StatelessBean("Plum", Fruit.class));
ejbJar.addEnterpriseBean(new StatelessBean("ejb/Orange", Fruit.class));
ejbJar.addEnterpriseBean(new StatelessBean("ejb/Apple", Fruit.class));
ejbJar.addEnterpriseBean(new StatelessBean("ejb/Peach", Fruit.class));
ejbJar.addEnterpriseBean(new StatelessBean("ejb/Pear", Fruit.class));
ejbJar.addEnterpriseBean(new StatelessBean("ejb/Plum", Fruit.class));
assembler.createApplication(config.configureApplication(ejbJar));
try {
// good creds