cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: Why is FlowInterpreter SingleThreaded?
Date Mon, 20 Oct 2003 18:57:31 GMT
Torsten Curdt wrote:

>>> huh? do you mean there is exactly one interpreter for a specific 
>>> state accessable through the factory? please explain :) 
>>
>>
>>
>>
>> Let's explain it in (pseudo-)code:
>>
>> FlowNode.java:
>>
>> // the flow interpreter for this sitemap
>> private Interpreter interpreter;
>>
>> public void initialize() {
>>  IntepreterFactory factory =
>>    (InterpreterFactory)this.manager.lookup(InterpreterFactory.ROLE);
>>  // flowconfig is the <map:flow> element whose content (<map:script>)
>>  // is specific to the particular flow implementation
>>  this.interpreter = factory.createIntepreter(flowconfig);
>>  this.manager.release(factory);
>> }
>>
>>
>> The "interpreter" object contains the state (scripts + global scope) 
>> that belong to this sitemap.
>
>
> alright ...that's what I also understood in the first place :)
>
> ...but we would bypass the component manager here. The interpreter 
> would no longer need to be a component... or what do you have in mind? 


Oh, don't give me any hidden plan about this, as I have none ;-)

This is just the way some of the components work, one of the most famous 
examples being the SourceResolver that asks SourceFactories for Source 
objects.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Mime
View raw message