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:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



Reply via email to