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
--
Sylvain Wallez Anyware Technologies
http://bluxte.net http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director