You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by "Pill, Juergen" <Ju...@softwareag.com> on 2001/07/19 17:11:57 UTC

child store specify a response code

Hi all,

Our child store wants/needs more control over the generated response codes.
Currently the child stores may either throw a ServiceAccessexception, which
is mostly transformed into an "Internal Server Error" and some more specific
Exceptions, which are transformed by a method-specific algorithm into
appropriate response codes.

We have two areas, where we want to use this:

1) concurrent write access to a resource (e.g. a LockDescriptor) from
different threads/clients. In this case none of the exception seams to
generate appropriate response codes, we want the generate "409 conflict"
instead of "500 internal server error" (any better response code?)
2) some of our collections will be limited in the ability to store resources
or content. Here again the child store wants to generate a more specific
error message.

Solution:

1) create a new class ServiceAccessExceptionWithResponseCode, which extends
the class ServiceAccessException. This new class may contain a ready to
use/send response code, set by the child store.
2) All WebDAV methods (put, lock, ...) will additionally catch this new
Exception and deliver the set response code to the client.

No interface change will be necessary and the modifications will be pretty
local to the WebDAV method classes.

Does someone have an opinion against this change? If not, we are planning to
modify the Slide sources middle of next week.

Best regards

Juergen Pill