@@ -151,6 +151,15 @@ the database server waits for the `DISTRIBUTED_LOCK_TIMEOUT
151
151
412D-95F2-5B6C1F18415D> `__ time to allow other instances to suspend this
152
152
transaction before proceeding with a commit or rollback.
153
153
154
+ Note that there are some constraints when using Sessionless Transactions.
155
+ You cannot rollback to a savepoint of the sessionless transaction in a
156
+ previous connection. Sessionless Transactions cannot be promoted to
157
+ :ref: `distributedtxns `. Session states such as all parameters set by
158
+ ALTER SESSION, temporary LOB states, and PL/SQL states are not carried over to
159
+ the new connection. For more information on other constraints, see
160
+ `Restrictions for Sessionless Transactions <https://www.oracle.com/pls/topic/
161
+ lookup?ctx=dblatest&id=GUID-7F76D67C-4470-4DA3-BAAE-8E243D9FA87B> `__.
162
+
154
163
For more information on Sessionless Transactions, see `Developing Applications
155
164
with Sessionless Transactions <https://www.oracle.com/pls/topic/lookup?ctx=
156
165
dblatest&id=GUID-C1F67D04-CE72-416E-8CED-243E5710E83D> `__ in the Oracle
@@ -180,11 +189,11 @@ You can pass the following parameters to
180
189
181
190
- ``transactionId ``: This parameter is the unique identifier of the
182
191
transaction which is used to manage the transaction from start to end. If
183
- you do not specify the ``transactionId `` value, node-oracledb generates a
184
- unique identifier for the transaction as a ` universally-unique identifier
185
- (UUID) <https://www.rfc-editor.org/rfc/rfc4122.txt> `__ value when
186
- :meth: `connection .beginSessionlessTransaction ` is called . An example of a
187
- transaction identifier in UUID v4 is "36b8f84d-df4e-4d49-b662-bcde71a8764f".
192
+ you do not specify the ``transactionId `` value, a unique ` universally-unique
193
+ identifier (UUID) <https://www.rfc-editor.org/rfc/rfc4122.txt> `__ is
194
+ generated and returned by
195
+ :meth: `~Connection .beginSessionlessTransaction `. An example is
196
+ "36b8f84d-df4e-4d49-b662-bcde71a8764f".
188
197
189
198
- ``timeout ``: This parameter determines the duration before which this
190
199
transaction can be resumed by a connection the next time that it is
@@ -238,11 +247,6 @@ performance. For example:
238
247
239
248
.. code-block :: javascript
240
249
241
- const connection = await oracledb .getConnection ({
242
- user : " hr" ,
243
- password : mypw, // mypw contains the hr schema password
244
- connectString : " mydbmachine.example.com/orclpdb1"
245
- });
246
250
const result = await connection .execute (
247
251
` INSERT INTO slt_table (name) VALUES ('John')` , {},
248
252
{suspendOnSuccess: true });
@@ -276,10 +280,9 @@ You can set the following parameters in
276
280
277
281
- ``timeout ``: This parameter specifies how long this connection should wait
278
282
to resume a sessionless transaction if it is currently in use by another
279
- connection. This timeout is only effective when the transaction is in use by
280
- another connection. In this case, the current connection waits for the
281
- transaction to be suspended within this timeout period. If the transaction
282
- remains in use by the other connection after the timeout period, the error
283
+ connection. In this case, the current connection waits for the transaction
284
+ to be suspended within this timeout period. If the transaction remains in
285
+ use by the other connection after the timeout period, the error
283
286
`ORA-25351 <https://docs.oracle.com/en/error-help/db/ora-25351 >`__ is raised.
284
287
If another connection completes the transaction, the error `ORA-24756
285
288
<https://docs.oracle.com/en/error-help/db/ora-24756> `__ is raised. These
@@ -363,15 +366,6 @@ code snippet)::
363
366
364
367
[ [ 1, 'John' ], [ 2, 'Jane' ]]
365
368
366
- Note that there are some constraints when using Sessionless Transactions.
367
- You cannot rollback to a savepoint of the sessionless transaction in a
368
- previous conneciton. Sessionless Transactions cannot be promoted to XA
369
- (Extended Architecture) Transactions. Session states such as all parameters
370
- set by ALTER SESSION, Temp LOB states, and PL/SQL states are not carried over
371
- to the new connection. For more information on other constraints, see
372
- `Restrictions for Sessionless Transactions <https://www.oracle.com/pls/topic/
373
- lookup?ctx=dblatest&id=GUID-7F76D67C-4470-4DA3-BAAE-8E243D9FA87B> `__.
374
-
375
369
.. _viewsessionlesstxns :
376
370
377
371
Viewing Sessionless Transactions
@@ -388,18 +382,10 @@ following query with `NVL() <https://docs.oracle.com/en/database/oracle/oracle
388
382
389
383
.. code-block :: sql
390
384
391
- SELECT NVL(dbms_transaction.get_transaction_id, 'NULL transactionId') FROM dual;
385
+ SELECT NVL(dbms_transaction.get_transaction_id, 'NULL transactionId')
386
+ FROM dual;
392
387
393
388
The `GET_TRANSACTION_ID Function <https://www.oracle.com/pls/topic/lookup?ctx=
394
389
dblatest&id=GUID-5E1C1B63-207F-4587-8259-0CED93EB9643> `__ of the
395
390
DBMS_TRANSACTION package returns the transaction identifier that is used in
396
391
the current connection.
397
-
398
- Note that there are some constraints when using Sessionless Transactions.
399
- You cannot rollback to a savepoint of the sessionless transaction in a
400
- previous connection. Sessionless Transactions cannot be promoted to XA
401
- (Extended Architecture) Transactions. Session states such as all parameters
402
- set by ALTER SESSION, temporary LOB states, and PL/SQL states are not carried
403
- over to the new connection. For more information on other constraints, see
404
- `Restrictions for Sessionless Transactions <https://www.oracle.com/pls/topic/
405
- lookup?ctx=dblatest&id=GUID-7F76D67C-4470-4DA3-BAAE-8E243D9FA87B> `__.
0 commit comments