cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <gkossakow...@apache.org>
Subject Re: pipelineComponent scope troubles
Date Wed, 19 Sep 2007 09:51:58 GMT
Giacomo Pati pisze:
> 
> 
> Grzegorz Kossakowski wrote:
>> Giacomo Pati pisze:
>> Giacomo, this issue caused frustration that affected all of us but I would like to
ask you about a
>> little more. Could you start my sample in a debugger and set breakpoint on put()
method of
>> ObjectModelImpl? Then could you analyse all calls to that method and figure out if
they are
>> operating on the same ObjectModelImpl class instance?
>> You should debug with OM's scope set to request. The expected result is that during
whole request
>> processing (including making a servlet call) every method call should be on the same
instance of OM.
> 
> Every method call _is_ on the same instance. The put method gets called 3 times with:
> 
> 1. ObjId=68 key="java"
> 2. ObjId=68 key="cocoon"
> 3. ObjId=68 key="Packages"

Hmmm, it should be called more than three times because when executing
http://localhost:8080/myBlock1/test the status variable should be put on OM. Is this a case?
You can
check it by putting breakpoint on org.apache.cocoon.components.flow.FlowHelper.setContextObject().

To give you better idea what we are searching for: I believe that your NPE is caused by the
fact
that flowscript puts status variable on one instance of OM and template from myBlock2 uses
another
instance of OM.

You can set breakpoint on org.apache.cocoon.el.impl.jexl.JexlExpression.evaluate() to find
out
against which OM instance the expression is evaluated and what it contains.

-- 
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/

Mime
View raw message