cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject CallFunctionNode problems in trunk
Date Fri, 12 May 2006 11:39:21 GMT

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.

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

	

	
		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

Mime
View raw message