Hmm, no. I agree with Vadim. If you use a boolean you're gonna have to
spread the checks around every time you need a service. With an exception
you can get the whole code inside a nice try - catch block, no matter how
many times you need to call a service.
-- Juha
At 15:24 30.8.2000 -0400, you wrote:
>But service not available is a normal and expected condition (at least the
>way it works right now with the Minerva pools) not an exceptional condition,
>so it'd be better design to use a boolean.
>
>-----Original Message-----
>From: Vadim Tkachenko [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 30, 2000 3:22 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [jBoss-Dev] JMX Status?
>
>
>According to marc fleury:
>
>> At the same time I would see for a nice service where you provide a set of
>> services that are needed for a particular configuration. You would be
>> notified immediately through a boolean return that all the services you
>> requested are already on line.
>
>Based on experience, I'd suggest that a better way would be to return
>nothing in case of success, and throw something like
>ServiceNotAvailableException in case of failure. This simplifies handling -
>you eventually get bored of checking the booleans, and the code without
>such checking is cleaner.
>
>> marc
>
>--vt
>
>