cocoon-dev mailing list archives

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

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.


Sylvain Wallez                        Anyware Technologies           
Apache Software Foundation Member     Research & Technology Director

View raw message