Of course :)<br><br><div class="gmail_quote">On Fri, Apr 9, 2010 at 11:14 AM, Pete Muir <span dir="ltr"><<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I'm not disputing that CDI should provide it there, but Weld is the *reference* implementation of the CDI spec so needs to provide a reference for other people to follow.<br>
<br>
So IOW I would like guidance from the CDI EG that they intend to change it so servlet supports conversations in the next iteration of the CDI spec.<br>
<br>
Does that make some sense?<br>
<div><div></div><div class="h5"><br>
On 9 Apr 2010, at 16:09, Lincoln Baxter, III wrote:<br>
<br>
> I think that limiting the conversation to the JSF lifecycle is a big drawback for out-of-the-box experience -- we should be providing this for the entire servlet lifecycle. I'd argue that it is in the spirit of the new JavaEE 6 spec, which clearly provides injection in Filters, Servlets and Listeners now -- we should be providing Conversation support there as well. Filters and Servlets are still a strong part of Java EE, the core part, in my opinion -- JSF is just one option.<br>
><br>
> --Lincoln<br>
><br>
> On Fri, Apr 9, 2010 at 5:57 AM, Pete Muir <<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a>> wrote:<br>
> I agree it's not in direct contradiction, but it doesn't seem to be in the spirit of the spec either.<br>
><br>
> On 9 Apr 2010, at 10:52, Nicklas Karlsson wrote:<br>
><br>
> > We had been discussing with Dan and Lincoln on activating the conversation context for the entire request as it didn't seem to be a direct contradiction of the spec and Shane needed it for something about the same time so it got committed. I mailed the EG and asked about it but we can revert for now.<br>
> ><br>
> > On Fri, Apr 9, 2010 at 12:13 PM, Pete Muir <<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a>> wrote:<br>
> > Guys,<br>
> ><br>
> > This doesn't seem in line with the spec to me, and I think we should revert it. What is the motivation for doing it?<br>
> ><br>
> > Pete<br>
> ><br>
> > Begin forwarded message:<br>
> ><br>
> > > From: <a href="mailto:weld-commits@lists.jboss.org">weld-commits@lists.jboss.org</a><br>
> > > Date: 1 April 2010 07:48:18 GMT+01:00<br>
> > > To: <a href="mailto:weld-commits@lists.jboss.org">weld-commits@lists.jboss.org</a><br>
> > > Subject: [weld-commits] Weld SVN: r6071 - in core/trunk/impl/src/main/java/org/jboss/weld: servlet and 1 other directory.<br>
> > > Reply-To: <a href="mailto:weld-commits@lists.jboss.org">weld-commits@lists.jboss.org</a><br>
> > ><br>
> > > Author: <a href="mailto:shane.bryzak@jboss.com">shane.bryzak@jboss.com</a><br>
> > > Date: 2010-04-01 02:48:18 -0400 (Thu, 01 Apr 2010)<br>
> > > New Revision: 6071<br>
> > ><br>
> > > Modified:<br>
> > > core/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java<br>
> > > core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java<br>
> > > Log:<br>
> > > moved conversation setup/teardown out of jsf phase listener into servlet lifecycle (Nik says to blame me if this doesn't work ;)<br>
> > ><br>
> > ><br>
> > > Modified: core/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java<br>
> > > ===================================================================<br>
> > > --- core/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java 2010-03-31 03:21:16 UTC (rev 6070)<br>
> > > +++ core/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java 2010-04-01 06:48:18 UTC (rev 6071)<br>
> > > @@ -118,7 +118,7 @@<br>
> > > private void beforeRestoreView(FacesContext facesContext)<br>
> > > {<br>
> > > log.trace(INITIATING_CONVERSATION, "Restore View");<br>
> > > - initiateSessionAndConversation(facesContext);<br>
> > > + //initiateSessionAndConversation(facesContext);<br>
> > > }<br>
> > ><br>
> > > /**<br>
> > > @@ -127,7 +127,7 @@<br>
> > > private void afterRenderResponse(FacesContext facesContext)<br>
> > > {<br>
> > > log.trace(CLEANING_UP_CONVERSATION, "Render Response", "response complete");<br>
> > > - getConversationManager().teardownConversation();<br>
> > > + //getConversationManager().teardownConversation();<br>
> > > }<br>
> > ><br>
> > > /**<br>
> > > @@ -136,7 +136,7 @@<br>
> > > private void afterResponseComplete(FacesContext facesContext, PhaseId phaseId)<br>
> > > {<br>
> > > log.trace(CLEANING_UP_CONVERSATION, phaseId, "the response has been marked complete");<br>
> > > - getConversationManager().teardownConversation();<br>
> > > + //getConversationManager().teardownConversation();<br>
> > > }<br>
> > ><br>
> > > /**<br>
> > ><br>
> > > Modified: core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java<br>
> > > ===================================================================<br>
> > > --- core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2010-03-31 03:21:16 UTC (rev 6070)<br>
> > > +++ core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2010-04-01 06:48:18 UTC (rev 6071)<br>
> > > @@ -162,6 +162,7 @@<br>
> > > request.setAttribute(REQUEST_ATTRIBUTE_NAME, beanStore);<br>
> > > lifecycle.beginRequest(request.getRequestURI(), beanStore);<br>
> > > restoreSessionContext(request);<br>
> > > + conversationManager(request.getSession().getServletContext()).setupConversation(request.getParameter("cid"));<br>
> > > }<br>
> > > }<br>
> > ><br>
> > > @@ -176,10 +177,12 @@<br>
> > > {<br>
> > > return;<br>
> > > }<br>
> > > - teardownSession(request);<br>
> > > +<br>
> > > + conversationManager(request.getSession().getServletContext()).teardownConversation();<br>
> > > teardownRequest(request);<br>
> > > lifecycle.getConversationContext().setBeanStore(null);<br>
> > > lifecycle.getConversationContext().setActive(false);<br>
> > > + teardownSession(request);<br>
> > > }<br>
> > ><br>
> > > private void teardownSession(HttpServletRequest request)<br>
> > ><br>
> > > _______________________________________________<br>
> > > weld-commits mailing list<br>
> > > <a href="mailto:weld-commits@lists.jboss.org">weld-commits@lists.jboss.org</a><br>
> > > <a href="https://lists.jboss.org/mailman/listinfo/weld-commits" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-commits</a><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > weld-dev mailing list<br>
> > <a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
> > <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > ---<br>
> > Nik<br>
><br>
><br>
> _______________________________________________<br>
> weld-dev mailing list<br>
> <a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
><br>
><br>
><br>
> --<br>
> Lincoln Baxter, III<br>
> <a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
> <a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
> "Keep it Simple"<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>"Keep it Simple"<br>