-
Notifications
You must be signed in to change notification settings - Fork 4
/
MySqlConnection.java
62 lines (50 loc) · 1.73 KB
/
MySqlConnection.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
* 4DFLib
* Copyright (c) 2015-2016 Brian Gormanly
* 4dflib.com
*
* 4DFLib is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 3 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.fdflib.persistence.database;
import com.fdflib.persistence.queries.JdbcConnection;
import com.fdflib.util.FdfSettings;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.activation.DataSource;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
/**
* Created by brian.gormanly on 5/18/15.
*/
public class MySqlConnection extends JdbcConnection {
private static final MySqlConnection INSTANCE = new MySqlConnection();
static Logger fdfLog = LoggerFactory.getLogger(MySqlConnection.class);
private MySqlConnection() {
}
public static MySqlConnection getInstance() {
return INSTANCE;
}
@Override
public Connection get4dfDbConnection() throws SQLException {
return super.get4dfDbConnection();
}
@Override
public Connection get4dfDbRootConnection() throws SQLException {
return super.get4dfDbRootConnection();
}
@Override
public void close4dfDbSession(Connection connection) throws SQLException {
super.close4dfDbSession(connection);
}
}