Depending on it might cause issues. API Manager had to face some complexities on Postgre. These however were because API Manager depended on defaultAutoCommit to be false, not true. I guess it can have its complications on various DB engines.
And as a best practise I think its better to not depend on it. Later if you introduce complex transactions, you'll have to take the control of the commits into your source anyway. Thanks, NuwanD. On Mon, Nov 23, 2015 at 4:03 PM, Isuru Perera <isu...@wso2.com> wrote: > Hi, > > When we write JDBC code, is it okay if we depend on auto commit in the > connection we get from the DataSource? > > The JDBC Reporter for Metrics [1] depends on auto commit "true" value set > in the DataSource configuration. The JDBC reporter doesn't have any complex > transactions and I thought it should be okay to depend on auto commit. > > WDYT? > > Thanks! > > Best Regards, > > [1] > https://github.com/wso2/carbon-metrics/blob/v1.1.1/components/org.wso2.carbon.metrics.jdbc.reporter/src/main/java/org/wso2/carbon/metrics/reporter/JDBCReporter.java#L233-L258 > > -- > Isuru Perera > Associate Technical Lead | WSO2, Inc. | http://wso2.com/ > Lean . Enterprise . Middleware > > about.me/chrishantha > Contact: +IsuruPereraWSO2 <https://www.google.com/+IsuruPereraWSO2/about> > -- Nuwan Dias Technical Lead - WSO2, Inc. http://wso2.com email : nuw...@wso2.com Phone : +94 777 775 729
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev