1 Reply Latest reply on Sep 9, 2003 3:28 AM by Jon Barnett

    same local and remote jndi names

    Milena Newbie

      Hi,

      Just wanna ask is it possible to have the same local-jndi-name and jndi-name in jboss.xml?

      In the ejb spec it's said that I can get the local interface using simple lookup(), but the remote one should be obtained using PortableRemoteObject.narrow().
      So may be if I have equal jndi names for the local and the remote home interfaces I can rely on the lookup method (simple lookup() or narrow()) to get the local or remote home interface respectively?

      Greetings,
      Mukoline

        • 1. Re: same local and remote jndi names
          Jon Barnett Master

          No they are not interchangeable because the interfaces are different. The LocalHome interface is different to the Home interface so the class cast is different for the remote and local lookups. Similarly, the local and local home interfaces manufacture different interfaces to the EJB (remote and local).

          So you cannot bind two different references to the JNDI name.

          All in all, you explicitly operate with a different set of interfaces.