Skip to content

Commit 42e1663

Browse files
Adjust documentation to improve clarity.
1 parent 85a0ad3 commit 42e1663

File tree

2 files changed

+33
-16
lines changed

2 files changed

+33
-16
lines changed

doc/src/module.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,8 @@ Module Interface
218218

219219
The timeout parameter is expected to be an integer, if specified, and sets
220220
the length of time (in seconds) after which idle sessions in the pool are
221-
terminated. Note that termination only occurs when another session is
222-
released back to the pool. The default value of 0 means that no idle
223-
sessions are terminated.
221+
terminated. Note that termination only occurs when the pool is accessed.
222+
The default value of 0 means that no idle sessions are terminated.
224223

225224
The waitTimeout parameter is expected to be an integer, if specified, and
226225
sets the length of time (in milliseconds) that the caller should wait for
@@ -229,12 +228,13 @@ Module Interface
229228
:data:`cx_Oracle.SPOOL_ATTRVAL_TIMEDWAIT`.
230229

231230
The maxLifetimeSession parameter is expected to be an integer, if
232-
specified, and sets the maximum length of time (in seconds) a session may
233-
exist in the pool. Sessions in the pool are terminated after they have
234-
been in the pool for the specified period of time. Note that termination
235-
only occurs when another session is released back to the pool. The default
236-
value is 0 which means that there is no maximum length of time that a
237-
session may exist in the pool.
231+
specified, and sets the maximum length of time (in seconds) a pooled
232+
session may exist. Sessions that are in use will not be closed. They become
233+
candidates for termination only when they are released back to the pool and
234+
have existed for longer than maxLifetimeSession seconds. Note that
235+
termination only occurs when the pool is accessed. The default value is 0
236+
which means that there is no maximum length of time that a pooled session
237+
may exist.
238238

239239
.. note::
240240

doc/src/session_pool.rst

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,16 @@ SessionPool Object
7878

7979
.. attribute:: SessionPool.max_lifetime_session
8080

81-
This read-write attribute returns the lifetime (in seconds) for all of the
82-
sessions in the pool. Sessions in the pool are terminated when they have
83-
reached their lifetime. If timeout is also set, the session will be
84-
terminated if either the idle timeout happens or the max lifetime setting
85-
is exceeded. This attribute is only available in Oracle Database 12.1.
81+
This read-write attribute returns the maximum length of time (in seconds)
82+
that a pooled session may exist. Sessions that are in use will not be
83+
closed. They become candidates for termination only when they are released
84+
back to the pool and have existed for longer than max_lifetime_session
85+
seconds. Note that termination only occurs when the pool is accessed. A
86+
value of 0 means that there is no maximum length of time that a pooled
87+
session may exist. This attribute is only available in Oracle Database
88+
12.1.
89+
90+
8691

8792
.. versionadded:: 5.3
8893

@@ -141,9 +146,10 @@ SessionPool Object
141146

142147
.. attribute:: SessionPool.timeout
143148

144-
This read-write attribute indicates the time (in seconds) after which idle
149+
This read-write attribute specifies the time (in seconds) after which idle
145150
sessions will be terminated in order to maintain an optimum number of open
146-
sessions.
151+
sessions. Note that termination only occurs when the pool is accessed. A
152+
value of 0 means that no idle sessions are terminated.
147153

148154

149155
.. attribute:: SessionPool.tnsentry
@@ -157,3 +163,14 @@ SessionPool Object
157163
This read-only attribute returns the name of the user which established the
158164
connection to the database.
159165

166+
167+
.. attribute:: SessionPool.wait_timeout
168+
169+
This read-write attribute specifies the time (in milliseconds) that the
170+
caller should wait for a session to become available in the pool before
171+
returning with an error. This value is only used if the getmode parameter
172+
to :meth:`cx_Oracle.SessionPool()` was the value
173+
:data:`cx_Oracle.SPOOL_ATTRVAL_TIMEDWAIT`.
174+
175+
.. versionadded:: 6.4
176+

0 commit comments

Comments
 (0)