This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
It's quite possible that method c() throws an exception and close the connection which may cause by many problems including db server is down or network has been dropped. You may need to handle this type of exception in mehod b().