The thing is, I'm using the failover behaviour in Apache Synapse (Enterprise 
Service Bus). I can give Synapse a list of web service endpoints that have the 
same interface. One is the primary service endpoint and the others are the 
backups in case the primary endpoint become unavailable for some reason. 
Actually there are only 2 general reasons: the (application) server that 
provides the services is not running, so the port (lets say port 80) is closed. 
Or the second case: the application server is still running, but the service is 
made inactive. That means the application server still listens at port 80 but 
can't serve request to the mentioned service and answers with the "404 The 
requested resource XYZ is not available" response.
Now the problem: Synapse gets this http-404 response, eventhough it can't find 
the SOAP envelop it expects it doesn't see the endpoint as faulty and forwards 
the 404 message to the caller (web service consumer). The fail-over mechanism 
doesn't kick in.... :( But actually it should because the service is not 
available anymore, so the request should be send to the backup endpoints.
Ofcourse I tried to make Synapse understand that a 404-response should be 
treated the same as a failure. But it can't easily be done. So I thought I 
could make Tomcat to receive calls to inactive services, but just drop them 
without answering. After some time... synapse will trigger timeout and tries to 
call the backup endpoints.
It doesn't matter if the http/tcp connection has been established or not.



> -----Original Message-----
> From: Len Popp [mailto:len.p...@gmail.com]
> Sent: Tuesday, March 16, 2010 1:50 AM
> To: Tomcat Users List
> Subject: Re: How to surpress The requested resource XYZ is not
> available - response
> 
> I don't think you can do that. After Tomcat accepts the HTTP
> connection and decides whether to respond, it's too late to pretend
> there's no server there. The user's web browser displays a different
> error message for no server (something like "can't establish a
> connection") vs. server timeout (something like "the server took too
> long to respond") or dropping the connection ("the connection was
> reset").
> 
> So you might as well just customize the 404 error page to say "There's
> no server here" - it'd fool people just as well. :-)  Or just return
> an empty error page.
> --
> Len
> 
> 
> 
> On Mon, Mar 15, 2010 at 19:26, Song Thuy Nguyen <programm...@biaqua.de>
> wrote:
> > Hello,
> >
> >
> >
> > usually you will get a "The requested resource /XYZ is not available"
> response when you call an
> > unavailable web service on Apache Tomcat. However, for a special use
> case I don't want Tomcat to
> > answer to  requests for a unknown/unavailable web service. I just
> want Tomcat to ignore it and "keep
> > quiet", resulting that the caller will get a timeout and therefore
> knows that there is no service behind
> > this URL. How can I achieve such behaviour?
> >
> >
> >
> > Best Regards,
> >
> >
> >
> >
> >
> > Song Thuy Nguyen
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to