The Smoking Gun
Learn what went wrong with CF, and how the unnoticed SQLException was the culprit that everyone ignored.
We'll cover the following...
What happened to CF
At this point, the postmortem analysis agreed with the symptoms from the outage itself: CF appeared to have caused both the IVR and kiosk check-in to hang. The biggest remaining question was still: “What happened to CF?”
Actually, at first glance, this method looks well constructed. Use of the try/finally
block indicates the author’s desire to clean up resources. In fact, this very cleanup block has appeared in some Java books on the market. Too bad it contains a fatal flaw.
Suppose the JDBC connection was created before the failover. The IP address used to create the connection will have moved from one host to another, but the current state of TCP connections will not carry over to the second database host. Any socket writes will eventually throw an IOException (after the operating system and network driver finally decide that the TCP connection ...