Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ install:

script:
- mvn package -DskipTests
- mvn package appassembler:assemble
- mvn package jar:jar appassembler:assemble

before_deploy:
- bash .travis/create_release.sh
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ You can also download all development versions from [Bintray](https://bintray.co
* When using reporters for Sonar or Coveralls client needs to be invoked from project's root directory.
* Due to Oracle license we can't ship the necessary oracle libraries directly with utPLSQL-cli. <b>Please download the libraries directly from oracle website and put the jars into the "lib" folder of your utPLSQL-cli installation</b>
* Oracle `ojdbc8` driver
* Oracle `ucp` library
* If you are on a 11g database with non0standard NLS settings, you will also need the `orai18n` library.
* If you are on a 11g database with non standard NLS settings, you will also need the `orai18n` library.
* All of the above can be downloaded from [Oracle download site](http://www.oracle.com/technetwork/database/features/jdbc/jdbc-ucp-122-3110062.html)

## Compatibility
The latest CLI is always compatible with all database frameworks of the same major version.
For example CLI-3.0.4 is compatible with database framework 3.0.0-3.0.4 but not with database framework 2.x.
The latest CLI is always compatible with all database frameworks of the same minor version.
For example CLI-3.0.4 is compatible with database framework 3.0.0-3.0.4 but not with database framework 2.x and 3.1.x.

## Usage

Expand Down
26 changes: 22 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
<artifactId>java-api</artifactId>
<version>3.0.4</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>com.oracle.jdbc</groupId>
<artifactId>ucp</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.beust</groupId>
Expand All @@ -30,10 +36,22 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>2.7.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.7.25</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down
16 changes: 6 additions & 10 deletions src/main/java/org/utplsql/cli/ConnectionInfo.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package org.utplsql.cli;

import com.beust.jcommander.IStringConverter;
import oracle.ucp.jdbc.PoolDataSource;
import oracle.ucp.jdbc.PoolDataSourceFactory;
import com.zaxxer.hikari.HikariDataSource;

import java.io.File;
import java.sql.Connection;
Expand All @@ -22,16 +21,13 @@ public class ConnectionInfo {
}
}

private PoolDataSource pds = PoolDataSourceFactory.getPoolDataSource();
private HikariDataSource pds = new HikariDataSource();

public ConnectionInfo(String connectionInfo) {
try {
this.pds.setConnectionFactoryClassName("oracle.jdbc.pool.OracleDataSource");
this.pds.setURL("jdbc:oracle:thin:" + connectionInfo);
this.pds.setInitialPoolSize(2);
} catch (SQLException e) {
e.printStackTrace();
}

pds.setJdbcUrl("jdbc:oracle:thin:" + connectionInfo);
pds.setAutoCommit(false);

}

public Connection getConnection() throws SQLException {
Expand Down