setAutoCommit(false) in constructor
Posted on 2002-04-11
I have a java application,which does some database transactions.The connection object is initialized in the constructor.I have a transaction set in which i am setting the AutoCommit(false) in the constructor.The problem is in my main method even if i dont explicitly commit(),the transaction is getting commited.But if i set the AutoCommit(false) in the main other than the constructor then it is working fine.Can anyone help me with the reason behind the same.
The bottomline ---If i set autocommit(false) in constructor ,it does not take efect.
But does if the autocommit is set in main().
I am using jdk1.2.2,oracle8.1.6,thin driver