cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: CallFunctionNode problems in trunk
Date Fri, 12 May 2006 13:42:12 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I'm hunting that bug too ;-)

My observation until now is that:

a) SitemapLanguage#createNodeBuilder creates the CallNodeBuilder
b) it seems (during my debugging) there is only one CallNodeBuilder in
    the system (even though it is not marked ThreadSafe as other
    NodeBuilders)
c) in CallNodeBuilder#buildNode the member variable node will be
    overwritten each time that method is called (and it is called for
    each <map:call .../> element)

I don't know what a NodeBuilder should do in its buildNode method but I 
think there might be the problem. Later in the processings the linkNode 
method on the CallNodeBuilder gets called where the interpreter is set 
on the node. But because of c) only one instance gets the interpreter 
and if one of the other Nodes created gets processed in a pipeline we'll 
have a NPE.

Hope that helps other bug hunters a bid as I don't now how to 
proceed ATM (is there a problem with non ThreadSave components?)

Giacomo

On Fri, 12 May 2006, Reinhard Poetz wrote:

> Date: Fri, 12 May 2006 13:39:21 +0200
> From: Reinhard Poetz <reinhard@apache.org>
> Reply-To: dev@cocoon.apache.org
> To: dev@cocoon.apache.org
> Subject: CallFunctionNode problems in trunk
> 
>
> I'm not sure if I'm on the right track. What I found so far is that if a node 
> is a LinkedProcessingNodeBuilder its linkNode() method is called. When the 
> tree processor is set up, a node builder is registered for this step by 
> adding it to the linkedBuilders collection:
>
>     public ProcessingNodeBuilder createNodeBuilder
>         (Configuration config) throws Exception {
>
>         // FIXME : check namespace
>         String nodeName = config.getName();
>
>         if (getLogger().isDebugEnabled()) {
>             getLogger().debug("Creating node builder for " + nodeName);
>         }
>
>         ProcessingNodeBuilder builder;
>         try {
>             builder = (ProcessingNodeBuilder)
>         this.itsBuilders.select(nodeName);
>         } catch (ServiceException ce) {
>             // Is it because this element is unknown ?
>             if (this.itsBuilders.isSelectable(nodeName)) {
>                 // No : rethrow
>                 throw ce;
>             }
>             // Throw a more meaningful exception
>             String msg = ...
>             throw new ConfigurationException(msg);
>         }
>
>        builder.setBuilder(this);
>
>         if (builder instanceof LinkedProcessingNodeBuilder) {
>             this.linkedBuilders.add(builder);
>         }
>
>         return builder;
>     }
>
>
> IIUC this.itsBuilders.select(...) always returns the same instance of the 
> CallNodeBuilder object. As the CallNodeBuilder has state (node --> a 
> CallFunctionNode object), the linkNode() method always operates on the same 
> object.
>
>

- -- 
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEZJC7LNdJvZjjVZARApglAKDVtPNA0BfWHhl8jN+Oynp/rzVmBwCgrVMn
DSfXZODVpjM71M6Lwxb3+iU=
=Y1Wj
-----END PGP SIGNATURE-----

Mime
View raw message