cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12293] New: - RequestLifecycleComponents are not handled properly when the cocoon: protocol is used
Date Wed, 04 Sep 2002 12:04:13 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12293>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12293

RequestLifecycleComponents are not handled properly when the cocoon: protocol is used

           Summary: RequestLifecycleComponents are not handled properly when
                    the cocoon: protocol is used
           Product: Cocoon 2
           Version: Current CVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: core
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: cziegeler@apache.org


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>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message