Hello Guys,<br><br>english is not my mother Tongue, so I hope that I'm able to explain my problem in a way you understand.<br><br>I'm currently developing a Module for Asterisk10. This module accesses some differend Oracle Databases, and for some specific actions I need to start a serialized transaction.<br>
<br>What I've done already:<br><br><u>following Code Snippet should get an independent odbc object:</u><br><br><i><b>struct </b>ast_flags flags = RES_ODBC_INDEPENDENT_CONNECTION;<br>obj = ast_odbc_request_obj2(obj, flags);</i><br>
<br><u>I have set the ODBC's connection args to:</u><br><i><b><br>[test_connection]</b><br>enabled => yes<br>dsn => dsn_xyz<br>username => abc<br>password => abc<br>pooling => yes<br>limit => 10<br>pre-connect => yes<br>
isolation => serializable</i><br><br><u>After requesting the odbc object, I do the following:</u><br><br><i><b>struct </b>generic_prepare_struct gps = { .sql = sql, .argc = argc, .argv = argv, .argTypes = argTypes };<br>
<b>snprintf</b>(sql, <b>sizeof</b>(sql), "SELECT something <u><b>for update</b></u>");<br>stmt = <b>ast_odbc_prepare_and_execute</b>(obj, generic_prepare, &gps);</i><br><br><br>I added a sleep after the execution of the statement and tried to read/modify the data within a different Oracle session from antoher client.<br>
And it worked, but when using a Serialized transaction it shouldn't be possible to read data within another serialized transaction!<br><br>Hopefully someone could help me out here.<br><br>Thanks and best regards.<br>Christoph<br>
<br>PS:<br>When I disable connection pooling and set the transaction Isolation manually it works. (when I activate pooling I always receive an error that SQLSetConnection couldn't be executed<br><b>SQLSetConnectAttr</b>(obj->con, SQL_ATTR_TXN_ISOLATION, (SQLPOINTER)SQL_TXN_SERIALIZABLE, SQL_NTS);<br>
<b>SQLSetConnectAttr</b>(obj->con, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_OFF, SQL_NTS) ;<br>