5 Replies Latest reply on Apr 15, 2002 5:40 AM by chouzhi

    local interface & "not bound"

    Nikolaj G. Newbie

      Hi JBosses,

      Im trying to call a bean through local interface and I get a "not bound" error. Howto? The "local/Message" is left on purpose... if I remove "local/" i get an Proxy0 error.

      Ok, thanks. /nikolaj

      PS and yes, I know - "MessageBean" is not a good word for this bean.


      Caller:
      MessageLocalHome home = getMessageLocalHome();
      ..

      getMessageLocalHome:
      InitialContext ctx = new InitialContext();
      return (MessageLocalHome) ctx.lookup("local/MessageBean");
      //Object obj = ctx.lookup("local/MessageBean");
      //return (MessageLocalHome)PortableRemoteObject.narrow(obj, MessageLocalHome.class);

      ejb-jar.xml:

      <ejb-name>MessageBean</ejb-name>
      com.videlity.jms.MessageRemoteHome
      com.videlity.jms.MessageRemote
      <local-home>com.videlity.jms.MessageLocalHome</local-home>
      com.videlity.jms.MessageLocal
      <ejb-class>com.videlity.jms.MessageBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>

      <ejb-local-ref>
      <ejb-ref-name>local/MessageBean</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>com.videlity.jms.MessageLocalHome</local-home>
      com.videlity.jms.MessageLocal
      <ejb-link>MessageBean</ejb-link>
      </ejb-local-ref>


      Error:
      [Message] getMessageLocalHome failed: local not bound
      [Message] Could not initialize message...
      javax.ejb.EJBException: null
      Embedded Exception
      local not bound
      at com.videlity.jms.Message.getMessageLocalHome(Message.java:41)
      at com.videlity.jms.Message.main(Message.java:51)
      javax.naming.NameNotFoundException: local not bound