简体   繁体   中英

Java MS SQL -> mySQL conversion

I have built a Java application that transfers data from a MSSQL db to a mySQL DB. The problem I have is that the MSSQL db constantly goes down and causes my application to throw exceptions because it can not connect to the server. Is there a way that I can tell my application to restart if it gets any error? I am running on Ubuntu 10.04 LTS.

You can't restart it, but depending on the application, you can simulate a restart.

If it is a console application, you can simply call the main(..) method again.

If it is a desktop application, you can hide the current JFrame and setVisible(true) a new JFrame

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