Search in sources :

Example 1 with AbstractSqlTransactionMember

use of org.eclipse.scout.rt.server.jdbc.AbstractSqlTransactionMember in project scout.rt by eclipse.

the class StatementProcessor method registerActiveStatement.

protected void registerActiveStatement(Statement s) throws SQLException {
    ITransaction tx = ITransaction.CURRENT.get();
    if (tx == null) {
        return;
    }
    ITransactionMember member = tx.getMember(getCallerService().getTransactionMemberId());
    if (member instanceof AbstractSqlTransactionMember) {
        ((AbstractSqlTransactionMember) member).registerActiveStatement(s);
    }
}
Also used : AbstractSqlTransactionMember(org.eclipse.scout.rt.server.jdbc.AbstractSqlTransactionMember) ITransaction(org.eclipse.scout.rt.platform.transaction.ITransaction) ITransactionMember(org.eclipse.scout.rt.platform.transaction.ITransactionMember)

Example 2 with AbstractSqlTransactionMember

use of org.eclipse.scout.rt.server.jdbc.AbstractSqlTransactionMember in project scout.rt by eclipse.

the class StatementProcessor method unregisterActiveStatement.

protected void unregisterActiveStatement(Statement s) {
    ITransaction tx = ITransaction.CURRENT.get();
    if (tx == null) {
        return;
    }
    ITransactionMember member = tx.getMember(getCallerService().getTransactionMemberId());
    if (member instanceof AbstractSqlTransactionMember) {
        ((AbstractSqlTransactionMember) member).unregisterActiveStatement(s);
    }
}
Also used : AbstractSqlTransactionMember(org.eclipse.scout.rt.server.jdbc.AbstractSqlTransactionMember) ITransaction(org.eclipse.scout.rt.platform.transaction.ITransaction) ITransactionMember(org.eclipse.scout.rt.platform.transaction.ITransactionMember)

Aggregations

ITransaction (org.eclipse.scout.rt.platform.transaction.ITransaction)2 ITransactionMember (org.eclipse.scout.rt.platform.transaction.ITransactionMember)2 AbstractSqlTransactionMember (org.eclipse.scout.rt.server.jdbc.AbstractSqlTransactionMember)2