Hi,
quite recently we started the porting of our webDAV/resource centric
app server/framework implementation to Spring, and right at the start
we run in to a couple of bugging inconveniences:
1) the FrameworkServlet forwards POST and GET requests to subclasses
through the serviceWrapper(). That's fine for most web apps, but
webDAV has a lot more methods, so we override service() to allow
for these. However, since serviceWrapper has been made private, we
have to copy/paste serviceWrapper into our subclass' service()...
Would it be a solution to make serviceWrapper() protected instead,
even if it in theory would make it possible for people to do
something they shouldn't?
2) Being resource/url centric, and with a lot of functionality linked
to dynamic resources based on different kinds of properties on
these resources, our handler mapping is quite complex. We have two
levels of mapping:
- First we have the 'usual' HandlerMapping setup in Spring to
decide what kind of 'application' should handle the request.
- Then we have the applications, which is another level of
HandlerMapping resolving the actual handler to use.
Now, the problem we ran into was that since Spring chooses handlers
by looking for HandlerMapping beans and running them in sequence,
the 'application level' handler mappings is run at the first level.
The workaround for this is to have these handler mappings subclass
a copy/pasted version of AbstactHandlerMapping, where the
'implements HandlerMapping' is removed.
I'd like to avoid this duplication of code, but I'm a bit unsure
about how to do it. Especially since it's bad timing to propose
changing the overall design now :) Would it be OK to move the
implementation of AbstractHandlerMapping to a new super class,
which didn't implement HandlerMapping, and keep only the 'implement
HandlerMapping' in AbstractHandlerMapping?
This way I could sub class the super class to get the desired
functionality without being discovered by Spring, and subclasses
of AbstractHandlerMapping would remain the undisturbed.
What do you think? I could probably live with duplicating some code,
but I don't like it. And if I have these requirements, chances are
others will have, too?
BTW, congratulations on your 1.0(.1!) release, great work.
Haveaniceday,
Jo
|