-
15. Re: JSR-299 servlet injection
starksm64 Mar 17, 2009 12:01 PM (in response to pmuir)"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 Mar 17, 2009 12:13 PM (in response to pmuir)"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 Mar 17, 2009 12:13 PM (in response to 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 Mar 17, 2009 12:35 PM (in response to pmuir)"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 Mar 18, 2009 10:57 AM (in response to pmuir)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 Apr 8, 2009 11:11 AM (in response to 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