Skip to content

Commit 90f758b

Browse files
Allow Oracle JDBC's v$session properties as options
1 parent 7eeede5 commit 90f758b

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

src/main/java/oracle/r2dbc/impl/OracleReactiveJdbcAdapter.java

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,20 @@
126126
final class OracleReactiveJdbcAdapter implements ReactiveJdbcAdapter {
127127

128128
/**
129+
* <p>
129130
* The set of JDBC connection properties that this adapter supports. Each
130131
* property in this set is represented as an {@link Option} having the name
131132
* of the supported JDBC connection property. When a property is configured
132133
* with a sensitive value, such as a password, it is represented in this
133134
* set as a {@linkplain Option#sensitiveValueOf(String) sensitive Option}.
135+
* </p><p>
134136
* If a new Option is added to this set, then it <i>must</i> be documented
135137
* in the javadoc of {@link #createDataSource(ConnectionFactoryOptions)},
136138
* and in any other reference that lists which options the Oracle R2DBC Driver
137139
* supports. Undocumented options are useless; Other programmers won't be
138140
* able to use an option if they have no way to understand what the option
139141
* does or how it should be configured.
142+
* </p>
140143
*/
141144
private static final Set<Option<CharSequence>>
142145
JDBC_CONNECTION_PROPERTY_OPTIONS = Set.of(
@@ -198,7 +201,14 @@ final class OracleReactiveJdbcAdapter implements ReactiveJdbcAdapter {
198201
// Allow the client-side ResultSet cache to be disabled. It is
199202
// necessary to do so when using the serializable transaction isolation
200203
// level in order to prevent phantom reads.
201-
OracleR2dbcOptions.ENABLE_QUERY_RESULT_CACHE
204+
OracleR2dbcOptions.ENABLE_QUERY_RESULT_CACHE,
205+
206+
// Allow v$session attributes to be configured for tracing
207+
OracleR2dbcOptions.VSESSION_OSUSER,
208+
OracleR2dbcOptions.VSESSION_TERMINAL,
209+
OracleR2dbcOptions.VSESSION_PROCESS,
210+
OracleR2dbcOptions.VSESSION_PROGRAM,
211+
OracleR2dbcOptions.VSESSION_MACHINE
202212
);
203213

204214
/** Guards access to a JDBC {@code Connection} created by this adapter */
@@ -379,6 +389,21 @@ public AsyncLock getLock() {
379389
* </li><li>
380390
* {@linkplain OracleConnection#CONNECTION_PROPERTY_IMPLICIT_STATEMENT_CACHE_SIZE
381391
* oracle.jdbc.implicitStatementCacheSize}
392+
* </li><li>
393+
* {@linkplain OracleConnection#CONNECTION_PROPERTY_THIN_VSESSION_OSUSER
394+
* v$session.osuser}
395+
* </li><li>
396+
* {@linkplain OracleConnection#CONNECTION_PROPERTY_THIN_VSESSION_TERMINAL
397+
* v$session.terminal}
398+
* </li><li>
399+
* {@linkplain OracleConnection#CONNECTION_PROPERTY_THIN_VSESSION_PROCESS
400+
* v$session.process}
401+
* </li><li>
402+
* {@linkplain OracleConnection#CONNECTION_PROPERTY_THIN_VSESSION_PROGRAM
403+
* v$session.program}
404+
* </li><li>
405+
* {@linkplain OracleConnection#CONNECTION_PROPERTY_THIN_VSESSION_MACHINE
406+
* v$session.machine}
382407
* </li>
383408
* </ul>
384409
*

0 commit comments

Comments
 (0)