You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Sachin Patel <sp...@gmail.com> on 2007/05/08 14:40:46 UTC

Help with MEJB

I need some help finishing up the MEJB support.  I have the EJB  
implementation in openejb, and a GBean wrapper in configs/openejb  
that creates and EJBJar with this stateless session bean and deploys  
it like below...

EjbJar ejbJar = new EjbJar();
StatelessBean bean = ejbJar.addEnterpriseBean(new StatelessBean 
("MEJB",MEJBBean.class.getName()));
bean.setHomeAndRemote(MEJBHome.class, Management.class);

ClassLoader cl = MEJBBean.class.getClassLoader();
OpenEjbSystem openEjbSystem = ejbContainer.getOpenEjbSystem();
EjbJarInfo ejbJarInfo = openEjbSystem.configureApplication(new  
EjbModule(cl, getClass().getSimpleName(), null, ejbJar, null));
openEjbSystem.createEjbJar(ejbJarInfo, cl);

After this, the applications with an ejb/MEJB ejbref fail to deploy  
and I assume we need to take one additional step and properly bind  
the ejb.  I haven't been able to figure out on how to look up this  
bean as is and what the defaults, if any, are.

Could someone provide some guidance and how to programatically  
enhance this so that applications with an ejbref to it don't require  
a vendor plan and lookup to java:/comp/env/ejb/MEJB resolves?

Thanks.

-sachin