cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <>
Subject Re: Singleton component
Date Sat, 17 Jul 2004 21:06:40 GMT
At 7/17/2004  11:44 AM, you wrote:

>>Something else. Basically, it's a workflow manager. Once a job is 
>>submitted a sequence of events need to occur before the job is accepted 
>>and completed. The sequence of events may complete in seconds or they may 
>>take several days to complete. Most of the time, they will complete in 
>>seconds. Rather then read the job from the database and create a new 
>>instance of the job several times in this short span they are stored in a 
>>Map. The component needs access to a SourceResolver and several 
>>DataSources. It needs to be available to several Poolable components.
>i'm unclear about <component> and <component-instance> too :)
>The most meaningful difference i noticed is the declaration of the 'role', 
>that would help you to lookup
>your component instance from the component/service manager.
>so, i'm waiting an explanation too :)

<component> and <component-instance> are avalon constructs.  Basically, a 
component is something you would look up using the ServiceManager via its 
role.  Sometimes the component represents a collection of objects which are 
all of the same type, such as input modules, source resolvers, etc.  In 
this case, the component is something that just manages the collection, 
like ExtendedComponentSelector.  If you look at the code that access a 
component-instance you will see that it looks for a role name with the word 
"Selector" appended to it. Then the selector will be called with the key to 
the desired instance (i.e - the specific input module, etc.).

If you take a look at cocoon.roles you will notice that these are really 
just short-hand ways of specifying a component.  For example, in 
cocoon.roles there is a definition for source-factories that names 
ExtendedSourceFactorySelector as its implementing class and with a name of 
org.apache.excalibur.source.SourceFactorySelector.  This means that in 
cocoon.xconf, instead of declaring


we can just put


Hope this clears it up a little bit. 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message