[ 
https://issues.apache.org/jira/browse/JCR-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694485#action_12694485
 ] 

Marcel Reutegger commented on JCR-2049:
---------------------------------------

While I certainly see the need to support large and long running transactions, 
I don't think this is a viable solution, but rather a workaround.

I think there is no way around a transient space in jackrabbit-core that is 
able to swap out item states. I'll create another issue for that.

> 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.

Reply via email to