我正在使用Apache Derby DB,我想重新连接它。程序运行时,我想断开与数据库的连接,并重新连接从备份恢复数据库的参数。像这样:
Connection connection;
connection = DriverManager.getConnection( "jdbc:derby:myDb" ); //connection to the Database with the data from 2017-04-05
connection.close();
connection = DriverManager.getConnection( "jdbc:derby:myDb;restoreFrom=/backup/2017-04-04/myDb" )
运行之后我仍然看到来自2017-04-05的数据,而不是来自2017-04-04。有没有办法达到预期的行为?