6 Replies Latest reply on Nov 16, 2006 10:50 AM by starksm64

    Web tier injection has been restored

    starksm64

      I have restored the web tier injection code and its working for the tests I have run. I have not tested any @WebService refs but will tomorrow.

        • 1. Re: Web tier injection has been restored
          anil.saldhana

          I am getting a null on the lookup for

           InitialContext iniCtx = new InitialContext();
           securityCtx = (Context) iniCtx.lookup("java:comp/env/security");
          


          I think the issue is that during the ENC setup, the class loader should be WebCtxLoader.getClassLoader and not "loader" (I am not sure if this applies to all cases - when using Jboss web loader or tomcat loader)

          A test case that you can check is:
          ant -Dtest=org.jboss.test.security.test.WebConstraintsUnitTestCase one-test
          


          • 2. Re: Web tier injection has been restored
            anil.saldhana

            I think it is already "webLoader.getClassLoader()" in TomcatDeployment being passed to setup ENC

            It seems like it is an injection issue.

            • 3. Re: Web tier injection has been restored
              starksm64

              Right, it is the getClassLoader() as the webLoader is not a ClassLoader instance. The linkSecurityDomain had gotten dropped in the switch to the injection container. I'm looking at why the security domain is not being bound as just restoring the call to linkSecurityDomain is not resulting in it being seen.

              • 4. Re: Web tier injection has been restored
                anil.saldhana

                TomcatDeployment

                 // Build the ENC
                 if (injectionContainer == null)
                 super.processEnc(webLoader.getClassLoader(), webApp);
                 else
                 injectionContainer.populateEnc(webLoader.getClassLoader());
                


                In the case of a plain webapp (zero annotations), it does not go thru injection container. Is that right?

                • 5. Re: Web tier injection has been restored
                  starksm64

                  This test is passing for me now with the latest TomcatDeployment changes.

                  • 6. Re: Web tier injection has been restored
                    starksm64

                     

                    "anil.saldhana@jboss.com" wrote:
                    TomcatDeployment
                    In the case of a plain webapp (zero annotations), it does not go thru injection container. Is that right?

                    No, the injection container handles all metadata, be it from xml or annoations. The concern is that its using a different metadata set and parser so there is duplicate effort going on. This needs to be fixed by the unified metadata view.