File tree Expand file tree Collapse file tree 2 files changed +28
-14
lines changed
src/main/java/org/utplsql/cli Expand file tree Collapse file tree 2 files changed +28
-14
lines changed Original file line number Diff line number Diff line change 22
22
<artifactId >java-api</artifactId >
23
23
<version >3.0.4</version >
24
24
<scope >compile</scope >
25
+ <exclusions >
26
+ <exclusion >
27
+ <groupId >com.oracle.jdbc</groupId >
28
+ <artifactId >ucp</artifactId >
29
+ </exclusion >
30
+ </exclusions >
25
31
</dependency >
26
32
<dependency >
27
33
<groupId >com.beust</groupId >
30
36
<scope >compile</scope >
31
37
</dependency >
32
38
<dependency >
33
- <groupId >junit</groupId >
34
- <artifactId >junit</artifactId >
35
- <version >4.12</version >
36
- <scope >test</scope >
39
+ <groupId >com.zaxxer</groupId >
40
+ <artifactId >HikariCP</artifactId >
41
+ <version >2.7.2</version >
42
+ <scope >compile</scope >
43
+ </dependency >
44
+ <dependency >
45
+ <groupId >org.slf4j</groupId >
46
+ <artifactId >slf4j-nop</artifactId >
47
+ <version >1.7.25</version >
48
+ <scope >compile</scope >
49
+ </dependency >
50
+ <dependency >
51
+ <groupId >junit</groupId >
52
+ <artifactId >junit</artifactId >
53
+ <version >4.12</version >
54
+ <scope >test</scope >
37
55
</dependency >
38
56
</dependencies >
39
57
Original file line number Diff line number Diff line change 1
1
package org .utplsql .cli ;
2
2
3
3
import com .beust .jcommander .IStringConverter ;
4
- import oracle .ucp .jdbc .PoolDataSource ;
5
- import oracle .ucp .jdbc .PoolDataSourceFactory ;
4
+ import com .zaxxer .hikari .HikariDataSource ;
6
5
7
6
import java .io .File ;
8
7
import java .sql .Connection ;
@@ -22,16 +21,13 @@ public class ConnectionInfo {
22
21
}
23
22
}
24
23
25
- private PoolDataSource pds = PoolDataSourceFactory . getPoolDataSource ();
24
+ private HikariDataSource pds = new HikariDataSource ();
26
25
27
26
public ConnectionInfo (String connectionInfo ) {
28
- try {
29
- this .pds .setConnectionFactoryClassName ("oracle.jdbc.pool.OracleDataSource" );
30
- this .pds .setURL ("jdbc:oracle:thin:" + connectionInfo );
31
- this .pds .setInitialPoolSize (2 );
32
- } catch (SQLException e ) {
33
- e .printStackTrace ();
34
- }
27
+
28
+ pds .setJdbcUrl ("jdbc:oracle:thin:" + connectionInfo );
29
+ pds .setAutoCommit (false );
30
+
35
31
}
36
32
37
33
public Connection getConnection () throws SQLException {
You can’t perform that action at this time.
0 commit comments