Skip to content

Commit 29cbe3c

Browse files
committed
More Documentation updates
1 parent 4a03ecf commit 29cbe3c

File tree

2 files changed

+64
-40
lines changed

2 files changed

+64
-40
lines changed

doc/src/release_notes.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ Thin Mode Changes
3131
Thick Mode Changes
3232
+++++++++++++++++++
3333

34-
#) Fix bug which inserted invalid value `~` if an unacceptable out of bound number is given.
35-
Now, numbers like 1.0e+128, -1e128, etc. will throw an error ``NJS-115: value cannot be represented
36-
as an Oracle Database number``
37-
Additionally, it resolves the issue related to JS numbers with precisions where
38-
`2.3` is returned as `2.300003`.
34+
#) Fixed the bug which inserted the invalid value `~` into the database
35+
if an unacceptable out-of-bound number is bound to a DML statement. Now,
36+
numbers like 1.0e+128, -1e128, etc. will throw an error
37+
``NJS-115: value cannot be represented as an Oracle Database number``.
38+
Additionally, this fix resolves the issue related to JS numbers with
39+
precisions where `2.3` is returned as `2.300003`.
3940

4041
node-oracledb `v6.4.0 <https://github.com/oracle/node-oracledb/compare/v6.3.0...v6.4.0>`__ (11 Mar 2024)
4142
--------------------------------------------------------------------------------------------------------

doc/src/user_guide/connection_handling.rst

Lines changed: 58 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,13 @@ Connection Pooling
481481
Applications which frequently create and close connections should use a
482482
connection pool. This is important for performance and scalability when
483483
applications need to handle a large number of users who do database work for
484-
short periods of time but have relatively long periods when the connections are
485-
not needed. The high availability features of pools also make small pools
484+
short periods of time but have relatively long periods when the connections
485+
are not needed. The high availability features of pools also make small pools
486486
useful for applications that want a few connections available for infrequent
487-
use and requires them to be immediately usable when acquired. Applications that
488-
would benefit from connection pooling but are too difficult to modify from
489-
standalone connections may be able to take advantage of :ref:`implicitpool`.
487+
use and requires them to be immediately usable when acquired. Applications
488+
that would benefit from connection pooling but are too difficult to modify
489+
from the use of standalone connections can take advantage of
490+
:ref:`implicitpool`.
490491

491492
Each node-oracledb process can use one or more connection pools. Each pool can
492493
contain zero or more connections. In addition to providing an immediately
@@ -2862,59 +2863,81 @@ Implicit Connection Pooling with DRCP and PRCP
28622863
----------------------------------------------
28632864
28642865
Starting from Oracle Database 23c, Node.js applications that use
2865-
:ref:`DRCP <drcp>` or `Proxy Resident Connection Pooling (PRCP) <https://
2866-
www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-E5586BC8-6311-434D-B605-
2867-
204560D3A777>`__ in Oracle Connection Manager in Traffic Director Mode
2868-
(CMAN-TDM) can enable implicit connection pooling with DRCP and PRCP. With
2869-
this feature, applications do not need to explicitly close or release a
2870-
connection to return the connection back to the DRCP or PRCP pool.
2866+
:ref:`DRCP <drcp>` and Oracle Connection Manager in Traffic Director Mode's
2867+
(CMAN-TDM) pooling capability `Proxy Resident Connection Pooling (PRCP)
2868+
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-E0032017-03B1-
2869+
4F14-AF9B-BCC87C982DA8>`__ can enable `implicit connection pooling <https://
2870+
www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-A9D74994-D81A-47BF-BAF2-
2871+
E4E1A354CA99>`__ with DRCP and PRCP. For more information on PRCP, see the
2872+
Oracle technical brief `CMAN-TDM — An Oracle Database connection proxy for
2873+
scalable and highly available applications <https://download.oracle.com/
2874+
ocomdocs/global/CMAN_TDM_Oracle_DB_Connection_Proxy_for_scalable_apps.pdf>`__.
2875+
28712876
Applications that do not use client-side connection pooling can take advantage
28722877
of the implicit connection pooling feature. Both node-oracledb Thin and Thick
28732878
modes support implicit connection pooling. The Thick mode requires Oracle 23c
28742879
Client libraries for implicit connection pooling support. The Thin mode works
28752880
with implicit connection pooling from node-oracledb 6.4 onwards.
28762881
2877-
Implicit connection pooling uses two types of boundary values to determine
2878-
when the connection should be released back to the DRCP or PRCP pool. The
2882+
With implicit connection pooling, applications do not need to explicitly close
2883+
or release a connection to return the connection back to the DRCP or PRCP
2884+
pool. This feature uses two types of boundary values which determine when
2885+
connections are implicitly released back to the DRCP or PRCP pool. The
28792886
boundary value can be specified in the ``POOL_BOUNDARY`` parameter in the
28802887
:ref:`Easy Connect string <easyconnect>` or the
28812888
:ref:`Connect Descriptor string <embedtns>`. The two boundary values which
28822889
can be specified in the ``POOL_BOUNDARY`` parameter are:
28832890
28842891
- *STATEMENT*: If this boundary value is specified, then the connection is
2885-
released back to the DRCP or PRCP connection pool when the connection is
2886-
implicitly stateless. A connection is implicitly stateless when all open
2887-
cursors in a session have been fetched through to completion, and there
2888-
are no active transactions, temporary tables, or temporary LOBs.
2889-
2890-
- *TRANSACTION*: If this boundary value is specified, then the connection is
2891-
released back to the DRCP or PRCP connection pool when a
2892-
:meth:`commit <connection.commit>` or :meth:`rollback <connection.rollback>`
2893-
is explicitly performed on the transaction in progress on the connection.
2894-
It is recommended to not set the :attr:`Connection.autocommit` property to
2895-
*true* when using implicit connection pooling.
2896-
2897-
To use implicit connection pooling with DRCP or PRCP, you must specify the
2898-
server type as *pooled* and set the ``POOL_BOUNDARY`` attribute to either
2899-
*STATEMENT* or *TRANSACTION* in:
2892+
released back to the DRCP or PRCP pool when the connection is implicitly
2893+
stateless. A connection is implicitly stateless when all open cursors in a
2894+
session have been fetched through to completion, and there are no active
2895+
transactions, no temporary tables, and no temporary LOBs.
2896+
2897+
- *TRANSACTION*: If this boundary value is specified, then a connection is
2898+
released back to the DRCP or PRCP pool when either one of the methods
2899+
:meth:`connection.commit()` or :meth:`connection.rollback()` are
2900+
called. It is recommended to not set the
2901+
:ref:`autoCommit <propexecautocommit>` property to *true* when using
2902+
implicit connection pooling. If you do set this attribute to *true*, then
2903+
you will be unable to:
2904+
2905+
- Fetch any data that requires multiple :ref:`round-trips <roundtrips>` to
2906+
the database
2907+
- Run queries that fetch :ref:`LOB <lobhandling>` and
2908+
:ref:`JSON <jsondatatype>` data
2909+
2910+
To use implicit connection pooling with DRCP or PRCP in node-oracledb, you
2911+
must specify the server type as *pooled* and set the ``POOL_BOUNDARY``
2912+
attribute to either *STATEMENT* or *TRANSACTION* in:
29002913
29012914
- The :ref:`Easy Connect string <easyconnect>`. For example, to use implicit
2902-
connection pooling with the statement boundary value:
2915+
connection pooling with the *statement* boundary:
29032916
29042917
.. code-block:: javascript
29052918
2906-
dsn = localhost:1521/orclpdb:pooled?pool_boundary=statement
2919+
const connection = await oracledb.getConnection({
2920+
user : "hr",
2921+
password : mypw, // mypw contains the hr schema password
2922+
connectString : "mydbmachine.example.com:1521/orclpdb1:pooled?pool_boundary=statement"
2923+
});
29072924
29082925
- Or the ``CONNECT_DATA`` section of the
29092926
:ref:`Connect Descriptor string <embedtns>`. For example, to use implicit
2910-
connection pooling with the transaction boundary value:
2911-
2912-
.. code-block:: javascript
2927+
connection pooling with the *transaction* boundary::
29132928
29142929
tnsalias = (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mymachine.example.com)
29152930
(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)
29162931
(SERVER=POOLED)(POOL_BOUNDARY=TRANSACTION)))
29172932
2933+
If you specify an invalid ``POOL_BOUNDARY`` in the
2934+
:ref:`Easy Connect string <easyconnect>` or the
2935+
:ref:`Connect Descriptor string <embedtns>`, then the following error is
2936+
returned::
2937+
2938+
ORA-24545: invalid value of POOL_BOUNDARY specified in connect
2939+
string
2940+
29182941
.. note::
29192942
29202943
- Implicit connection pooling is disabled if the application sets the
@@ -2925,8 +2948,8 @@ server type as *pooled* and set the ``POOL_BOUNDARY`` attribute to either
29252948
*SELF*. You can specify the purity using the ``POOL_PURITY`` parameter
29262949
in the connection string to override the default purity value.
29272950
2928-
Note that it is recommended to use :ref:`connpooling` over implicit connection
2929-
pooling.
2951+
Note that it is recommended to use :ref:`connection pooling <connpooling>`
2952+
over implicit connection pooling.
29302953
29312954
.. _privconn:
29322955

0 commit comments

Comments
 (0)