avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject Re: Startable doesn't has a isRunning() interface ?
Date Wed, 08 Oct 2003 18:50:42 GMT


Jonathan Hawkes wrote:

>I would say it's the responsibility of the component to act as a container
>for any threads it starts up.  
>

I'm ok with the notion of a container creating threads do its own stuff 
- but this is not exactly the same thing as a component starting up a 
thread to do its prime objective.  The thing is that seems to me to be a 
conflict between the responsibilities of a container to assure service 
availablity, and the reopsibility of the component to implement the 
service.  Under the current Startable model, the container has no way of 
assuring service availablity.  I.e. under the current interfaces its the 
component to container communication between startup and shutdown that 
remains undefined. 

Stephen.


>Just because a component implements Startable
>does not necessarily mean that it is going to allocate its own threads.
>(Granted, that will be the case 99.9% of the time.)
>
>----- Original Message ----- 
>From: "Stephen McConnell" <mcconnell@apache.org>
>To: "Avalon Developers List" <dev@avalon.apache.org>
>Sent: Wednesday, October 08, 2003 10:53 AM
>Subject: Re: Startable doesn't has a isRunning() interface ?
>
>
>  
>
>>Jonathan Hawkes wrote:
>>
>>    
>>
>>>Yes.  An isRunning() method would not be useful to the container.  The
>>>container knows whether the startable isRunning or not (ie: it has called
>>>start() and not stop() ).
>>>
>>>      
>>>
>>Yeeees .. but!
>>
>>Consdider the component in question has been started. The component gets
>>everything it needs from the container and goes about its business and in
>>the case of a startable component this typically means that the component
>>is creating its own thread of execution.  Assuming that something goes
>>wrong - there is not contractual interface through which the component
>>can notify the container that it's execution thread has terminated.
>>
>>I think the real underlying issue here is component/container
>>responsibility. Who should be creating and supervising/monitoring the
>>thread - the component or the container?
>>
>>Stephen.
>>
>>    
>>
>>>----- Original Message ----- 
>>>From: "Yannick Menager" <ymenager_ml@fastmail.fm>
>>>To: <dev@avalon.apache.org>
>>>Sent: Wednesday, October 08, 2003 10:17 AM
>>>Subject: Startable doesn't has a isRunning() interface ?
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>Is there any reason Startable doesn't has a isRunning() ( or something
>>>>like that ) interface ?
>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>>>>For additional commands, e-mail: dev-help@avalon.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>>>For additional commands, e-mail: dev-help@avalon.apache.org
>>>
>>>
>>>
>>>
>>>      
>>>
>>-- 
>>
>>Stephen J. McConnell
>>mailto:mcconnell@apache.org
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>>For additional commands, e-mail: dev-help@avalon.apache.org
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>For additional commands, e-mail: dev-help@avalon.apache.org
>
>
>  
>

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message