Skip to content
Snippets Groups Projects
Commit 57bee7e0 authored by Julien Lopez's avatar Julien Lopez
Browse files

- Removes useless DBDriverFactory and jar file

- Adds timeout to Oracle database connection
parent f67477bb
No related branches found
No related tags found
No related merge requests found
File deleted
......@@ -24,6 +24,7 @@ public class OracleDriver extends DBDriver {
ods.setUser(data.userName);
ods.setPassword(data.password);
ods.setURL(connString);
ods.setLoginTimeout(1000);
conn = ods.getConnection();
}
......
package qir.factory;
import java.sql.*;
import qir.driver.*;
import qir.driver.OracleDriver.ConnectionData;
/**
* WORK IN PROGRESS
*/
public class DBDriverFactory {
public static DBDriver createDBDriver(String dbName, String sessionId, String serverName, int port, String userName, String passwd) {
if (dbName.equalsIgnoreCase("Oracle"))
try {
return new OracleDriver(new ConnectionData(sessionId, serverName, port, userName, passwd));
} catch (SQLException e) {
e.printStackTrace();
}
throw new IllegalArgumentException("Error: \"" + dbName + "\" is not a valid database name.");
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment