[weld-issues] [JBoss JIRA] Updated: (WELDX-23) Support servlet injection on Jetty
Matija Mazi (JIRA)
jira-events at lists.jboss.org
Thu Feb 18 05:30:10 EST 2010
[ https://jira.jboss.org/jira/browse/WELDX-23?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matija Mazi updated WELDX-23:
-----------------------------
Attachment: jetty-injection.patch
myapp-context.xml
I've done some work on injection into servlets and filters for Jetty 6. Here's what I've come up with so far - the patch (to be applied to weld/servlet/trunk) is attached.
This includes injection into Servlets and Filters, but not Listeners. It adds a sub-module weld-jetty-support to the weld-servlet module and changes some stuff in the weld-servlet-int module. To use it you need to:
- add weld-jetty-support.jar to JETTY_HOME/lib
- package the new weld-servlet.jar with your war/WEB-INF/lib (as normally)
- deploy your web app into Jetty
- change the attached myapp-context.xml to refer to your web app and deploy it into JETTY_HOME/contexts
Here are some open issues that remain and need some discussion.
1. Injection into Listeners. As far as I could see, this isn't yet supported even in Tomcat? I've done some work on this for Jetty 6 (not yet included in the attached patch) and I think it can be done (using javassist to add the injection code into the first lifecycle method called on the listener).
2. I don't like the fact that you need to deploy two files into Jetty, the war and the contexts/*.xml, but I don't think there's another way since the jetty example for using annotation injection does the same.
3. I haven't provided any tests for Jetty integration. There is a jboss-test-harness-tomcat but nothing similar for Jetty. Maybe I could create a jboss-test-harness-jetty and use it to create Weld-Jetty integration tests.
4. This works for Jetty 6; I haven't tried Jetty 7.
5. I didn't do for Jetty anything similar to JspInitialization (supposed to replace the el.ExpressionFactory) in tomcat-support; how is this used?
6. Servlet injection doesn't work in Tomcat 7 (https://jira.jboss.org/jira/browse/WELDX-45); I think I should be able to fix this easily now.
> Support servlet injection on Jetty
> ----------------------------------
>
> Key: WELDX-23
> URL: https://jira.jboss.org/jira/browse/WELDX-23
> Project: Weld Extensions
> Issue Type: Feature Request
> Components: Servlet Containers
> Reporter: Pete Muir
> Assignee: Matija Mazi
> Attachments: jetty-injection.patch, myapp-context.xml
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the weld-issues
mailing list