The JDBC Spec clearly states. (underline emphasis mine)
--------------------------------
9.2 Multi-threading
We require that all operations on all the java.sql objects be
multi-thread safe and able to cope correctly with having several threads
simultaneously calling the same object.
Some drivers may allow more concurrent execution than others.
Developers can assume fully concurrent execution; if the driver requires
some form of synchronization, it will provide it. The only difference
visible to the developer will be that applications will run with reduced
concurrency.
For example, two Statements on the same Connection can be executed
concurrently and their ResultSets can be processed concurrently (from
the perspective of the developer). Some drivers will provide this full
concurrency. Others may execute one statement and wait until it
completes before sending the next.
One specific use of multi-threading is to cancel a long running
statement. This is done by using one thread to execute the statement and
another to cancel it with its Statement.cancel() method.
In practice we expect that most of the JDBC objects will only be
accessed in a single threaded way. However some multi-thread support
is necessary, and our attempts in previous drafts to specify some
classes as MT safe and some as MT unsafe appeared to be adding more
confusion than light.
----------------------------------
The currently avaialable jdbc driver does not provide this capability.
The developer cannot assume fully concurrent execution.
Could someone confirm that this is the case and let me know when/if
the driver will comply with the specification.
Martin Smith.
- RE: JDBC: Driver does not appear to be compliant with the ... Martin Smith
- RE: JDBC: Driver does not appear to be compliant with... Paskamp, Marco
- RE: JDBC: Driver does not appear to be compliant ... Martin Smith
