3 Replies Latest reply on Feb 16, 2012 6:19 AM by jaikiran

    remote JNDI

    justdoit

      Hi

       

      Here's a nice article about remote JNDI:

      https://docs.jboss.org/author/display/AS71/JNDI+Reference

       

      Two types of remote JNDI should be available in Jboss7.1:

        - ejb:

        - remote:

       

      A fully working example about ejb: is at the link https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI

      Is there anything similar for remote: JNDI?

        • 1. Re: remote JNDI
          jaikiran

          justdoit wrote:

           

           

          A fully working example about ejb: is at the link https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI

          Is there anything similar for remote: JNDI?

          It's work in progress and I'll add it soon.

          • 2. Re: remote JNDI
            justdoit

            thanks for the quick response.

             

             

            I'm getting ClassNotFoundException for the sentence, on Jboss nightly build 604:

            env.put(Context.INITIAL_CONTEXT_FACTORY, org.jboss.naming.remote.client.InitialContextFactory.class.getName());

             

            Caused by: java.lang.ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory from....

             

             

             

            Another thing, could you please check if this lookup is correct:

              context.lookup("remote:" + appName + "/" + moduleName + "/" + distinctName + "/" + beanName + "!" + viewClassName);

            • 3. Re: remote JNDI
              jaikiran

              justdoit wrote:

               

              thanks for the quick response.

               

               

              I'm getting ClassNotFoundException for the sentence, on Jboss nightly build 604:

              env.put(Context.INITIAL_CONTEXT_FACTORY, org.jboss.naming.remote.client.InitialContextFactory.class.getName());

               

              Caused by: java.lang.ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory from....

               

              Place the JBOSS_HOME/bin/client/jboss-client-*.jar in the classpath of your client. By the way, AS 7.1.0.Final has been released http://lists.jboss.org/pipermail/jboss-as7-dev/2012-February/005331.html, so you might want to use that.

               

               

              justdoit wrote:

               

              Another thing, could you please check if this lookup is correct:

                context.lookup("remote:" + appName + "/" + moduleName + "/" + distinctName + "/" + beanName + "!" + viewClassName);

              It should be:

               

              context.lookup(appName + "/" + moduleName + "/"  + beanName + "!" + viewClassName);