Skip to content

Commit e937b8a

Browse files
committed
Revert events mode default back to false
1 parent 91f582c commit e937b8a

File tree

7 files changed

+20
-17
lines changed

7 files changed

+20
-17
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# Change Log
22

3-
## node-oracledb v4.0.2 (DD Mon YYYY)
3+
## node-oracledb v4.1.0 (DD Mon YYYY)
44

55
**This release is under development**
66

77
- Fixed a JavaScript memory leak when getting Oracle Database named type
88
information, such as with `getDbObjectClass()`.
99

10+
- Revert the
11+
[`events`](https://oracle.github.io/node-oracledb/doc/api.html#propdbevents)
12+
default back to pre-4.0 behavior due to timeouts in some environments. It is
13+
now *false* again.
14+
1015
- Correct support for PLS_INTEGER and BINARY_INTEGER types when used in PL/SQL records (ODPI-C change).
1116

1217
## node-oracledb v4.0.1 (19 Aug 2019)

doc/api.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ Boolean events
11021102

11031103
Determines whether Oracle Client events mode should be enabled.
11041104

1105-
The default value for `events` is *true*.
1105+
The default value for `events` is *false*.
11061106

11071107
This property can be overridden in the
11081108
[`oracledb.createPool()`](#createpoolpoolattrsevents) call and when
@@ -1114,14 +1114,14 @@ Notification](#consubscribe), [Fast Application Notification
11141114
(FAN)](#connectionfan) and [Runtime Load Balancing
11151115
(RLB)](#connectionrlb).
11161116

1117-
This property was added in node-oracledb 2.2. Up until node-oracledb
1118-
4.0 the default value for `events` was *false*.
1117+
This property was added in node-oracledb 2.2. In node-oracledb
1118+
4.0.0 and 4.0.1 the default value for `events` was *true*.
11191119

11201120
##### Example
11211121

11221122
```javascript
11231123
const oracledb = require('oracledb');
1124-
oracledb.events = true;
1124+
oracledb.events = false;
11251125
```
11261126

11271127
#### <a name="propdbextendedmetadata"></a> 3.2.5 `oracledb.extendedMetaData`
@@ -3747,7 +3747,7 @@ changed in the database by any committed transaction, or when there
37473747
are Advanced Queuing messages to be dequeued.
37483748
37493749
For notification to work, the connection must be created with
3750-
[`events`](#propdbevents) mode *true*, which is the default.
3750+
[`events`](#propdbevents) mode *true*.
37513751
37523752
The database must be able to connect to the node-oracledb machine for
37533753
notifications to be received. Typically this means that the machine
@@ -8464,10 +8464,9 @@ availability and performance tuning. For example the database's
84648464
84658465
#### <a name="connectionfan"></a> 14.9.1 Fast Application Notification (FAN)
84668466
8467-
Users of [Oracle Database FAN][64] must connect to a FAN-enabled
8468-
database service. The application should have
8469-
[`oracledb.events`](#propdbevents) is set to *true*, which is the
8470-
default. This value can also be changed via [Oracle Client
8467+
Users of [Oracle Database FAN][64] must connect to a FAN-enabled database
8468+
service. The application should have [`oracledb.events`](#propdbevents) is set
8469+
to *true*. This value can also be changed via [Oracle Client
84718470
Configuration](#oraaccess).
84728471
84738472
FAN support is useful for planned and unplanned outages. It provides

examples/connectionpool.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async function init() {
4545
password: dbConfig.password,
4646
connectString: dbConfig.connectString
4747
// edition: 'ORA$BASE', // used for Edition Based Redefintion
48-
// events: true, // whether to handle Oracle Database FAN and RLB events or support CQN
48+
// events: false, // whether to handle Oracle Database FAN and RLB events or support CQN
4949
// externalAuth: false, // whether connections should be established using External Authentication
5050
// homogeneous: true, // all connections in the pool have the same credentials
5151
// poolAlias: 'default', // set an alias to allow access to the pool via a name.

examples/cqn2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
const oracledb = require("oracledb");
4141
const dbConfig = require('./dbconfig.js');
4242

43-
// dbConfig.events = true; // CQN needs events mode, which is true by default in 4.0
43+
dbConfig.events = true; // CQN needs events mode
4444

4545
const interval = setInterval(function() {
4646
console.log("waiting...");

examples/webappawait.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ async function init() {
5656
password: dbConfig.password,
5757
connectString: dbConfig.connectString
5858
// edition: 'ORA$BASE', // used for Edition Based Redefintion
59-
// events: true, // whether to handle Oracle Database FAN and RLB events or support CQN
59+
// events: false, // whether to handle Oracle Database FAN and RLB events or support CQN
6060
// externalAuth: false, // whether connections should be established using External Authentication
6161
// homogeneous: true, // all connections in the pool have the same credentials
6262
// poolAlias: 'default', // set an alias to allow access to the pool via a name.

src/njsOracleDb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,6 @@ bool njsOracleDb_new(napi_env env, napi_value instanceObj,
11131113
oracleDb->fetchArraySize = DPI_DEFAULT_FETCH_ARRAY_SIZE;
11141114
oracleDb->lobPrefetchSize = NJS_LOB_PREFETCH_SIZE;
11151115
oracleDb->poolPingInterval = NJS_POOL_DEFAULT_PING_INTERVAL;
1116-
oracleDb->events = true;
11171116

11181117
// wrap the structure for use by JavaScript
11191118
if (napi_wrap(env, instanceObj, oracleDb, njsOracleDb_finalize, NULL,

test/properties.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,10 @@ describe('58. properties.js', function() {
328328

329329
it('58.1.28 events', function() {
330330
var t = oracledb.events;
331-
oracledb.events = false;
331+
oracledb.events = true;
332332

333-
should.strictEqual(t, true);
334-
should.strictEqual(oracledb.events, false);
333+
should.strictEqual(t, false);
334+
should.strictEqual(oracledb.events, true);
335335
});
336336

337337
it('58.1.29 Negative - events', function() {

0 commit comments

Comments
 (0)