cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From defe <d...@free.fr>
Subject Re: Singleton component
Date Sat, 17 Jul 2004 18:44:22 GMT
Glen Ezkovich wrote:

>
> On Jul 17, 2004, at 12:16 PM, defe wrote:
>
>> Glen Ezkovich wrote:
>>
>>>
>>> On Jul 17, 2004, at 10:17 AM, Glen Ezkovich wrote:
>>>
>>>>
>>>> On Jul 17, 2004, at 3:30 AM, defe wrote:
>>>>
>>>>> Glen Ezkovich wrote:
>>>>>
>>>>>> I have a component that I would like to be a singleton. What do I

>>>>>> need
>>>>>> to do to insure that it is recognized as such?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> implement the marker interface 
>>>>> org.apache.avalon.framework.thread.ThreadSafe
>>>>
>>>>
>>>>
>>>> How do I declare it in cocoon.xconf?
>>>
>>>
>>> To be more precise do I declare it as a component or a 
>>> component-instance? I'm a little unclear concerning the difference.
>>
>>
>> what kind of component is it?  A sitemap component (action, 
>> generator, transformer, etc) or something else ?
>
>
> 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 :)

regards




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message