cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rice Yeh (JIRA)" <>
Subject [jira] Updated: (COCOON-2038) Implement true Object Oriented approach for handling super calls
Date Sat, 07 Jul 2007 19:49:04 GMT


Rice Yeh updated COCOON-2038:

    Attachment: cocoon-servlet-service-impl.patch

  I am sorry for delaying so long to reply your messages because I has been too busy for the
past 2 weeks.
The following is the description of my implementation:
  I use the same reason as described by Daniel above to implement this function. However,
in addition to
the returned status code, I also use ServletException to tell that a function might be implemented
in a super
servlet service. Lets say servlet service s1 extends servlet service s0. A request r asking
for functin f is handled
by s1 unsuccessfully because either an instance of ServletException is thrown or the returned
status code
is not between 200 to 399, r is then handled by s0. The code is implemented in method 'forward'
method of the
inner class PathDispatcher of ServletServiceContext.

  However, since there is not a method getStatus() in HttpServletResponse, I define a new
interface called
StatusRetrievableResponse which just contains a method getStatus(). Then I change the method
in DispatcherServlet to wrapp the passed-in repsonse 'rep' to make the response implement
in order to let getting status possible in the method 'forward' in PathDispatcher.

  On the implementation, I find 2 bugs in ServletServiceContext. The first one is in the method
getNamedContext in ServletServiceContext. It does not look up super servlet for a named connection.
The second one is in the constructor of the inner class NamedDispatcher of the ServletServiceContext.
I have to use an example to tell this bug. Let say the above servlet service s0 have a link
(but not a super link)
to another servlet service s3. When s1 invokes s3, current implementation treats this invocation
as super invocation. I think
this is not right. So I remove some lines of code which doing the supperCall setting in the
NamedDispatcher constructor.

I attach one file patch this time.


> Implement true Object Oriented approach for handling super calls
> ----------------------------------------------------------------
>                 Key: COCOON-2038
>                 URL:
>             Project: Cocoon
>          Issue Type: Task
>          Components: - Servlet service framework
>            Reporter: Grzegorz Kossakowski
>            Assignee: Grzegorz Kossakowski
>             Fix For: 2.2-dev (Current SVN)
>         Attachments:, cocoon-servlet-service-impl.patch,,,
> As discussed here: implementation
of super calls should be changed to make it more OO-like.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message