From 2b7e92d9f68d2372bd16a1f8f9f5bdfb19099cce Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 15 Mar 2007 16:19:28 +0000 Subject: [PATCH] * Change res.abort() semantics: Just abort transaction and do not stop request execution, since we now have res.stop() to do the latter. --- src/helma/framework/ResponseBean.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/helma/framework/ResponseBean.java b/src/helma/framework/ResponseBean.java index 9a9c4b2a..6c11fd17 100644 --- a/src/helma/framework/ResponseBean.java +++ b/src/helma/framework/ResponseBean.java @@ -525,12 +525,17 @@ public class ResponseBean implements Serializable { } /** - * Abort the current transaction by throwing an Error + * Abort the current transaction and start a new one * - * @throws AbortException + * @throws Exception */ - public void abort() throws AbortException { - throw new AbortException(); + public void abort() throws Exception { + if (Thread.currentThread() instanceof Transactor) { + Transactor tx = (Transactor) Thread.currentThread(); + String tname = tx.getTransactionName(); + tx.abort(); + tx.begin(tname); + } } }