You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2009/11/17 17:49:39 UTC

[jira] Commented: (JCR-2049) A tool to support large or long running transactions

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

Thomas Mueller commented on JCR-2049:
-------------------------------------

The use case for this tool is "long running" transactions, 
which is a bit different than just "large" transactions:
http://en.wikipedia.org/wiki/Long-running_transaction

But in addition to support long running transactions,
this tool would also support large transactions.

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