1 | private class SetAutoCommitTask implements Runnable {↵ | | 1 | private class SetAutoCommitTask implements Runnable {↵
|
2 | ↵ | | 2 | ↵
|
3 | public void run() {↵ | | 3 | public void run() {↵
|
4 | final ISQLConnection conn = _session.getSQLConnection();↵ | | 4 | final ISQLConnection conn = _session.getSQLConnection();↵
|
5 | final SessionProperties props = _session.getProperties();↵ | | 5 | final SessionProperties props = _session.getProperties();↵
|
6 | if (conn != null)↵ | | 6 | if (conn != null)↵
|
7 | {↵ | | 7 | {↵
|
8 | boolean auto = true;↵ | | 8 | boolean auto = true;↵
|
9 | try↵ | | 9 | try↵
|
10 | {↵ | | 10 | {↵
|
11 | auto = conn.getAutoCommit();↵ | | 11 | auto = conn.getAutoCommit();↵
|
12 | }↵ | | 12 | }↵
|
13 | catch (SQLException ex)↵ | | 13 | catch (SQLException ex)↵
|
14 | {↵ | | 14 | {↵
|
15 | s_log.error("Error with transaction control", ex);↵ | | 15 | s_log.error("Error with transaction control", ex);↵
|
16 | _session.showErrorMessage(ex);↵ | | 16 | _session.showErrorMessage(ex);↵
|
17 | }↵ | | 17 | }↵
|
18 | try↵ | | 18 | try↵
|
19 | {↵ | | 19 | {↵
|
20 | conn.setAutoCommit(props.getAutoCommit());↵ | | 20 | conn.setAutoCommit(props.getAutoCommit());↵
|
21 | }↵ | | 21 | }↵
|
22 | catch (SQLException ex)↵ | | 22 | catch (SQLException ex)↵
|
23 | {↵ | | 23 | {↵
|
24 | props.setAutoCommit(auto);↵ | | 24 | props.setAutoCommit(auto);↵
|
25 | _session.showErrorMessage(ex) | | 25 | _session.showErrorMessage(ex)
|