Broken Pipe - Transaction
by, 10-31-2011 at 05:51 PM (1236 Views)
I assume that you are having a J2EE environment with connection pool and you are using hibernate.
When you use transactions, you have to explicitly commit or rollback every time. Some programmers believe that queries do not have to be committed. This is not right in my opinion. If you do not commit, the connection is left assigned. Which means we have dangling connections that later will be killed by the database server like: MySQL. Connection pool would later attempt to reattach to the dangling connection and you will get java.net.SocketException Broken Pipe exception.
I know many programmers who spent many days finding this reason. Do comment if you want to add something to this.