[jboss-user] [JNDI/Naming/Network] - Re: JBoss 4.2 ejb not bound

jaikiran do-not-reply at jboss.com
Sat Jun 23 23:55:43 EDT 2007


 <jndi-name>CalcHome</jndi-name>
  | <local-jndi-name>CalcLocalHome</local-jndi-name> 
  | 

anonymous wrote : 02:52:22,390 INFO [BaseLocalProxyFactory] Bound EJB LocalHome 'Calc' to jndi 'CalcLocalHome'
  | 02:52:22,406 INFO [ProxyFactory] Bound EJB Home 'Calc' to jndi 'CalcHome' 
  | 

Your EJB is deployed and bound to the JNDI name CalcHome for the remote interface and CalcLocalHome for the local interface in the *global jndi namespace*.

So your lookup should look like:

Context ctx = new InitialContext();
  | //remote home lookup
  | Object obj = ctx.lookup("CalcHome");
  | CalcHome home = (CalcHome) PortableRemoteObject.narrow(obj,CalcHome.class);
  | //create the remote bean
  | bean = home.create();
  | 
For local interface

Context ctx = new InitialContext();
  | //local home lookup
  | Object obj = ctx.lookup("CalcLocalHome");
  | CalcLocalHome localhome = (CalcLocalHome) obj;
  | //create the local bean
  | bean = localhome.create();
  | 

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

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



More information about the jboss-user mailing list