A tool to support large or long running transactions
----------------------------------------------------
Key: JCR-2049
URL: https://issues.apache.org/jira/browse/JCR-2049
Project: Jackrabbit Content Repository
Issue Type: New Feature
Components: jackrabbit-jcr-commons
Reporter: Thomas Mueller
Assignee: Thomas Mueller
Priority: Minor
I propose to write a tool for large or long running transactions. Instead of
keeping the changes in the transient space until a transaction is completed, a
backup of the current state is stored in a backup area. This allows to save
intermediate steps.
I propose to create add a tool (probably just one class) in the
jackrabbit-jcr-commons project, package org.apache.jackrabbit.commons.tools:
class LargeTransactionTool {
LargeTransactionTool getInstance(Session session, String backupPath);
beginTransaction();
deleteRecursive(Node n);
Node addNode(Node parent, String name);
backup(Node n);
backupRecursive(Node n);
commit();
rollback();
}
An application could then use the tool as follows:
LargeTransactionTool tool = LargeTransactionTool.getInstance(session,
"/backupArea");
tool.backup(n1);
n1.setProperty(...);
session.save();
tool.deleteRecursive(n2);
session.save();
n4 = tool.addNode(n3, "x");
session.save();
tool.commit();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.