Jay Walters wrote:
> Rickard, I'll take this for what it means and not feel bad for the rest of
> your response...
>
> You've made my finer points of return codes vs exceptions moot by moving to
> a better design. I was nitpicking on something down near the bottom of the
> pile. I'll try to keep to the top in the future since we are all good java
> programmers...
It's just way more fun at the top :-)
> I think instead of the previously put forth idea for a service which is
> trying to start, to poll the services it is dependent on (how I understood
> it), you are now advocating a service controller which knows all the
> dependencies and starts each service when the services it is dependent on
> are all available. Sort of point-to-point vs hub and spoke. Your approach
> is cleaner - most of the logic goes into the service controller vs
> distributing it in little bits in the various services - e.g. coding into
> the Container service how to handle the Logger service being unavailable
> when the Container service is trying to start. The actual services need
> only receive start and stop messages and generate an "I'm going to stop"
> message for the service controller before they stop.
That is precisely correct.
The services themselves will be very simple, but the server will behave
very sophisticated because of the flow of start/stop being almost
"alive". I can tell you it was an interesting gut feeling every time I
started my old XS server which did this.. since the state of each
service was also mirrored in a GUI I could see the flow of services
coming online as little checkboxes suddenly became "checked". And the
other way round when some arbitrary checkbox were later flipped
manually; all the dependent services would automatically turn themselves
off instantly.. :-)
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com