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

    SAR making a InitialContext using HTTPNamingContextFactory in start method

    Unni N Newbie

      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");

      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