1 | status = Status.STATUS_PREPARING;↵ | | 1 | status = Status.STATUS_PREPARING;↵
|
|
2 | for ( int i = 0; i < synchronizations.size(); i++ ) {↵ | | 2 | for ( int i = 0; i < synchronizations.size(); i++ ) {↵
|
3 | Synchronization s = ( Synchronization ) synchronizations.get( i );↵ | | 3 | Synchronization s = ( Synchronization ) synchronizations.get( i );↵
|
4 | s.beforeCompletion();↵ | | 4 | s.beforeCompletion();↵
|
5 | }↵ | | 5 | }↵
|
|
6 | status = Status.STATUS_COMMITTING;↵ | | 6 | status = Status.STATUS_COMMITTING;↵
|
|
7 | if ( connection != null ) {↵ | | 7 | if ( connection != null ) {↵
|
8 | try {↵ | | 8 | try {↵
|
9 | connection.commit();↵ | | 9 | connection.commit();↵
|
10 | connection.close();↵ | | 10 | connection.close();↵
|
11 | }↵ | | 11 | }↵
|
12 | catch ( SQLException sqle ) {↵ | | 12 | catch ( SQLException sqle ) {↵
|
13 | status = Status.STATUS_UNKNOWN;↵ | | 13 | status = Status.STATUS_UNKNOWN;↵
|
14 | throw new SystemException();↵ | | 14 | throw new SystemException();↵
|
15 | }↵ | | 15 | }↵
|
16 | }↵ | | 16 | }↵
|
|
17 | status = Status.STATUS_COMMITTED;↵ | | 17 | status = Status.STATUS_COMMITTED;↵
|
|
18 | for ( int i = 0; i < synchronizations.size(); i++ ) {↵ | | 18 | for ( int i = 0; i < synchronizations.size(); i++ ) {↵
|
19 | Synchronization s = ( Synchronization ) synchronizations.get( i );↵ | | 19 | Synchronization s = ( Synchronization ) synchronizations.get( i );↵
|
20 | s.afterCompletion( status );↵ | | 20 | s.afterCompletion( status );↵
|
21 | }↵ | | 21 | }↵
|
|
22 | //status = Status.STATUS_NO_TRANSACTION;↵ | | 22 | //status = Status.STATUS_NO_TRANSACTION;↵
|
23 | jtaTransactionManager.endCurrent( this );↵ | | 23 | jtaTransactionManager.endCurrent( this );↵
|
24 | | | 24 |
|