Revert events mode default back to false

This commit is contained in:
Christopher Jones 2019-11-05 11:11:49 +11:00
parent 91f582c92b
commit e937b8a96e
7 changed files with 20 additions and 17 deletions

View File

@ -1,12 +1,17 @@
# Change Log
## node-oracledb v4.0.2 (DD Mon YYYY)
## node-oracledb v4.1.0 (DD Mon YYYY)
**This release is under development**
- Fixed a JavaScript memory leak when getting Oracle Database named type
information, such as with `getDbObjectClass()`.
- Revert the
[`events`](https://oracle.github.io/node-oracledb/doc/api.html#propdbevents)
default back to pre-4.0 behavior due to timeouts in some environments. It is
now *false* again.
- Correct support for PLS_INTEGER and BINARY_INTEGER types when used in PL/SQL records (ODPI-C change).
## node-oracledb v4.0.1 (19 Aug 2019)

View File

@ -1102,7 +1102,7 @@ Boolean events
Determines whether Oracle Client events mode should be enabled.
The default value for `events` is *true*.
The default value for `events` is *false*.
This property can be overridden in the
[`oracledb.createPool()`](#createpoolpoolattrsevents) call and when
@ -1114,14 +1114,14 @@ Notification](#consubscribe), [Fast Application Notification
(FAN)](#connectionfan) and [Runtime Load Balancing
(RLB)](#connectionrlb).
This property was added in node-oracledb 2.2. Up until node-oracledb
4.0 the default value for `events` was *false*.
This property was added in node-oracledb 2.2. In node-oracledb
4.0.0 and 4.0.1 the default value for `events` was *true*.
##### Example
```javascript
const oracledb = require('oracledb');
oracledb.events = true;
oracledb.events = false;
```
#### <a name="propdbextendedmetadata"></a> 3.2.5 `oracledb.extendedMetaData`
@ -3747,7 +3747,7 @@ changed in the database by any committed transaction, or when there
are Advanced Queuing messages to be dequeued.
For notification to work, the connection must be created with
[`events`](#propdbevents) mode *true*, which is the default.
[`events`](#propdbevents) mode *true*.
The database must be able to connect to the node-oracledb machine for
notifications to be received. Typically this means that the machine
@ -8464,10 +8464,9 @@ availability and performance tuning. For example the database's
#### <a name="connectionfan"></a> 14.9.1 Fast Application Notification (FAN)
Users of [Oracle Database FAN][64] must connect to a FAN-enabled
database service. The application should have
[`oracledb.events`](#propdbevents) is set to *true*, which is the
default. This value can also be changed via [Oracle Client
Users of [Oracle Database FAN][64] must connect to a FAN-enabled database
service. The application should have [`oracledb.events`](#propdbevents) is set
to *true*. This value can also be changed via [Oracle Client
Configuration](#oraaccess).
FAN support is useful for planned and unplanned outages. It provides

View File

@ -45,7 +45,7 @@ async function init() {
password: dbConfig.password,
connectString: dbConfig.connectString
// edition: 'ORA$BASE', // used for Edition Based Redefintion
// events: true, // whether to handle Oracle Database FAN and RLB events or support CQN
// events: false, // whether to handle Oracle Database FAN and RLB events or support CQN
// externalAuth: false, // whether connections should be established using External Authentication
// homogeneous: true, // all connections in the pool have the same credentials
// poolAlias: 'default', // set an alias to allow access to the pool via a name.

View File

@ -40,7 +40,7 @@
const oracledb = require("oracledb");
const dbConfig = require('./dbconfig.js');
// dbConfig.events = true; // CQN needs events mode, which is true by default in 4.0
dbConfig.events = true; // CQN needs events mode
const interval = setInterval(function() {
console.log("waiting...");

View File

@ -56,7 +56,7 @@ async function init() {
password: dbConfig.password,
connectString: dbConfig.connectString
// edition: 'ORA$BASE', // used for Edition Based Redefintion
// events: true, // whether to handle Oracle Database FAN and RLB events or support CQN
// events: false, // whether to handle Oracle Database FAN and RLB events or support CQN
// externalAuth: false, // whether connections should be established using External Authentication
// homogeneous: true, // all connections in the pool have the same credentials
// poolAlias: 'default', // set an alias to allow access to the pool via a name.

View File

@ -1113,7 +1113,6 @@ bool njsOracleDb_new(napi_env env, napi_value instanceObj,
oracleDb->fetchArraySize = DPI_DEFAULT_FETCH_ARRAY_SIZE;
oracleDb->lobPrefetchSize = NJS_LOB_PREFETCH_SIZE;
oracleDb->poolPingInterval = NJS_POOL_DEFAULT_PING_INTERVAL;
oracleDb->events = true;
// wrap the structure for use by JavaScript
if (napi_wrap(env, instanceObj, oracleDb, njsOracleDb_finalize, NULL,

View File

@ -328,10 +328,10 @@ describe('58. properties.js', function() {
it('58.1.28 events', function() {
var t = oracledb.events;
oracledb.events = false;
oracledb.events = true;
should.strictEqual(t, true);
should.strictEqual(oracledb.events, false);
should.strictEqual(t, false);
should.strictEqual(oracledb.events, true);
});
it('58.1.29 Negative - events', function() {