cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <>
Subject Re: [Vote] Let the environment interfaces extend the javax.servlet.http ones
Date Sat, 04 Feb 2006 18:35:10 GMT
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*.

> 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

Carsten Ziegeler - Open Source Group, S&N AG

View raw message