0 Replies Latest reply on Feb 7, 2012 12:05 PM by unnijboss

    SAR making a InitialContext using HTTPNamingContextFactory in start method

    unnijboss

      All Experts,

       

      Have a question regarding the SAR deployment. My SAR is making an InitialContext using HTTPNamingContext factory.

       

      Hashtable env = new Hashtable();
      env.put(CtcTmsConstants.Naming.PROVIDER_URL, "http://localhost:8080/invoker/JNDIFactory");
      env.put(CtcTmsConstants.Naming.FACTORY_INITIAL, "org.jboss.naming.HttpNamingContextFactory");
      env.put(CtcTmsConstants.Naming.FACTORY_PKGS,"java.naming.factory.url.pkgs");
      env.put(CtcTmsConstants.Naming.FACTORY_PKGS,"org.jboss.naming:org.jnp.interfaces");

      InitialContext ctx = new InitialContext(env);

       

       

      Getting the exception "Failed to retreive the Naming Context" in the start method of SAR mbean.

       

      If I redeploy the SAR after the jboss started, everything looks fine. So what service I need to put in as a dependent to make the http look up work?

      I tried few combination to http invoker and Jndifactory servlet etc with out success.

       

      Any help is appreciated. I am using JBOSS 4.2.1