3 Replies Latest reply on Dec 23, 2003 7:06 AM by Marco Schulze

    ctx.lookup("java:comp/env"); times out

    Marco Schulze Newbie


      Accessing java:comp/env results in a timeout. Please help!!!

      Hashtable env = new Hashtable();
      Context ctx = new InitialContext(env);

      Object obj = ctx.lookup("java:comp/env"); // Here, I get a timeout

      Best regards, Marco.

        • 1. Re: ctx.lookup(
          patrick Novice


          Just set thos properties. They also can be set in a jndi.properties file in your classpath somewhere

          • 2. Re: ctx.lookup(
            Adrian Brock Master

            No the java: namespace is only available if you do
            new InitialContext()
            which has no provider url.


            • 3. Re: ctx.lookup(..) => HTTP absolutely necessary
              Marco Schulze Newbie


              Thanks a lot for your quick response!

              First: It is absolutely necessary that ALL traffic is going through http because we are developing a large application that spans over a lot of companies, servers and a lot of firewalls. Dynamic ports are a knock-out-criteria.

              Thus, I've the following question: If I use the HttpNamingContextFactory, is then the whole traffic going through http or are there still dynamic ports opened? If so, how can I avoid it?

              Did I understand that correctly: I can only use the absolute java:-notation if I'm within my server. From the client, I always need to use the relative path. Which means in jboss-IDE's XDoclet, I've always to set @ejb.util generate = "physical"?!

              Is there a way to avoid @ejb.util generate = "physical" and set this globally as default?

              Best regards, thousand thanks for your help, a merry XMas and a happy new year!!!

              Marco ;-)