cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helma van der Linden (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (COCOON-410) RequestLifecycleComponents are not handled properly when the cocoon: protocol is used
Date Tue, 25 Oct 2005 13:43:59 GMT
     [ http://issues.apache.org/jira/browse/COCOON-410?page=all ]
     
Helma van der Linden reopened COCOON-410:
-----------------------------------------


reopened just to set the resolution to fixed

> RequestLifecycleComponents are not handled properly when the cocoon: protocol is used
> -------------------------------------------------------------------------------------
>
>          Key: COCOON-410
>          URL: http://issues.apache.org/jira/browse/COCOON-410
>      Project: Cocoon
>         Type: Bug
>   Components: * Cocoon Core
>     Versions: 2.0.5-dev (Current CVS)
>  Environment: Operating System: All
> Platform: All
>     Reporter: Carsten Ziegeler
>     Assignee: Cocoon Developers Team
>     Priority: Blocker

>
> RequestLifecycleComponents are not handled properly when the cocoon: protocol 
> is used.
> This has many reasons, assume the following example:
> <map:match pattern="mobiharzauth-**">
>  <map:act type="auth-protect">
>   <map:parameter name="handler" value="portalhandler"/>
>   <map:match pattern="mobiharzauth-portal-*">
>    <map:generate src="cocoon:/mobiharzauth-loggedIn"/>
>    <map:transform type="session"/>
>    <map:serialize/>
>   </map:match>       
>           
>   <map:match pattern="mobiharzauth-loggedIn">
>    <map:generate src="resources/auth/login.xml"/>
>    <map:serialize/>
>   </map:match>
>  
> </map:act>
> </map:match>
> When the first pipeline is called, it calls internally the second one - so far 
> so good. The RequestLifecycleComponents are tied to the environment. When the 
> first pipeline is executed, a AuthenticationManager is established for this and 
> also an authentication manager for the second pipeline.
> But when the real XML streaming takes place, the second pipeline is execute, 
> the toSAX() method of the SitemapSource to be exact. This changes the 
> environment in order to run the internal pipeline - but as this environment is 
> global this also changes the environment for the first pipeline and so the
> first pipeline cannot find the AuthenticationManager any more. PANG.
> But the problem is even worse. For an internal protocol the pipeline is 
> established, and the enterEnvironment() events are send accordingly. When this 
> generation of the pipeline is finished, the corresponding leaveEnvironments are 
> called - so all RequestLifecycleComponents are destroyed at this time. But the 
> XML is not streamed yet...so PANG again.
> The only solution is to rewrite all this stuff...
> Here is the XML:
> <?xml version="1.0"?>
> <login xmlns:session="http://cocoon.apache.org/session/1.0">
>     <table>
>         <tbody>
>             <tr>
>                 <td>
>                     <p>hallo</p>
>                     <session:getxml context="authentication" path="/"/>
>                 </td>
>             </tr>
>         </tbody>
>     </table>
> </login>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message