SingletonBean bean = new SingletonBean(WidgetBean.class);
bean.addBusinessLocal(Widget.class.getName());
bean.addBusinessRemote(RemoteWidget.class.getName());
bean.addPostConstruct("init");
bean.addPreDestroy("destroy");
bean.setLocalBean(new EmptyType());
EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(bean);
assembler.createApplication(config.configureApplication(ejbJar));