cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: pipelineComponent scope troubles
Date Wed, 19 Sep 2007 10:21:16 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Grzegorz Kossakowski wrote:
> 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

No, status is not put on OM!

> check it by putting breakpoint on org.apache.cocoon.components.flow.FlowHelper.setContextObject().

Inteersting that now that I have set additional beakpoint I go more calles to the put method:

OM ObjId=68 key="java"
OM ObjId=68 key="cocoon"
OM ObjId=68 key="Packages"
OM ObjId=68 key="sitemap"
OM ObjId=68 key="namespace"

But control never reaches 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.

The OM passed to the evaluate method is a Proxy. Don't know where to look at. Found a targetSource
with targetBeanName of "scopedTarget.org.apache.cocoon.el.objectmodel.ObjectModel"

- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.6 (GNU/Linux)

iD8DBQFG8PgbLNdJvZjjVZARAmd+AKCYiHa1IctFXyB73v49GxUuasPeDQCfdpyP
tBaVZ9JrD2z+fkxoq0YbH1A=
=DIWG
-----END PGP SIGNATURE-----

Mime
View raw message