I have codes in jsp where I grab a database connection, set auto commit to <b>false</b>, did an update via executeUpdate and rollback. What happens is... when I display the auto commit status using getAutoCommit(), it shows true, and the data are updated to the database. <br><br> I'm using JDK 1.3.1 and Oracle DB 9.0.1.3. <br><br> Below is an extract of my code. <br>
try {<br> Context ic = new InitialContext();<br> DataSource ds = (DataSource)ic.lookup((String) application.getAttribute("dataSource"));<br> con = ds.getConnection();<br>
con.setAutoCommit(false); <br> out.println(con.getAutoCommit()); // displayed true during execution.<br>
Hi, Yes this kind arises some time....solution is .. To make autoCommit mode off /on You need to use the property 'SelectMethod' for the driver in the URL and set it to 'cursor'