avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Hammant <Paul_Hamm...@yahoo.com>
Subject Re: Runnable - Avalon Framework Lifecycle interface?
Date Tue, 02 Apr 2002 12:47:43 GMT
Peter Donald wrote:

>On Tue, 2 Apr 2002 19:44, Paul Hammant wrote:
>
>>Folks,
>>
>>Is java.lang.Runnable a lifecycle interface?  Does it imply that the
>>implementing component should be placed in a Thread? :
>>
>>  if (comp instanceof Initializable) {
>>    ((Initializable comp).initialize() {
>>  }
>>
>>  if (comp instanceof Startable) {
>>    ((Startable comp).start() {
>>  }
>>
>>  if (comp instanceof Runnable) {
>>    Thread t = getThread((Runnable) comp);
>>    t.start();
>>  }
>>
>>I ask because EOB has daemon beans that treat Runnable as a lifecycle
>>interface.
>>
>
>It used to be but we zapped it because there was too many ambiguous cases. ie 
>if run() finishes does that mean should we shutdown component or just call 
>run again? if run() exceptions should we kill component or restart it or what 
>? If we call stop and run() does not return what do we do?
>
Yup, now Leo has pointed to the document I agree that it is too 
ambigous.  Leave as is ( I have some small rework to do in EOB - so far 
383 downloadsof latest release).

- Paul




--
To unsubscribe, e-mail:   <mailto:avalon-phoenix-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-phoenix-dev-help@jakarta.apache.org>


Mime
View raw message