[resolved] JDBC autocommit false

One Star

[resolved] JDBC autocommit false

Hello All,
I am working with jdbc connection pool and I need to set autocommit to false on jdbc connections and then commit manually. I have connection pool setup in Talend runtime environment and all JDBC components that I used were configured to use data source alias.
My original setup was tJavaflex ->onSubjOK tJDBCRow -> (onSubjOk tJDBCCommit). This setup did not work when I disabled tJDBCCommit despite the fact that I set defaultAutoCommit to false in connection pool config file. When tJDBCCommit was disabled data was still committed to database.
Then I added tJDBCConnection since it has that nice checkbox "Use Auto-Commit" which I unchecked and then I set tJDBCRow to use existing connection from tJDBCConnection. So my setup became as follows:
 tJavaFlex -> onSubjOK ->tJDBCConnection ->onSubjOK ->tJDBCRow ->(onSubjOk tJDBCCommit). 
This also did not work.  Checking the code I was surprised to see that the code generated for tJDBCConnection did not even try to get connection from connection pool datasource.  Looking further I found out that autocommit flag is being set on connection retrieved from connection pool by tJDBCRow but despite that, the job still autocommits. 
I would appreciate any suggestions on how to resolve this issue. I am using Talend Open Studio 6.0 for ESB.
Thank you!
Svetlana
 

Accepted Solutions
One Star

Re: [resolved] JDBC autocommit false

Turned out this doesn't have anything to do with Talend but with AS400 default transaction isolation level which is set to "read uncommitted" :mad:

All Replies
One Star

Re: [resolved] JDBC autocommit false

Turned out this doesn't have anything to do with Talend but with AS400 default transaction isolation level which is set to "read uncommitted" :mad: