Skip to content

Commit 260a09a

Browse files
Merge pull request #60 from oracle/0-4-0-readme
Update README.md
2 parents c5e0b1c + 13a5cda commit 260a09a

File tree

1 file changed

+67
-55
lines changed

1 file changed

+67
-55
lines changed

README.md

+67-55
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Oracle R2DBC implements the R2DBC Service Provider Interface (SPI) as specified
88
### Learn More About R2DBC:
99
[R2DBC Project Home Page](https://r2dbc.io)
1010

11-
[R2DBC Javadocs v0.9.0.M2](https://r2dbc.io/spec/0.9.0.M2/api/)
11+
[R2DBC Javadocs v0.9.0.RELEASE](https://r2dbc.io/spec/0.9.0.RELEASE/api/)
1212

13-
[R2DBC Specification v0.9.0.M2](https://r2dbc.io/spec/0.9.0.M2/spec/html/)
13+
[R2DBC Specification v0.9.0.RELEASE](https://r2dbc.io/spec/0.9.0.RELEASE/spec/html/)
1414

1515
### Learn More About Reactive Streams:
1616
[Reactive Streams Project Home Page](http://www.reactive-streams.org)
@@ -19,18 +19,22 @@ Oracle R2DBC implements the R2DBC Service Provider Interface (SPI) as specified
1919

2020
[Reactive Streams Specification v1.0.3](https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.3/README.md)
2121
# About This Version
22-
The 0.3.0 release Oracle R2DBC implements version 0.9.0.M2 of the R2DBC SPI.
23-
The 0.9.0.M2 SPI update introduces support for consuming a `Result` as a
24-
stream of `Segment` objects, configuring statement execution timeouts, and
25-
managing pooled `Connection`s with the `LifeCycle` interface.
26-
27-
The 0.3.0 release updates the Oracle JDBC dependency to 21.3. The 21.3 release
28-
introduces several improvements for the Reactive Extensions:
29-
- Substantial reduction in object allocation costs.
30-
- Row mapping functions will no longer contend with other threads for
31-
access to the JDBC connection.
32-
- Blocking database calls are no longer required for PreparedStatements
33-
returning values generated by DML.
22+
The 0.4.0 release Oracle R2DBC implements version 0.9.0.RELEASE of the R2DBC SPI.
23+
24+
Bug fixes included in this release:
25+
- Resolved a stack overflow that occcured when reading JSON columns
26+
- Using asynchronous lock acquisition to avoid contention for JDBC's lock
27+
28+
Functionality added in this release:
29+
- Support for SERIALIZABLE transaction isolation
30+
- Support for transaction savepoints
31+
- Support for R2dbcException.getSql()
32+
33+
API changes in this release:
34+
- Addition of oracle.r2dbc.OracleR2dbcOptions, a class that declares Oracle R2DBC's extended Options
35+
- Addition of oracle.r2dbc.OracleR2dbcOptions.EXECUTOR, an Option for configuring a non-default Executor
36+
- Renamed the "oracleNetDescriptor" Option to "oracle.r2dbc.descriptor"
37+
- Statement.add() results in an IllegalStateException if bind values are not set afterwards
3438

3539
### Spring Integration
3640
Use the 0.1.0 version of Oracle R2DBC if you are programming with Spring.
@@ -60,12 +64,12 @@ Artifacts can also be found on Maven Central.
6064
<dependency>
6165
<groupId>com.oracle.database.r2dbc</groupId>
6266
<artifactId>oracle-r2dbc</artifactId>
63-
<version>0.3.0</version>
67+
<version>0.4.0</version>
6468
</dependency>
6569
```
6670

6771
Oracle R2DBC is compatible with JDK 11 (or newer), and has the following runtime dependencies:
68-
- R2DBC SPI 0.9.0.M2
72+
- R2DBC SPI 0.9.0.RELEASE
6973
- Reactive Streams 1.0.3
7074
- Project Reactor 3.3.0.RELEASE
7175
- Oracle JDBC 21.3.0.0 for JDK 11 (ojdbc11.jar)
@@ -142,9 +146,9 @@ This document specifies the behavior of the R2DBC SPI implemented for the
142146
Oracle Database. This SPI implementation is referred to as the "Oracle R2DBC
143147
Driver" or "Oracle R2DBC" throughout the remainder of this document.
144148

145-
The Oracle R2DBC Driver implements behavior specified by the R2DBC 0.9.0.M2
146-
[Specification](https://r2dbc.io/spec/0.9.0.M2/spec/html/)
147-
and [Javadoc](https://r2dbc.io/spec/0.8.3.RELEASE/api/)
149+
The Oracle R2DBC Driver implements behavior specified by the R2DBC 0.9.0.RELEASE
150+
[Specification](https://r2dbc.io/spec/0.9.0.RELEASE/spec/html/)
151+
and [Javadoc](https://r2dbc.io/spec/0.9.0.RELEASE/api/)
148152

149153
Publisher objects created by Oracle R2DBC implement behavior specified by
150154
the Reactive Streams 1.0.3 [Specification](https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.3/README.md)
@@ -160,13 +164,13 @@ implements a ConnectionFactoryProvider located by an R2DBC URL identifing
160164
"oracle" as a driver, or by a DRIVER ConnectionFactoryOption with the value
161165
of "oracle".
162166
- The following well-known ConnectionFactory Options are supported:
163-
DRIVER, USER, PASSWORD, HOST, PORT, DATABASE, SSL,
164-
CONNECT_TIMEOUT, STATEMENT_TIMEOUT.
165-
- The DATABASE ConnectionFactoryOption is interpreted as the
167+
`DRIVER`, `USER`, `PASSWORD`, `HOST`, `PORT`, `DATABASE`, `SSL`,
168+
`CONNECT_TIMEOUT`, `STATEMENT_TIMEOUT`.
169+
- The `DATABASE` `ConnectionFactoryOption` is interpreted as the
166170
[service name](https://docs.oracle.com/en/database/oracle/oracle-database/21/netag/identifying-and-accessing-database.html#GUID-153861C1-16AD-41EC-A179-074146B722E6) of an Oracle Database instance.
167171
System Identifiers (SID) are not recognized.
168172
- A subset of Oracle JDBC's connection properties are supported as extended
169-
Options. For Options having any of the following names, a CharSequence value may be specified:
173+
options. Extended options that configure Oracle JDBC connection properties are declared in `oracle.r2dbc.OracleR2dbcOptions`. These options all have the same name as their corresponding Oracle JDBC connection property, and will accept a `CharSequence` value:
170174
- [oracle.net.tns_admin](https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/oracle/jdbc/OracleConnection.html?is-external=true#CONNECTION_PROPERTY_TNS_ADMIN)
171175
- [oracle.net.wallet_location](https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/oracle/jdbc/OracleConnection.html?is-external=true#CONNECTION_PROPERTY_WALLET_LOCATION)
172176
- [oracle.net.wallet_password](https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/oracle/jdbc/OracleConnection.html?is-external=true#CONNECTION_PROPERTY_WALLET_PASSWORD)
@@ -189,27 +193,35 @@ Options. For Options having any of the following names, a CharSequence value may
189193
- [oracle.jdbc.implicitStatementCacheSize](https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/oracle/jdbc/OracleConnection.html?is-external=true#CONNECTION_PROPERTY_IMPLICIT_STATEMENT_CACHE_SIZE)
190194
- [oracle.jdbc.defaultLobPrefetchSize](https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/oracle/jdbc/OracleConnection.html?is-external=true#CONNECTION_PROPERTY_DEFAULT_LOB_PREFETCH_SIZE)
191195
- [oracle.net.disableOob](https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/oracle/jdbc/OracleConnection.html?is-external=true#CONNECTION_PROPERTY_THIN_NET_DISABLE_OUT_OF_BAND_BREAK)
192-
- Out of band (OOB) breaks effect statement timeouts. Set this to "true"
193-
if statement timeouts are not working correctly.
196+
- Out of band (OOB) breaks effect statement timeouts. Set this to "true" if statement timeouts are not working correctly.
194197
- [oracle.jdbc.enableQueryResultCache](https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/oracle/jdbc/OracleConnection.html#CONNECTION_PROPERTY_ENABLE_QUERY_RESULT_CACHE)
195198
- Cached query results can cause phantom reads even if the serializable
196199
transaction isolation level is set. Set this to "false" if using the
197200
serializable isolation level.
198-
- Oracle Net Descriptors of the form ```(DESCRIPTION=...)``` may be specified as an io.r2dbc.spi.Option having the name `oracleNetDescriptor`.
199-
- If `oracleNetDescriptor` is specified, then it is invalid to specify any other options that might conflict with information in the descriptor, such as: `HOST`, `PORT`, `DATABASE`, and `SSL`.
200-
- The `oracleNetDescriptor` option may appear in the query section of an R2DBC URL: `r2dbc:oracle://?oracleNetDescriptor=(DESCRIPTION=...)`
201-
- The `oracleNetDescriptor` option may be provided programatically: `ConnectionFactoryOptions.builder().option(Option.valueOf("oracleNetDescriptor"), "(DESCRIPTION=...)")`
202-
- The `oracleNetDescriptor` option may be set as the alias of a descriptor in a tnsnames.ora file. The directory of tnsnames.ora may be set using an io.r2dbc.spi.Option having the name `TNS_ADMIN`: `r2dbc:oracle://?oracleNetDescriptor=myAlias&TNS_ADMIN=/path/to/tnsnames/`
203-
201+
- Oracle Net Descriptors of the form ```(DESCRIPTION=...)``` may be specified using `oracle.r2dbc.OracleR2dbcOptions.DESCRIPTOR`.
202+
- If a descriptor is specified, then it is invalid to specify any other options that might conflict with information in the descriptor, such as: `HOST`, `PORT`, `DATABASE`, and `SSL`.
203+
- The `DESCRIPTOR` option has the name `oracle.r2dbc.descriptor`, and this may appear in the query section of an R2DBC URL: `r2dbc:oracle://?oracle.r2dbc.descriptor=(DESCRIPTION=...)`
204+
- The `DESCRIPTOR` option may be provided programmatically:
205+
```java
206+
ConnectionFactoryOptions.builder().option(OracleR2dbcOptions.DESCRIPTOR, "(DESCRIPTION=...)")
207+
```
208+
- The `DESCRIPTOR` option may be set to an aliased entry of a tnsnames.ora file. The directory of tnsnames.ora may be set using an option with the name `TNS_ADMIN`: `r2dbc:oracle://?oracle.r2dbc.descriptor=myAlias&TNS_ADMIN=/path/to/tnsnames/`
209+
- A `java.util.concurrent.Executor` to use for executing asynchronous callbacks may specified using `oracle.r2dbc.OracleR2dbcOptions.EXECUTOR`.
210+
- The `EXECUTOR` option can only be set programmatically, it can not be set in the query section of an R2DBC URL:
211+
```java
212+
Executor myExecutor = getMyExecutor();
213+
ConnectionFactoryOptions options = ConnectionFactoryOptions.builder()
214+
.option(ConnectionFactoryOptions.DRIVER, "oracle")
215+
.option(OracleR2dbcOptions.EXECUTOR, myExecutor)
216+
...
217+
.build();
218+
```
204219

205220
### Thread Safety and Parallel Execution
206-
- Oracle R2DBC's ConnectionFactory and ConnectionFactoryProvider are thread safe.
221+
- Oracle R2DBC's `ConnectionFactory` and `ConnectionFactoryProvider` are thread safe.
207222
- All other SPI implementations are not thread safe.
208-
- Executing parallel database calls is not supported over a single Connection.
209-
If a thread attempts to initiate a parallel call, that thread is blocked until
210-
the connection is no longer executing any other call. This is a
211-
limitation of the Oracle Database, which does not support parallel calls
212-
within a single session.
223+
- Executing parallel database calls is not supported over a single `Connection`.
224+
If a thread attempts to initiate a parallel call, that call will be enqueued. The enqueued call will not be executed until the connection is no longer executing any other call. This is a limitation of the Oracle Database, which does not support parallel calls within a single session.
213225

214226
### Reactive Streams
215227
- The Oracle R2DBC javadoc of every method that returns a Publisher specifies the
@@ -228,7 +240,7 @@ or Oracle JDBC Driver error message](https://docs.oracle.com/en/database/oracle/
228240
- READ COMMITTED is the default transaction isolation level
229241
- SERIALIZABLE is the only isolation level, besides READ COMMITED, that
230242
Oracle Database supports.
231-
- Transaction savepoints are not supported in this release.
243+
- To avoid phantom reads, configure `oracle.r2dbc.OracleR2dbcOptions.ENABLE_QUERY_RESULT_CACHE` as `false` when using SERIALIZABLE isolation.
232244
- Oracle Database does not support a lock wait timeout that is configurable
233245
within the scope of a transaction or session. SPI methods that configure a
234246
lock wait timeout throw ```UnsupportedOperationException```
@@ -287,35 +299,35 @@ of each row affected by an INSERT or UPDATE.
287299
```Result``` for each returned cursor.
288300

289301
### Type Mappings
290-
- javax.json.JsonObject and oracle.sql.json.OracleJsonObject are supported as
291-
Java type mappings for JSON column values.
292-
- java.time.Duration is supported as a Java type mapping for INTERVAL DAY TO SECOND
302+
- `javax.json.JsonObject` and `oracle.sql.json.OracleJsonObject` are supported as
303+
Java type mappings for `JSON` column values.
304+
- `java.time.Duration` is supported as a Java type mapping for `INTERVAL DAY TO SECOND`
293305
column values.
294-
- java.time.Period is supported as a Java type mapping for INTERVAL YEAR TO MONTH
306+
- `java.time.Period` is supported as a Java type mapping for `INTERVAL YEAR TO MONTH`
295307
column values.
296-
- java.time.LocalDateTime is supported as a Java type mapping for DATE column values.
297-
The Oracle Database type named "DATE" stores the same information as a LocalDateTime:
298-
year, month, day, hour, minute, and second.
308+
- `java.time.LocalDateTime` is supported as a Java type mapping for `DATE` column values.
309+
The Oracle Database type named "DATE" stores the same information as a `LocalDateTime`:
310+
year, month, day, hour, minute, and second.
299311

300312
### BLOB, CLOB, and NCLOB
301313
When a SQL query returns a LOB value, a
302314
portion of that value is prefetched from the database and the remaining portion
303315
must be fetched with additional database calls. The number of prefetched
304-
bytes is configured by an ```Option``` named [oracle.jdbc.defaultLobPrefetchSize](https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/oracle/jdbc/OracleConnection.html?is-external=true#CONNECTION_PROPERTY_DEFAULT_LOB_PREFETCH_SIZE)
305-
. The default value of this ```Option``` is 1 GB.
316+
bytes is configured by an `Option` named [oracle.jdbc.defaultLobPrefetchSize](https://docs.oracle.com/en/database/oracle/oracle-database/21/jajdb/oracle/jdbc/OracleConnection.html?is-external=true#CONNECTION_PROPERTY_DEFAULT_LOB_PREFETCH_SIZE)
317+
. The default value of this `Option` is 1 GB.
306318

307-
The ```Row.get(...)``` method allows LOB values to be mapped into materialized
308-
types like ```ByteBuffer``` and ```String```. If the prefetch size is large
309-
enough to have fetched the entire LOB value, then ```Row.get(...)``` can
310-
return a ```ByteBuffer/String``` without any additional database calls.
319+
The `Row.get(...)` method allows LOB values to be mapped into materialized
320+
types like `ByteBuffer` and `String`. If the prefetch size is large
321+
enough to have fetched the entire LOB value, then `Row.get(...)` can
322+
return a `ByteBuffer/String` without any additional database calls.
311323
Otherwise, if the LOB value is larger than the prefetch size, then
312-
```Row.get(...)``` must execute a **blocking database call** to fetch the
324+
`Row.get(...)` must execute a **blocking database call** to fetch the
313325
remainder of that value.
314326

315327
For systems in which LOB values are too large to be prefetched, a smaller
316-
prefetch size can be configured, and LOB values may be mapped into ```Blob```
317-
or ```Clob``` objects rather than ```ByteBuffer``` or ```String```. ```Blob```
318-
and ```Clob``` objects allow the LOB value to be streamed using non-blocking
328+
prefetch size can be configured, and LOB values may be mapped into `Blob`
329+
or `Clob` objects rather than `ByteBuffer` or `String`. `Blob`
330+
and `Clob` objects allow the LOB value to be streamed using non-blocking
319331
database calls.
320332

321333
# Secure Programming Guidelines

0 commit comments

Comments
 (0)