1 2 Previous Next 20 Replies Latest reply on Apr 8, 2009 11:11 AM by pmuir Go to original post
      • 15. Re: JSR-299 servlet injection
        starksm64

         

        "alesj" wrote:
        Actually, Emanuel mentioned an existing component factory project:
        - http://anonsvn.jboss.org/repos/jbossas/projects/component-factory/trunk

        Scott, what's the status of this?
        Should I rather work on this instead of integration?

        I have not been working on it because of profileservice tasks. Sure, take it over and finish it.


        • 16. Re: JSR-299 servlet injection
          alesj

           

          "scott.stark@jboss.org" wrote:

          I have not been working on it because of profileservice tasks. Sure, take it over and finish it.

          I know this is the stuff we've been working on at EJB meeting in Neuchatel last year,
          but I have to admit I have no clue what's that all about. :-)

          If you could just explain it a bit.
          Or how would this come in play with jsr-299 or ejb injection?

          • 17. Re: JSR-299 servlet injection
            pmuir

            I would suggest modeling it on the InjectionPoint in JSR299 http://anonsvn.jboss.org/repos/webbeans/ri/trunk/api/src/main/java/javax/inject/manager/InjectionPoint.java. Of course, we need the instance to inject into too.

            • 18. Re: JSR-299 servlet injection
              starksm64

               

              "alesj" wrote:

              I know this is the stuff we've been working on at EJB meeting in Neuchatel last year, but I have to admit I have no clue what's that all about. :-)

              If you could just explain it a bit.
              Or how would this come in play with jsr-299 or ejb injection?

              The main notion was a container that was associated with one to many bean instances to which the container applied the injection and managed lifecycle callbacks. Any framework with such a model would extend the container and supply the associated injection metadata. The InjectionPoint interface Pete referenced could be the api the container would have for the bean components. Right now I think its just mc dependency metadata.

              Honestly I don't know if there is much in the project.


              • 19. Re: JSR-299 servlet injection
                alesj

                This looks too much of a hassle for a single Servlet injection.
                Not to mention that it's not nearly done yet
                or more fleshed out (at least I don't see it).

                Looking at TomcatInjectionContainer just brings shivers to my bones :-),
                it's one huge pile of different / mixed concepts,
                some of them even done completely wrong - e.g. class instance being shared between diff method params / threads.

                If we can nail down what this actually does or should do (who knows this?)
                I can re-write it to use some of MC's logic regarding injection.

                e.g.
                * let JBossWeb invoke InstanceManager
                * handoff instance creation to MC
                * apply constraints as part of MC lifecycle
                * examine for injections (as we already do for MC)
                * "revert" this on destruction

                • 20. Re: JSR-299 servlet injection
                  pmuir

                  Another option, which is probably easier, is to install a AnnotationProcessor (which wraps and forwards calls to the default AnnotationProcessor in JBossWeb), and delegates at runtime to an AnnotationProcessor which Web Beans exposes to the ServletContext on contextInitialized.

                  I took this approach for the plain Tomcat integration https://svn.jboss.org/repos/webbeans/extensions/trunk/tomcat/support/src/main/java/org/jboss/webbeans/environment/tomcat/WebBeansLifecycleListener.java

                  1 2 Previous Next