简体   繁体   中英

java.net.SocketException: Broken pipe For MSSQL DB

I'm suffering from

java.net.SocketException: Broken pipe Exception

after I disconnect the network (by removing the network cable) and plug the network cable back in. This error occurs for MSSQL DB and connect using JTurbo driver. I want to auto-reconnect after a connection is established. How can I fix this?

No you don't. You have a network failure, ie a failure in a distributed system, which can therefore be a partial failure. You don't know whether the transaction has completed or not. You can't hide that under the covers of an auto-retry. The application needs to know about it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM