[quoted text, click to view] jabailo@texeme.com wrote:
>
> Thanks Peter. I am using the config file as well -- it seems far more
> flexible so I agree -- I am just wondering if the code method provides any
> additional configurability such as reconnect/retry attempts, or if I would
> have to write that code myself regardless of what method I use...
>
Hi John,
I think you've had a far better answer to your connection(less) question
than I could ever give you, so I'll concentrate on this one - which
seems to be at the root of your problem.
I'm not sure I entirely understand what you're getting at, but let's try
for an answer anyway.
If you try to connect to a server that is not responding, you will get
an Exception back saying that the server is, "Actively refusing
connections". You could trap that, I suppose. However, I'm surprised
that you have such an unreliable connection. It is possible, I guess,
that a service could fail to start after a server reboot, for example -
but where I work, at least, we always check for that sort of thing after
every reboot.
If you were really concerned about outages in mission-critical
situations you would presumably have failover strategies and the like
such that a request would be diverted to a different server. Of course
if your servers are not exact replicas of each other, then you might
lose some state. I always make sure that my applications check the
consistency of their internal states at every significant move - and
send messages back to users about how to recover if there's a problem.
But mainly I try very hard to keep things stateless. I only use CAOs
when I absolutely must - which is once, so far.
Why do you consider it a problem worth worrying about, John? Do you
have a specific scenario in mind?
Cheers