Update of /var/cvs/src/org/mmbase/bridge/implementation
In directory james.mmbase.org:/tmp/cvs-serv21130
Modified Files:
BasicTransaction.java
Log Message:
small utility method to check whether the transaction still corresponds with
somethng in ttrnasaction manager
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/bridge/implementation
Index: BasicTransaction.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/bridge/implementation/BasicTransaction.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- BasicTransaction.java 8 Sep 2008 14:13:21 -0000 1.42
+++ BasicTransaction.java 19 Nov 2008 17:59:33 -0000 1.43
@@ -23,7 +23,7 @@
* which means that changes are committed only if you commit the transaction
itself.
* This mechanism allows you to rollback changes if something goes wrong.
* @author Pierre van Rooden
- * @version $Id: BasicTransaction.java,v 1.42 2008/09/08 14:13:21 ernst Exp $
+ * @version $Id: BasicTransaction.java,v 1.43 2008/11/19 17:59:33 michiel Exp $
*/
public class BasicTransaction extends BasicCloud implements Transaction {
@@ -104,6 +104,10 @@
}
+ boolean verify() {
+ return
BasicCloudContext.transactionManager.getTransactions().containsKey(transactionName);
+ }
+
public synchronized boolean commit() {
if (canceled) {
throw new BridgeException("Cannot commit transaction'" + name + "'
(" + transactionName +"), it was already canceled.");
@@ -148,6 +152,7 @@
+
} catch (TransactionManagerException e) {
// do we drop the transaction here or delete the trans context?
// return false;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs