Subject | Re: Inconsistent read / writes |
---|---|
Author | rrokytskyy |
Post date | 2002-08-22T10:24:52Z |
Hi,
transaction associated with a connection. JCA-JDBC driver uses lazy
transaction initialization, InterClient might start transaction when
connecting to database. This is implementation specific.
You can rely on:
a) if you run in autocommit mode, each statement has its own
transaction;
b) after commit() or rollback() new transaction is always started;
c) transaction is committed and new transaction is started when you
change the autocommit mode or transaction isolation level.
Best regards,
Roman Rokytskyy
> From what I understand, apparently a transaction is created thenYou cannot rely on this. According to JDBC specs, there is always
> when I call "getConnection()" (using Interclient) and that
> transaction is not released until I destroy that Java connection?
> Wouldn't it be more correct if the transaction was created on
> calling the createStatement() or executeQuery(..) functions?
transaction associated with a connection. JCA-JDBC driver uses lazy
transaction initialization, InterClient might start transaction when
connecting to database. This is implementation specific.
You can rely on:
a) if you run in autocommit mode, each statement has its own
transaction;
b) after commit() or rollback() new transaction is always started;
c) transaction is committed and new transaction is started when you
change the autocommit mode or transaction isolation level.
Best regards,
Roman Rokytskyy