Skip to content

Commit b924d11

Browse files
committed
Created new connection pool with simplified configuration and the ability
to keep cloud service connections alive when idle
1 parent f308580 commit b924d11

27 files changed

+1669
-201
lines changed

.classpath

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
4+
<attributes>
5+
<attribute name="module" value="true"/>
6+
</attributes>
7+
</classpathentry>
48
<classpathentry kind="src" path="driver/src/main/java"/>
59
<classpathentry kind="src" path="driver/src/test/java"/>
610
<classpathentry kind="src" path="examples/src/main/java"/>
711
<classpathentry kind="lib" path="driver/target/nosqldriver.jar"/>
812
<classpathentry kind="lib" path="examples/target/nosql-java-sdk-examples.jar"/>
13+
<classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.12.4/jackson-core-2.12.4.jar"/> <classpathentry kind="var" path="M2_REPO/io/netty/netty-buffer/4.1.74.Final/netty-buffer-4.1.74.Final.jar"/>
14+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-codec/4.1.74.Final/netty-codec-4.1.74.Final.jar"/>
15+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-codec-http/4.1.74.Final/netty-codec-http-4.1.74.Final.jar"/>
16+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-common/4.1.74.Final/netty-common-4.1.74.Final.jar"/>
17+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-handler/4.1.74.Final/netty-handler-4.1.74.Final.jar"/>
18+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-handler-proxy/4.1.74.Final/netty-handler-proxy-4.1.74.Final.jar"/>
19+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-transport/4.1.74.Final/netty-transport-4.1.74.Final.jar"/>
20+
<classpathentry kind="var" path="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.68/bcprov-jdk15on-1.68.jar"/>
21+
<classpathentry kind="var" path="M2_REPO/org/bouncycastle/bcpkix-jdk15on/1.68/bcpkix-jdk15on-1.68.jar"/>
22+
<classpathentry kind="var" path="M2_REPO/junit/junit/4.11/junit-4.11.jar"/>
23+
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"/>
924
<classpathentry kind="output" path="driver/target/classes"/>
10-
<classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.11.2/jackson-core-2.11.2.jar"/>
11-
<classpathentry kind="var" path="M2_REPO/io/netty/netty-all/4.1.45.Final/netty-all-4.1.45.Final.jar"/>
12-
<classpathentry kind="var" path="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.66/bcprov-jdk15on-1.66.jar"/>
13-
<classpathentry kind="var" path="M2_REPO/org/bouncycastle/bcpkix-jdk15on/1.66/bcpkix-jdk15on-1.66.jar"/>
14-
<classpathentry kind="var" path="M2_REPO/junit/junit/4.11/junit-4.11.jar"/>
15-
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"/>
1625
</classpath>

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,21 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
55
## [Unpublished]
66

77
### Added
8+
- new methods in NoSQLHandleConfig to control keeping a minimum number of connections alive in the connection pool
9+
- get/setConnectionPoolMinSize
810
- Added new methods in NoSQLHandleConfig to control the SSL handshake timeout,
911
default 3000 milliseconds.
1012
- get/setSslHandshakeTimeout
1113

14+
### Deprecated
15+
- several methods in NoSQLHandleConfig are deprecated as they have no effect on the new connection pool implementation. The methods remain, temporarily, but they do not control the pool
16+
- get/setConnectionPoolSize
17+
- get/setPoolMaxPending
18+
19+
### Changed
20+
- there is a new connection pool implementation to simplify management of connections by reducing the need for configuration. The new pool will create new connections on demand, with no maximum. It will also remove them to the configured minimum (default 0) after a period of inactivity
21+
- the new connection pool will send periodic keep-alive style HTTP requests to maintain activity level. These requests are only sent if a minimum size is configured using NoSQLHandleConfig.setConnectionPoolMinSize. This mechanism is mostly useful in the cloud service because the server side will close idle connections. Creating new connections requires a new SSL handshake and can add latency to requests after idle time.
22+
1223
### Fixed
1324
- Cloud only: Fixed an issue that a request may have unexpected latency when
1425
authenticated with instance/resource principal due to security token refresh.

driver/.classpath

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
33
<classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
4+
<classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
45
<classpathentry kind="src" path="src/main/java" including="**/*.java"/>
56
<classpathentry kind="output" path="target/classes"/>
67
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
7-
<classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.12.1/jackson-core-2.12.1.jar"/>
8-
<classpathentry kind="var" path="M2_REPO/io/netty/netty-buffer/4.1.71.Final/netty-buffer-4.1.71.Final.jar"/>
9-
<classpathentry kind="var" path="M2_REPO/io/netty/netty-common/4.1.71.Final/netty-common-4.1.71.Final.jar"/>
10-
<classpathentry kind="var" path="M2_REPO/io/netty/netty-codec-http/4.1.71.Final/netty-codec-http-4.1.71.Final.jar"/>
11-
<classpathentry kind="var" path="M2_REPO/io/netty/netty-transport/4.1.71.Final/netty-transport-4.1.71.Final.jar"/>
12-
<classpathentry kind="var" path="M2_REPO/io/netty/netty-resolver/4.1.71.Final/netty-resolver-4.1.71.Final.jar"/>
13-
<classpathentry kind="var" path="M2_REPO/io/netty/netty-codec/4.1.71.Final/netty-codec-4.1.71.Final.jar"/>
14-
<classpathentry kind="var" path="M2_REPO/io/netty/netty-handler/4.1.71.Final/netty-handler-4.1.71.Final.jar"/>
15-
<classpathentry kind="var" path="M2_REPO/io/netty/netty-handler-proxy/4.1.71.Final/netty-handler-proxy-4.1.71.Final.jar"/>
16-
<classpathentry kind="var" path="M2_REPO/io/netty/netty-codec-socks/4.1.71.Final/netty-codec-socks-4.1.71.Final.jar"/>
8+
<classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.12.4/jackson-core-2.12.4.jar"/>
9+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-buffer/4.1.74.Final/netty-buffer-4.1.74.Final.jar"/>
10+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-common/4.1.74.Final/netty-common-4.1.74.Final.jar"/>
11+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-codec-http/4.1.74.Final/netty-codec-http-4.1.74.Final.jar"/>
12+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-transport/4.1.74.Final/netty-transport-4.1.74.Final.jar"/>
13+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-resolver/4.1.74.Final/netty-resolver-4.1.74.Final.jar"/>
14+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-codec/4.1.74.Final/netty-codec-4.1.74.Final.jar"/>
15+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-handler/4.1.74.Final/netty-handler-4.1.74.Final.jar"/>
16+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-tcnative-classes/2.0.48.Final/netty-tcnative-classes-2.0.48.Final.jar"/>
17+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-handler-proxy/4.1.74.Final/netty-handler-proxy-4.1.74.Final.jar"/>
18+
<classpathentry kind="var" path="M2_REPO/io/netty/netty-codec-socks/4.1.74.Final/netty-codec-socks-4.1.74.Final.jar"/>
1719
<classpathentry kind="var" path="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.68/bcprov-jdk15on-1.68.jar"/>
1820
<classpathentry kind="var" path="M2_REPO/org/bouncycastle/bcpkix-jdk15on/1.68/bcpkix-jdk15on-1.68.jar"/>
1921
<classpathentry kind="var" path="M2_REPO/junit/junit/4.13.1/junit-4.13.1.jar"/>

driver/.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
33
<name>nosqldriver</name>
4-
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
4+
<comment>This project contains the SDK used for Oracle NoSQL Database. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
55
<projects/>
66
<buildSpec>
77
<buildCommand>

driver/.settings/org.eclipse.jdt.core.prefs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Mon Nov 02 16:24:58 EST 2020
1+
#Sat Feb 26 21:45:00 EST 2022
22
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
33
org.eclipse.jdt.core.compiler.source=1.8
44
eclipse.preferences.version=1

driver/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<groupId>com.oracle.nosql.sdk</groupId>
3131
<artifactId>nosqldriver</artifactId>
32-
<version>5.3.1</version>
32+
<version>5.3.2-SNAPSHOT</version>
3333
<packaging>jar</packaging>
3434

3535
<organization>
@@ -91,7 +91,7 @@
9191
ConfigFileTest.java, SignatureProviderTest.java,
9292
UserProfileProviderTest.java, InstancePrincipalsProviderTest.java,
9393
HandleConfigTest.java, JsonTest.java, ValueTest.java,
94-
OnPremiseTest.java
94+
OnPremiseTest.java, ConnectionPoolTest.java
9595
</excluded.tests>
9696
</properties>
9797
</profile>
@@ -108,7 +108,7 @@
108108
StoreAccessTokenProviderTest.java, ResourcePrincipalProviderTest.java,
109109
ConfigFileTest.java, SignatureProviderTest.java,
110110
UserProfileProviderTest.java, InstancePrincipalsProviderTest.java,
111-
HandleConfigTest.java, JsonTest.java, ValueTest.java
111+
HandleConfigTest.java, JsonTest.java, ValueTest.java, ConnectionPoolTest.java
112112
</excluded.tests>
113113
</properties>
114114
</profile>

0 commit comments

Comments
 (0)