How do I get the EJB home interface?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ushadevi_koppavarapu
Posted On:   Tuesday, May 8, 2001 10:55 AM

How do I get the EJB home interface?

Re: How do I get the EJB home interface?

Posted By:   AlessandroA_Garbagnati  
Posted On:   Tuesday, May 8, 2001 11:08 AM

Hi,

Once you have your jndi context, you should be able to do a lookup on the bean and, then, you can cast it to the home interface:



try {

  Context ic = getInitialContext();

  Object o = ic.lookup("MyBean");

  home = (MyBeanHome)PortableRemoteObject.narrow(o, MyBeanHome.class);

}

catch (...) {

  // handle your errors

}
About | Sitemap | Contact