use of org.jumpmind.db.sql.ISqlTransaction in project symmetric-ds by JumpMind.
the class OutgoingBatchService method insertOutgoingBatch.
public void insertOutgoingBatch(final OutgoingBatch outgoingBatch) {
ISqlTransaction transaction = null;
try {
transaction = sqlTemplate.startSqlTransaction();
insertOutgoingBatch(transaction, outgoingBatch);
transaction.commit();
} catch (Error ex) {
if (transaction != null) {
transaction.rollback();
}
throw ex;
} catch (RuntimeException ex) {
if (transaction != null) {
transaction.rollback();
}
throw ex;
} finally {
close(transaction);
}
}
use of org.jumpmind.db.sql.ISqlTransaction in project symmetric-ds by JumpMind.
the class NodeService method updateNodeSecurity.
public boolean updateNodeSecurity(NodeSecurity security) {
ISqlTransaction transaction = null;
try {
transaction = sqlTemplate.startSqlTransaction();
boolean updated = updateNodeSecurity(transaction, security);
transaction.commit();
return updated;
} catch (Error ex) {
if (transaction != null) {
transaction.rollback();
}
throw ex;
} catch (RuntimeException ex) {
if (transaction != null) {
transaction.rollback();
}
throw ex;
} finally {
close(transaction);
}
}
use of org.jumpmind.db.sql.ISqlTransaction in project symmetric-ds by JumpMind.
the class NodeService method setInitialLoadEnabled.
public boolean setInitialLoadEnabled(String nodeId, boolean initialLoadEnabled, boolean syncChange, long loadId, String createBy) {
ISqlTransaction transaction = null;
try {
transaction = sqlTemplate.startSqlTransaction();
boolean updated = setInitialLoadEnabled(transaction, nodeId, initialLoadEnabled, syncChange, loadId, createBy);
transaction.commit();
return updated;
} catch (Error ex) {
if (transaction != null) {
transaction.rollback();
}
throw ex;
} catch (RuntimeException ex) {
if (transaction != null) {
transaction.rollback();
}
throw ex;
} finally {
close(transaction);
}
}
use of org.jumpmind.db.sql.ISqlTransaction in project symmetric-ds by JumpMind.
the class NodeService method setReverseInitialLoadEnabled.
public boolean setReverseInitialLoadEnabled(String nodeId, boolean initialLoadEnabled, boolean syncChange, long loadId, String createBy) {
ISqlTransaction transaction = null;
try {
transaction = sqlTemplate.startSqlTransaction();
boolean updated = setReverseInitialLoadEnabled(transaction, nodeId, initialLoadEnabled, syncChange, loadId, createBy);
transaction.commit();
return updated;
} catch (Error ex) {
if (transaction != null) {
transaction.rollback();
}
throw ex;
} catch (RuntimeException ex) {
if (transaction != null) {
transaction.rollback();
}
throw ex;
} finally {
close(transaction);
}
}
use of org.jumpmind.db.sql.ISqlTransaction in project symmetric-ds by JumpMind.
the class SequenceService method nextVal.
public long nextVal(String name) {
ISqlTransaction transaction = null;
try {
transaction = sqlTemplate.startSqlTransaction();
long val = nextVal(transaction, name);
transaction.commit();
return val;
} catch (Error ex) {
if (transaction != null) {
transaction.rollback();
}
throw ex;
} catch (RuntimeException ex) {
if (transaction != null) {
transaction.rollback();
}
throw ex;
} finally {
close(transaction);
}
}
Aggregations