1 Reply Latest reply on Sep 15, 2004 4:52 PM by Darran Lofthouse

    Problem in accessing local home interface

    Sathya Sekar Newbie


      I am facing a curious problem ! When I try to access an entity bean from a session facade locally using the component name of the bean, I get a ejb not bound error. This does not happen if I specify the JNDI name !

      From jboss.xml :


      Now when I try to use the component name :

      InitialContext ic = new InitialContext();
      JournalLocalHome home = (JournalLocalHome) ic.lookup("java:comp/env/ejb/JournalLocalHome");

      I get the below error :

      javax.naming.NameNotFoundException: ejb not bound
       at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
       at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
       at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
       at org.jnp.server.NamingServer.lookup(NamingServer.java:253)
       at org.jnp.server.NamingServer.lookup(NamingServer.java:256)

      But when I do the lookup with the JNDI name :

      InitialContext ic = new InitialContext();
      JournalLocalHome home = (JournalLocalHome) ic.lookup("ejb/JournalLocalHome");

      it works just fine !

      Any configuration I need to do to make the bean accessible by component name ?