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 2222 <artifactId >java-api</artifactId >
2323 <version >3.0.4</version >
2424 <scope >compile</scope >
25+ <exclusions >
26+ <exclusion >
27+ <groupId >com.oracle.jdbc</groupId >
28+ <artifactId >ucp</artifactId >
29+ </exclusion >
30+ </exclusions >
2531 </dependency >
2632 <dependency >
2733 <groupId >com.beust</groupId >
3036 <scope >compile</scope >
3137 </dependency >
3238 <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 >
3755 </dependency >
3856 </dependencies >
3957
Original file line number Diff line number Diff line change 11package org .utplsql .cli ;
22
33import com .beust .jcommander .IStringConverter ;
4- import oracle .ucp .jdbc .PoolDataSource ;
5- import oracle .ucp .jdbc .PoolDataSourceFactory ;
4+ import com .zaxxer .hikari .HikariDataSource ;
65
76import java .io .File ;
87import java .sql .Connection ;
@@ -22,16 +21,13 @@ public class ConnectionInfo {
2221 }
2322 }
2423
25- private PoolDataSource pds = PoolDataSourceFactory . getPoolDataSource ();
24+ private HikariDataSource pds = new HikariDataSource ();
2625
2726 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+
3531 }
3632
3733 public Connection getConnection () throws SQLException {
You can’t perform that action at this time.
0 commit comments