Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 36096 invoked from network); 4 Feb 2006 18:32:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Feb 2006 18:32:18 -0000 Received: (qmail 33200 invoked by uid 500); 4 Feb 2006 18:32:16 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 33104 invoked by uid 500); 4 Feb 2006 18:32:15 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 33093 invoked by uid 99); 4 Feb 2006 18:32:15 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO [127.0.0.1]) (209.237.227.194) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2006 10:32:15 -0800 Message-ID: <43E4F3DE.4030907@apache.org> Date: Sat, 04 Feb 2006 19:35:10 +0100 From: Carsten Ziegeler User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: [Vote] Let the environment interfaces extend the javax.servlet.http ones References: <43E4BA29.8010600@nada.kth.se> <43E4E856.3070909@apache.org> <43E4EADE.80009@nada.kth.se> <43E4ED0D.9070402@apache.org> In-Reply-To: <43E4ED0D.9070402@apache.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Sylvain Wallez wrote: > Daniel Fagerstrom wrote: >> Carsten Ziegeler skrev: >>> Hmm, I think it will, e.g. j.s.h.HttpServletRequest#getSession returns >>> a j.s.h.HttpSession while o.a.c.e.Request#getSession returns a >>> o.a.c.e.Session and overriding just the return type is not possible >>> in java. >> Didn't think about that. >> >> If we let o.a.c.e.Request#getSession have j.s.h.HttpSession as return >> type and then let it return something that implements o.a.c.e.Session >> You can always cast the return type of to a o.a.c.e.Session. >> >> Wouldn't the need to add a few casts be a rather minor inconvenience >> that is worthwhile for simplifying the framework and make it easier to >> connect to the rest of the world? > > This isn't a minor inconvenience, as it will break every code out there > that gets the session from a oace.Request, and there is *a lot*. Exactly. > So -1, although I was initially in favor of this change. Yeah, I wasn't against it either and did not see this problem earlier on, but as soon as Daniel listed the changes in this vote thread, I noticed the problem :( > > One of the possible solutions is to make generally and officially > available the ServletRequest and ServletResponse entries of the object > model that are populated by the HttpEnvironment. This creates a > migration path towards the standard servlet interfaces. > They are already officially available in an http environment, so we could end up with the question what to do in other environments. Generating them? Carsten -- Carsten Ziegeler - Open Source Group, S&N AG http://www.s-und-n.de http://www.osoco.org/weblogs/rael/