Skip to content

Commit

Permalink
Revert events mode default back to false
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbj committed Nov 21, 2019
1 parent 91f582c commit e937b8a
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 17 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
@@ -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)
Expand Down
17 changes: 8 additions & 9 deletions doc/api.md
Expand Up @@ -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
Expand All @@ -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`
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/connectionpool.js
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion examples/cqn2.js
Expand Up @@ -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...");
Expand Down
2 changes: 1 addition & 1 deletion examples/webappawait.js
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion src/njsOracleDb.c
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions test/properties.js
Expand Up @@ -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() {
Expand Down

0 comments on commit e937b8a

Please sign in to comment.