Rice Yeh | 2 Sep 08:53
Picon

Re: True OO for servlet service

Hi Grek,
  Attached is the patch that is based on the present cocoon-servlet-service-impl implementation. cocoon-servlet-service-impl has some change since I posted my patch on COCOON-2038, which has already too many files attached to it. In order not to confuse you, I have the the patch attached to this mail. So you do not need to patch the files in COCOON-2038. I find you already have written a test case class ServletServiceContextTestCase for ServletServiceContext. I add one more test case in it to test COCOON-1939. All the test cases in ServletServiceContextTestCase are passed.
So after applying this patch, you might close COCOON-2038 by referring back to this mail if there are no further problems.

Regards,
Rice


On 8/29/07, Grzegorz Kossakowski <grek <at> tuffmail.com> wrote:
Hello,

I don't have that much time to spend these days on Cocoon but I would really like to see true Object
Oriented approach implemented in upcoming[1] release of cocoon-servlet-service. The main task is
tracked by COCOON-2038[2] where Rice Yeh has uploaded his patch implementing true OO behaviour in
servlet-service-fw. According to Rice, this patch contains a bug-fix as well (details in the comments).

After reviewing Rice's patch I decided that we really need test coverage for this quite complicated
functionality for both ServletServiceContext class usage clarity and casual hunting for bugs. Daniel
pointed me to another bug report (COCOON-1939[3]) that involves OO aspects of servlet-service-fw.
That makes point about test coverage even more strong.

What I would like to ask you for in this e-mail is to add additional tests to
ServletServiceContextTestCase class that exhibit problems mentioned in both issues. As soon as I
have working test cases I guess that fixing problems would be quite easy. Since it was you who
discovered problems it should be quite easy to write tests for them, too.

Alexander and Rice, can I count on your help with this before next release in late September is cut?

[1] http://article.gmane.org/gmane.text.xml.cocoon.devel/74999
[2] https://issues.apache.org/jira/browse/COCOON-2038
[3] https://issues.apache.org/jira/browse/COCOON-1939

--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Attachment (cocoon-servlet-service-impl.patch): application/octet-stream, 8 KiB
Picon
Favicon

[jira] Updated: (COCOON-2038) Implement true Object Oriented approach for handling super calls


     [
https://issues.apache.org/jira/browse/COCOON-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grzegorz Kossakowski updated COCOON-2038:
-----------------------------------------

    Attachment:     (was: DispatcherServlet.java.patch)

> Implement true Object Oriented approach for handling super calls
> ----------------------------------------------------------------
>
>                 Key: COCOON-2038
>                 URL: https://issues.apache.org/jira/browse/COCOON-2038
>             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: http://thread.gmane.org/gmane.text.xml.cocoon.devel/72317 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.

Picon
Favicon

[jira] Updated: (COCOON-2038) Implement true Object Oriented approach for handling super calls


     [
https://issues.apache.org/jira/browse/COCOON-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grzegorz Kossakowski updated COCOON-2038:
-----------------------------------------

    Attachment:     (was: StatusRetrievableResponse.java)

> Implement true Object Oriented approach for handling super calls
> ----------------------------------------------------------------
>
>                 Key: COCOON-2038
>                 URL: https://issues.apache.org/jira/browse/COCOON-2038
>             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: http://thread.gmane.org/gmane.text.xml.cocoon.devel/72317 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.

Picon
Favicon

[jira] Updated: (COCOON-2038) Implement true Object Oriented approach for handling super calls


     [
https://issues.apache.org/jira/browse/COCOON-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grzegorz Kossakowski updated COCOON-2038:
-----------------------------------------

    Attachment:     (was: ServletServiceContext.java.patch)

> Implement true Object Oriented approach for handling super calls
> ----------------------------------------------------------------
>
>                 Key: COCOON-2038
>                 URL: https://issues.apache.org/jira/browse/COCOON-2038
>             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: http://thread.gmane.org/gmane.text.xml.cocoon.devel/72317 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.

Picon
Favicon

[jira] Updated: (COCOON-2038) Implement true Object Oriented approach for handling super calls


     [
https://issues.apache.org/jira/browse/COCOON-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grzegorz Kossakowski updated COCOON-2038:
-----------------------------------------

    Attachment:     (was: BlockCallHttpServletResponse.java.patch)

> Implement true Object Oriented approach for handling super calls
> ----------------------------------------------------------------
>
>                 Key: COCOON-2038
>                 URL: https://issues.apache.org/jira/browse/COCOON-2038
>             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: http://thread.gmane.org/gmane.text.xml.cocoon.devel/72317 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.

Picon
Favicon

Re: True OO for servlet service

Rice Yeh pisze:
> Hi Grek,

Hi Rice :)

>   Attached is the patch that is based on the present
> cocoon-servlet-service-impl implementation. cocoon-servlet-service-impl
> has some change since I posted my patch on COCOON-2038, which has
> already too many files attached to it. In order not to confuse you, I
> have the the patch attached to this mail. So you do not need to patch
> the files in COCOON-2038. 

There is a legal problem with such approach. When attaching patch to a JIRA issue you check the
option that you intend this file for inclusion to the source codes licensed by Apache License. This
agreement is a must in order to commit your patch.

I already cleaned up COCOON-2038 so you can safely attach your patch as
cocoon-servlet-service-impl-with-tests.patch.

> I find you already have written a test case
> class ServletServiceContextTestCase for ServletServiceContext. 

Yes and I wanted to know if testContextInServletCalledFromExplicitSuperCall covers the bug we were
talking about in COCOON-2038 as I'm not sure.

> I add one
> more test case in it to test COCOON-1939. All the test cases in
> ServletServiceContextTestCase are passed.
> So after applying this patch, you might close COCOON-2038 by referring
> back to this mail if there are no further problems.

Great, thanks Rice for your work! As long as all doubts are dispelled I'll commit your patch.

--

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Rice Yeh (JIRA | 2 Sep 12:13
Picon
Favicon

[jira] Updated: (COCOON-2038) Implement true Object Oriented approach for handling super calls


     [
https://issues.apache.org/jira/browse/COCOON-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rice Yeh updated COCOON-2038:
-----------------------------

    Attachment: cocoon-servlet-service-impl.patch

refer to mail http://www.mail-archive.com/dev <at> cocoon.apache.org/msg53636.html.

Rice

> Implement true Object Oriented approach for handling super calls
> ----------------------------------------------------------------
>
>                 Key: COCOON-2038
>                 URL: https://issues.apache.org/jira/browse/COCOON-2038
>             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, cocoon-servlet-service-impl.patch
>
>
> As discussed here: http://thread.gmane.org/gmane.text.xml.cocoon.devel/72317 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.

Picon
Favicon

[jira] Assigned: (COCOON-1939) Stack overflow when inheriting from block that alread inherits from another one


     [
https://issues.apache.org/jira/browse/COCOON-1939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grzegorz Kossakowski reassigned COCOON-1939:
--------------------------------------------

    Assignee: Grzegorz Kossakowski

> Stack overflow when inheriting from block that alread inherits from another one
> -------------------------------------------------------------------------------
>
>                 Key: COCOON-1939
>                 URL: https://issues.apache.org/jira/browse/COCOON-1939
>             Project: Cocoon
>          Issue Type: Bug
>          Components: - Servlet service framework
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Alexander Klimetschek
>            Assignee: Grzegorz Kossakowski
>
> There are problems with the following scenario: I have one Block A, another one B that has A as super-block
defined and a third one C that has B as super-block defined.
> The super-relation between B and A works ok, but if you start in C, then forward to B, which in turn wants to
forward to block A (all via the block:super: protocol), a stack overflow happens. It looks like he always
thinks he is in C, so that block:super: from B will always get to B, thus creating an endless loop.

--

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

Picon
Favicon

[jira] Updated: (COCOON-2038) Implement true Object Oriented approach for handling super calls


     [
https://issues.apache.org/jira/browse/COCOON-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grzegorz Kossakowski updated COCOON-2038:
-----------------------------------------

    Attachment: cocoon-servlet-service-2007-09-02.patch

Attaching simplified Rice's patch that still does not pass tests.

> Implement true Object Oriented approach for handling super calls
> ----------------------------------------------------------------
>
>                 Key: COCOON-2038
>                 URL: https://issues.apache.org/jira/browse/COCOON-2038
>             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-2007-09-02.patch, cocoon-servlet-service-impl.patch, cocoon-servlet-service-impl.patch
>
>
> As discussed here: http://thread.gmane.org/gmane.text.xml.cocoon.devel/72317 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.

Picon
Favicon

[jira] Closed: (COCOON-1939) Stack overflow when inheriting from block that alread inherits from another one


     [
https://issues.apache.org/jira/browse/COCOON-1939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grzegorz Kossakowski closed COCOON-1939.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2-dev (Current SVN)

Fixed in r572015.

> Stack overflow when inheriting from block that alread inherits from another one
> -------------------------------------------------------------------------------
>
>                 Key: COCOON-1939
>                 URL: https://issues.apache.org/jira/browse/COCOON-1939
>             Project: Cocoon
>          Issue Type: Bug
>          Components: - Servlet service framework
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Alexander Klimetschek
>            Assignee: Grzegorz Kossakowski
>             Fix For: 2.2-dev (Current SVN)
>
>
> There are problems with the following scenario: I have one Block A, another one B that has A as super-block
defined and a third one C that has B as super-block defined.
> The super-relation between B and A works ok, but if you start in C, then forward to B, which in turn wants to
forward to block A (all via the block:super: protocol), a stack overflow happens. It looks like he always
thinks he is in C, so that block:super: from B will always get to B, thus creating an endless loop.

--

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


Gmane