3 Replies Latest reply on Jan 9, 2003 10:12 AM by David Ward

    disabling autocommit for Oracle (non-XA) datasource

    Kevin Shuk Newbie

      Hello,

      I'm using jboss 3.0.4 and I'm wondering if there's a way to disable autocommit in a connection pool configuration based on the oracle-service.xml example?

      The situation is that I've got a select...for update, and executing this throws a SQLException because Oracle generated an "ORA-01002: fetch out of sequence" error. Looking this up on metalink, I see that I need to disable autocommit. Frankly, I didn't even realize it was even and I don't want autocommit on - it wasn't on when the app was running under JBoss 2.4.4.

      I've found some information in the QuickStart guide, Chapter 10 written by David Jencks. The bit about which Connection Manager to use seems related - I'm using the LocalTxConnectionManager and not the NoTxConnection Manager.

      Do I have to now call the setAutoCommit method of the connection object to turn it off every time I get a connection? Again, this wasn't an issue with connection pools under 2.4.4.

      Do I have to use the Oracle XA configuration instead? I hope not because I've been there and it opens a whole 'nother can of (strange) worms.

      Thanks in advance