3 Replies Latest reply on Oct 31, 2006 9:46 AM by Richard Rusinkiewicz

    How to lookup for a bean

    Richard Rusinkiewicz Newbie

      I've deployed a bean and it can be found using a jboss jndi explorer under
      under Global JNDI in

      +- ejb1 (class: org.jnp.interfaces.NamingContext)
      | +- ApptransCalculator (class: org.jnp.interfaces.NamingContext)
      | | +- localStatefulProxyFactory (class: org.jboss.ejb3.stateful.StatefulLocalProxyFactory)
      | | +- local (class: java.lang.Object)
      | | +- remote (class: java.lang.Object)
      | | +- remoteStatefulProxyFactory (proxy: $Proxy77 implements interface org.jboss.ejb3.ProxyFactory)

      In my jsp the lookup code looks as follows:

      InitialContext ctx = new InitialContext();
      cal = (ApptransCalculatorLocal) ctx.lookup(

      I also tried
      cal = (ApptransCalculatorLocal) ctx.lookup(

      cal = (ApptransCalculatorLocal) ctx.lookup(

      The cal is null after a lookup, what is hier wrong ?