On 22/10/2013 16:17, Mark Thomas wrote: > On 18/10/2013 22:09, Bob DeRemer wrote: >> Hi Guys, >> >> >> >> In our implementation, we have a gateway app that uses jsr websockets to >> communication with our main application server. In a small system, we >> want to run them both on a single Tomcat instance using the same Tomcat >> NIO connector, but directing to different respective WS paths. This >> works fine if you deploy the MAIN first, then the GW – so that MAIN is >> already up and running. If you restart Tomcat when both webapps are >> deployed – and the GW (client) starts first, it hangs indefinitely in >> the following code trying to establish a WS connection: >> >> >> >> Is this a bug or a known limitation when a client/server in the same >> webapp try to connect at startup? > > It certainly shouldn't hang indefinitely - I'll take a look.
I have fixed the indefinite hang. There is now a user configurable IO timeout the defaults to 5 seconds. If you enable parallel starting of containers (set startStopThreads on the host to more than 1) you might be able to work around this but I haven't tested it. To avoid random timing issues, you'll still need to handle the failure and retry after a short wait. Mark > > However, there is no guarantee made about application start order so > your code will need to handle failures and re-try after a suitable wait. > > Mark > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org