This has never been the intent in JDBC since its inception, From the
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
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.
I guess I should have quoted from the spec, rather than the first JDBC
tutorial, in which the author's did quote exactly that.
This is not to say that junior is wrong. I do believe him that the 3.0 spec
probably does say that.
This is a problem that occurs when people don't think about their design and
merely regurgitate what they've read. Or that they rush a design without
thinking about it first.
As pointed out, JDBC 4.0 spec does seem to correct this.
But hey, what do I know. I'm not paid to play here. ;-)
Yes the tutorial does not replace the spec and i am working to clarify
things such as this in the JDBC 4 spec