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?
--
Cheers,
Pete
---------------------------------------------------
"Marriage, Friends, Religon -- these are the demons
you must slay in order to suceed in business.."
-- Mr. Burns, The Simpsons
---------------------------------------------------
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>