�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
Since I don't see any real compelling reason for one or the other, I
would maintain current stuff.
> 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.
I disagree.
As I have already written, starting something doesn't mean that I need
to stop it. It could just stop by itself. In fact the stop() method of
threads has been deprecated long time ago!
The name start() implies nothing about thread stuff.
- start()=go()!=startAThread()
I don't see real problems in the current version anyway, and am happy to
use it as it is.
Read my previous mails on this.
> We should also state as a contract that stop()ing a component
> MUST NOT FAIL!
We all would see never failing code! ;-P
> 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.
This is correct, but not throwing a RuntimeException is not the
solution; of course throwing it is not a solution either (as you
correctly point out).
I think (as I think you also want) that we should just:
1. never throw *any* exception on methods that should never fail
2. make methods that could fail throw exceptions and not runtime ones
So this case would go with 1.
+1 for it :-)
--
Nicola Ken Barozzi [EMAIL PROTECTED]
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>