@@ -610,8 +610,8 @@ The Pool object obtains connections to the Oracle database using the
610
610
is created for each Pool object.
611
611
612
612
After the application finishes using a connection pool, it should
613
- terminate the connection pool by calling the ` terminate() ` method on the
614
- Pool object.
613
+ release all connections and terminate the connection pool by calling
614
+ the ` terminate() ` method on the Pool object.
615
615
616
616
### <a name =" poolproperties " ></a > 4.1 Pool Properties
617
617
@@ -726,10 +726,9 @@ This call terminates the connection pool.
726
726
727
727
This is an asynchronous call.
728
728
729
- All open connections in a connection pool are closed when a connection
730
- pool terminates.
731
-
732
- Any ongoing transaction in a connection will be released.
729
+ Any open connections should be released with [ ` release() ` ] ( #release )
730
+ before ` terminate() ` is called, otherwise an error will be returned
731
+ and the pool will be unusable.
733
732
734
733
##### Prototype
735
734
@@ -1007,16 +1006,18 @@ returned as an array. If `bindParams` is passed as an object, then
1007
1006
Releases a connection. If the connection was obtained from the pool,
1008
1007
the connection is returned to the pool.
1009
1008
1010
-
1011
-
1012
1009
##### Description
1013
1010
1014
1011
This is an asynchronous call.
1015
1012
1013
+ Note: calling ` release() ` when connections are no longer required is
1014
+ strongly encouraged. Releasing helps avoid resource leakage and can
1015
+ improve system efficiency.
1016
+
1016
1017
When a connection is released, any ongoing transaction on the
1017
1018
connection is rolled back.
1018
1019
1019
- Note that after releasing a connection to a pool, there is no
1020
+ After releasing a connection to a pool, there is no
1020
1021
guarantee a subsequent ` getConnection() ` call gets back the same
1021
1022
database connection. The application must redo any ALTER SESSION
1022
1023
statements on the new connection object, as required.
@@ -1084,8 +1085,7 @@ A SQL or PL/SQL statement may be executed using the *Connection*
1084
1085
statements are not committed unless the ` commit() ` call is issued or
1085
1086
the ` isAutoCommit ` property is * true* at the time of execution. Any
1086
1087
ongoing transaction will be rolled back when [ ` release() ` ] ( #release )
1087
- or [ ` terminate() ` ] ( #terminate ) are called, or when the application
1088
- ends.
1088
+ is called, or when the application ends.
1089
1089
1090
1090
Using bind variables in SQL statements is recommended in preference to
1091
1091
constructing SQL statements by string concatenation. This is for
0 commit comments