3 Replies Latest reply on Mar 21, 2005 5:10 PM by vv vv

    not able to look up Ejb on a different machine

    vv vv Newbie

      I am not able to look up Ejb on a different machine
      gave the provider_url as the remote host name but still no luck.we have a linux box.

      thanks

        • 1. Re: not able to look up Ejb on a different machine
          Darran Lofthouse Master

          You are going to have to provide a bit more information before anyone is going to be able to help you: -

          JBoss Version
          Code where you are performing the lookup.
          All of the properties used for JNDI.
          And what do you mean by 'I am not able to look up Ejb on a different machine', what happens? What errors are you getting?

          • 2. Re: not able to look up Ejb on a different machine
            vv vv Newbie

            JBoss Version -4.0.1sp1
            Code where you are performing the lookup. -
            private final static String JNDI_FACTORY =
            "org.jnp.interfaces.NamingContextFactory";
            private final static String URL_PKG_PREFIXES =
            "org.jboss.naming:org.jnp.interfaces";
            provider_url=jnp://10.34.31.222:1099
            ...
            Hashtable env = new Hashtable();
            System.out.println(url);
            env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
            env.put(Context.PROVIDER_URL, url);
            env.put(Context.URL_PKG_PREFIXES, URL_PKG_PREFIXES );
            //env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
            //env.put(Context.PROVIDER_URL, url);
            return new InitialContext(env);

            This works fine when the ejb and webapp reside on same directory even if i provide the ip instead of "localhost".However when the ejb and local host are on different machines it says "ejb not bound".
            both are jboss installs,one is a proxy and the other is used to run ejb's.

            • 3. Re: not able to look up Ejb on a different machine
              vv vv Newbie

              ej-jar.xml:


              <ejb-name>ItinerarySessionBean</ejb-name>
              com.ameriquest.asd.sessionEJBS.ItinerarySessionBeanHome
              com.ameriquest.asd.sessionEJBS.ItinerarySessionBean
              <local-home>com.ameriquest.asd.sessionEJBS.ItinerarySessionBeanLocalHome</local-home>
              com.ameriquest.asd.sessionEJBS.ItinerarySessionBeanLocal
              <ejb-class>com.ameriquest.asd.sessionEJBS.ItinerarySessionBeanSession</ejb-class>
              <session-type>Stateless</session-type>
              <transaction-type>Container</transaction-type>