cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: Flow + Hibernate and lazy initialization
Date Thu, 10 Jun 2004 18:50:17 GMT
Nicolas Bielza wrote:

>Thanks, I tried this and the catch(return) is not interpreted when using
>sendPage(), it's just ignored.
>
>I also tried your previous suggestion, but my app was not responding
>anymore, maybe the "FOM_Cocoon.suicide();" line is required ?
>
>Anyway, this probably won't help much, since I also tried the
>postpipeline code with sendPageAndWait() and it's also  interpreted
>before the view is rendered. This looks like a bug :
>The http://cocoon.apache.org/2.1/userdocs/flow/api.html#sendPageAndWait
>page says :
>
>"If provided, the postPipelineCode function will be executed after
>pipeline processing is complete but before the script is suspended. You
>can use this to release resources that are needed during the pipeline
>processing but should not become part of the continuation"
>
>If the "catch(return)" code is interpreted just before the script is
>suspended, then it looks like the script is suspended BEFORE the
>pipeline processing is complete ! So the postpipeline code is really a
>postpipelineinvocation code.
>
>It looks like the only solution that would work is to use a filter
>servlet but I don't have such things in my environment :(
>  
>
I'd say persevere with the catch(return) idea. The reason I proposed it 
is because I asked someone who had exactly that problem with Hibernate, 
and it works for him. And he was advised by the person who coded a lot 
of the flow stuff.

Regards, Upayavira

>Regards,
>
>Nicolas.
>
>-----Original Message-----
>From: Upayavira [mailto:uv@upaya.co.uk] 
>Sent: 10 juin, 2004 14:14
>To: users@cocoon.apache.org
>Subject: Re: Flow + Hibernate and lazy initialization
>
>
>Nicolas Bielza wrote:
>
>  
>
>>Well, when I say that they "work", I mean that they are interpreted and
>>    
>>
>
>  
>
>>not ignored. I'm not sure that they actually "work", since they don't 
>>seem to wait for the view to be rendered. (but maybe this is by
>>design..)
>>
>>    
>>
>
>Try this:
>
>function someFunction() {
>
>    var session = ...
>    ...
>
>    cocoon.sendPage(...);
>
>    catch (return) {
>        // after calling the view layer but before control 
>        // leaves the interpreter
>    }
>}
>
>Note, the catch is not associated with a try.
>
>This came of the previously referenced 
>http://wiki.cocoondev.org/Wiki.jsp?page=RhinoWithContinuations
>but that page is pretty frightening.
>
>Hope this helps.
>
>Regards, Upayavira
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>



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


Mime
View raw message