Jagadish Prasath Ramu wrote:
> In this case, I get a connection (XAConnection) from the datasource
> and do a query. This connection's auto-commit value is false.
> According to the JDBC 3.0 Specification, auto-commit need to be true
> when created. [ my case ]
> Only when the connection is taking part in a transaction, setting
> auto-commit value is not allowed.
>
> Since I am using the connection without any transaction context,
> auto-commit need to be true in this case according to the
> specification.
The auto-commit mode is specified to be ignored for any connection that is
participating in a non-local transaction. Hence, it doesn't matter whether
auto-commit is true or false in the situation you're talking about. The
behavior is always as if auto-commit is false.
It does seem, though, that the flag should be set to false in order to
comply by-the-letter, as useless as that is.
--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation