[jboss-user] [JNDI/Naming/Network] - Newbie question on accessing Remote Bean through JNDI

michaelcourcy do-not-reply at jboss.com
Tue Feb 13 18:35:54 EST 2007


Hi,

I build a Calculatrice Stateless EJB3, 


  | 
  | @Stateless
  | public class CalculatriceBean implements CalculatriceRemote {
  |     
  |     /** Creates a new instance of CalculatriceBean */
  |     public CalculatriceBean() {
  |     }
  | 
  |     public int additionner(int x, int y) {        
  |         return x+y;
  |     }
  |     
  | }
  | 

The appication is deployed in JBOSS nicely.

The name of my ear is EnterpriseApplication1.ear and I can't find the JNDI naming convention for getting this Bean 


  | Object ref = ctx.lookup("EnterpriseApplication1/Calculatrice/remote");
  |             CalculatriceRemote calc = (CalculatriceRemote)PortableRemoteObject.narrow(ref,CalculatriceRemote.class);            
  | 

does not work well it should regarding the documentation ....

Any Hints ?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016107#4016107

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016107



More information about the jboss-user mailing list