BAEL-3075 - PR reviews, removing Oracle jars, adding extra explanation/configuration to Oracle configurations
This commit is contained in:
parent
b2bc2dca8f
commit
5fc5e76929
@ -1,4 +1,3 @@
|
|||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
|
|
||||||
- [Using JDBI with Spring Boot](https://www.baeldung.com/spring-boot-jdbi)
|
- [Using JDBI with Spring Boot](https://www.baeldung.com/spring-boot-jdbi)
|
||||||
- [Oracle Connection Pooling With Spring](https://www.baeldung.com/oracle-connection-pooling-with-spring)
|
|
Binary file not shown.
@ -93,30 +93,6 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.oracle</groupId>
|
|
||||||
<artifactId>ojdbc8</artifactId>
|
|
||||||
<version>12.2.0.1</version>
|
|
||||||
<scope>system</scope>
|
|
||||||
<systemPath>${basedir}/lib/ojdbc8.jar</systemPath>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.oracle</groupId>
|
|
||||||
<artifactId>ucp</artifactId>
|
|
||||||
<version>12.2.0.1</version>
|
|
||||||
<scope>system</scope>
|
|
||||||
<systemPath>${basedir}/lib/ucp.jar</systemPath>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.oracle</groupId>
|
|
||||||
<artifactId>ons</artifactId>
|
|
||||||
<version>12.2.0.1</version>
|
|
||||||
<scope>system</scope>
|
|
||||||
<systemPath>${basedir}/lib/ons.jar</systemPath>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mchange</groupId>
|
<groupId>com.mchange</groupId>
|
||||||
<artifactId>c3p0</artifactId>
|
<artifactId>c3p0</artifactId>
|
||||||
@ -141,6 +117,23 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<!-- Please note that ojdbc8.jar, ucp.jar and ons.jar dependencies
|
||||||
|
are needed for OracleConfiguration.java, OracleUCPConfiguration.java, SpringOraclePoolingApplicationOracleLiveTest.java
|
||||||
|
and SpringOraclePoolingApplicationOracleUCPLiveTest.java -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<exclude>com/baeldung/spring/oracle/pooling/configuration/OracleConfiguration.java</exclude>
|
||||||
|
<exclude>com/baeldung/spring/oracle/pooling/configuration/OracleUCPConfiguration.java</exclude>
|
||||||
|
</excludes>
|
||||||
|
<testExcludes>
|
||||||
|
<testExclude>com/baeldung/spring/oracle/pooling/SpringOraclePoolingApplicationOracleLiveTest.java</testExclude>
|
||||||
|
<testExclude>com/baeldung/spring/oracle/pooling/SpringOraclePoolingApplicationOracleUCPLiveTest.java</testExclude>
|
||||||
|
</testExcludes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
@ -22,6 +22,8 @@ public class OracleConfiguration {
|
|||||||
dataSource.setURL("jdbc:oracle:thin:@//localhost:11521/ORCLPDB1");
|
dataSource.setURL("jdbc:oracle:thin:@//localhost:11521/ORCLPDB1");
|
||||||
dataSource.setFastConnectionFailoverEnabled(true);
|
dataSource.setFastConnectionFailoverEnabled(true);
|
||||||
dataSource.setImplicitCachingEnabled(true);
|
dataSource.setImplicitCachingEnabled(true);
|
||||||
|
// Only with clients prior to v11.2
|
||||||
|
// dataSource.setConnectionCachingEnabled(true);
|
||||||
return dataSource;
|
return dataSource;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,10 @@ public class OracleUCPConfiguration {
|
|||||||
dataSource.setPassword("books");
|
dataSource.setPassword("books");
|
||||||
dataSource.setConnectionFactoryClassName("oracle.jdbc.pool.OracleDataSource");
|
dataSource.setConnectionFactoryClassName("oracle.jdbc.pool.OracleDataSource");
|
||||||
dataSource.setURL("jdbc:oracle:thin:@//localhost:11521/ORCLPDB1");
|
dataSource.setURL("jdbc:oracle:thin:@//localhost:11521/ORCLPDB1");
|
||||||
|
|
||||||
dataSource.setFastConnectionFailoverEnabled(true);
|
dataSource.setFastConnectionFailoverEnabled(true);
|
||||||
dataSource.setInitialPoolSize(5);
|
dataSource.setInitialPoolSize(5);
|
||||||
|
dataSource.setMinPoolSize(5);
|
||||||
dataSource.setMaxPoolSize(10);
|
dataSource.setMaxPoolSize(10);
|
||||||
return dataSource;
|
return dataSource;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user