3 import java.sql.Connection;
4 import java.sql.Driver;
5 import java.sql.DriverManager;
6 import java.sql.DriverPropertyInfo;
7 import java.sql.SQLException;
8 import java.sql.SQLFeatureNotSupportedException;
9 import java.util.Properties;
10 import java.util.logging.Logger;
12 import org.opendaylight.controller.md.sal.dom.xsql.jdbc.JDBCConnection;
14 public class JDBCDriver implements Driver {
16 public static JDBCDriver drv = new JDBCDriver();
20 DriverManager.registerDriver(this);
21 } catch (SQLException e) {
22 // TODO Auto-generated catch block
28 public boolean acceptsURL(String arg0) throws SQLException {
33 public Connection connect(String url, Properties arg1) throws SQLException {
34 System.err.println("JDBC Connection");
36 if (url.equals("svr")) {
37 return new JDBCConnection(true);
39 return new JDBCConnection(url).getProxy();
41 } catch (Exception err) {
42 err.printStackTrace();
44 System.err.println("Error JDBC Connection");
49 public int getMajorVersion() {
54 public int getMinorVersion() {
59 public DriverPropertyInfo[] getPropertyInfo(String arg0, Properties arg1)
61 DriverPropertyInfo i = new DriverPropertyInfo("OpenDayLight", "OpenDayLight");
62 return new DriverPropertyInfo[] {i};
66 public boolean jdbcCompliant() {
71 public Logger getParentLogger() throws SQLFeatureNotSupportedException {
72 // TODO Auto-generated method stub