Skip to content

Commit bd5e515

Browse files
committed
Use the value set in oracledb.connectionClass as soon as the pool is created with DRCP
1 parent fb508f9 commit bd5e515

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

doc/src/release_notes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ node-oracledb Release Notes
88
node-oracledb `v6.0.3 <https://github.com/oracle/node-oracledb/compare/v6.0.2...v6.0.3>`__ (TBD)
99
------------------------------------------------------------------------------------------------
1010

11+
Common Changes
12+
++++++++++++++
13+
14+
#) Fixed bug to consistently use the DRCP :attr:`oracledb.connectionClass` in effect when the
15+
pool was created.
16+
1117
Thin Mode Changes
1218
+++++++++++++++++
1319

lib/pool.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class Pool extends EventEmitter {
4747
this._timeOfReset = this._createdDate = Date.now();
4848
this._sessionCallback = undefined;
4949
this._connRequestQueue = [];
50+
this._connectionClass = settings.connectionClass;
5051
}
5152

5253
//---------------------------------------------------------------------------
@@ -376,7 +377,9 @@ class Pool extends EventEmitter {
376377
errors.assertParamValue(nodbUtil.isObject(a1), 1);
377378
options = this._verifyGetConnectionOptions(a1);
378379
}
379-
settings.addToOptions(options, "connectionClass");
380+
381+
// get connection class value from pool
382+
options.connectionClass = this._connectionClass;
380383

381384
// if pool is draining/closed, throw an appropriate error
382385
this._checkPoolOpen(true);

lib/thin/pool.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,6 @@ class ThinPoolImpl extends PoolImpl {
212212
// create new connection and return it
213213
//---------------------------------------------------------------------------
214214
async getConnection() {
215-
if (settings.connectionClass !== '') {
216-
this._userConfig.connectionClass = settings.connectionClass;
217-
}
218215
return await this.acquire();
219216
}
220217

0 commit comments

Comments
 (0)