use of com.swiftmq.swiftlet.queue.QueueTransaction in project swiftmq-ce by iitsoftware.
the class TransactionManager method rollback.
synchronized void rollback(boolean start) throws Exception {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + "/rollback");
for (Iterator iter = transactions.iterator(); iter.hasNext(); ) {
QueueTransaction t = (QueueTransaction) iter.next();
t.rollback();
}
if (start)
startTransactions();
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + "/rollback done");
}
use of com.swiftmq.swiftlet.queue.QueueTransaction in project swiftmq-ce by iitsoftware.
the class TransactionManager method commit.
synchronized void commit() throws Exception {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + "/commit");
for (Iterator iter = transactions.iterator(); iter.hasNext(); ) {
QueueTransaction t = (QueueTransaction) iter.next();
t.commit();
}
startTransactions();
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + "/commit done");
}
use of com.swiftmq.swiftlet.queue.QueueTransaction in project swiftmq-ce by iitsoftware.
the class TransactionManager method rollback.
synchronized void rollback(boolean start) throws Exception {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + "/rollback");
for (Iterator iter = transactions.iterator(); iter.hasNext(); ) {
QueueTransaction t = (QueueTransaction) iter.next();
t.rollback();
}
if (start)
startTransactions();
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + "/rollback done");
}
use of com.swiftmq.swiftlet.queue.QueueTransaction in project swiftmq-ce by iitsoftware.
the class TransactionManager method startTransactions.
synchronized void startTransactions() throws Exception {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + "/startTransactions");
transactions.clear();
for (Iterator iter = transactionFactories.iterator(); iter.hasNext(); ) {
TransactionFactory f = (TransactionFactory) iter.next();
if (!f.isMarkedForClose()) {
try {
QueueTransaction t = f.createTransaction();
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + "/startTransactions, add=" + t + ", closed=" + t.isClosed());
transactions.add(t);
} catch (Exception e) {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + "/startTransactions, e=" + e + ", remove transaction factory.");
iter.remove();
}
} else
iter.remove();
}
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + "/startTransactions done");
}
use of com.swiftmq.swiftlet.queue.QueueTransaction in project swiftmq-ce by iitsoftware.
the class TransactionManager method rollback.
synchronized void rollback(boolean start) throws Exception {
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + "/rollback");
for (Iterator iter = transactions.iterator(); iter.hasNext(); ) {
QueueTransaction t = (QueueTransaction) iter.next();
t.rollback();
}
if (start)
startTransactions();
if (ctx.traceSpace.enabled)
ctx.traceSpace.trace("sys$jms", ctx.tracePrefix + "/" + toString() + "/rollback done");
}
Aggregations