avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Simons <leosim...@apache.org>
Subject Re: [A5] Activity Package
Date Sun, 16 Jun 2002 11:25:42 GMT
On Sat, 2002-06-15 at 17:27, Berin Loritsch wrote:
> This houses the Initializable, Startable, and Resumable interfaces.
> I'm pretty happy with it, but we should consider a couple of points:
> 1) are Initializable and Disposable separate concerns?  If so we should
>    split the interface.  If not, then we will leave it alone

I'm not sure (don't think we will be), so we should probably leave it as
in A4: there is not a real compelling reason to change.

> 2) We have determined that start() and stop() apply to the same concern
>    of an active component.  We should explicitly state that the
> Startable
>    interface is designed to let an active component know when they can
>    start background execution threads and when to stop them safely.

Is it always necessary to have a stop()?

>    We should also state as a contract that stop()ing a component
>    MUST NOT FAIL!  This preculdes the necessity of an exception at this
>    point.  It also makes it the responsibility of the component to clean
>    up any expensive resources like threads and sockets successfully.
>    - The container has no way of nowing what system resources a
> component
>      takes if they are not retrieved from other components.

Yup. But what if it *does* fail? I like the suggestion of having the
exception, but then making the result of throwing that exception
"undefined behaviour" -- if the component that throws the exception
calls some code that does something that MUST NOT FAIL, but it still
does, it is probably okay to throw an exception. Note that all container
behaviour is currently undefined.

- Leo Simons

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

View raw message