You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Ard Schrijvers (JIRA)" <ji...@apache.org> on 2012/05/25 15:30:22 UTC

[jira] [Created] (OCM-49) ObjectContentManagerImpl should not use workspace copy and move but rather do it through the jcr session

Ard Schrijvers created OCM-49:
---------------------------------

             Summary: ObjectContentManagerImpl should not use workspace copy and move but rather do it through the jcr session
                 Key: OCM-49
                 URL: https://issues.apache.org/jira/browse/OCM-49
             Project: Jackrabbit OCM
          Issue Type: Improvement
            Reporter: Ard Schrijvers
            Assignee: Ard Schrijvers
             Fix For: 2.0.0


The OCM interface has the following javadocs for 'save' :


   /**
     * Save all modifications made by the object content manager
     *
     * @throws ObjectContentManagerException
     *             when it is not possible to save all pending operation into
     *             the JCR repo
     */
public void save() throws ObjectContentManagerException;

In my opinion, this implies that a remove, insert, update, copy and move all are not persisted until the save is being called. This is the case for remove, insert and update, but not for copy and move: They are instant due to the workspace copy / move. 

Imo, these should be replaced. The workspace move results in *every* confusing problems. For example currently with workspace move below works:

ocm.insert(a);
ocm.save();
ocm.move("/source", "/result");
assertFalse(ocm.objectExists("/source"));

But, if before the move you fetch the 'source' node (setting it to null, refreshing jcr session etc etc does not help)


ocm.insert(a);
ocm.save();
// due to fetching node here, the unit test start to fail!!
Node n = ocm.getSession().getNode("/source");
ocm.move("/source", "/result");
assertFalse(ocm.objectExists("/source"));




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (OCM-49) ObjectContentManagerImpl should not use workspace move but rather do it through the jcr session

Posted by "Ard Schrijvers (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OCM-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ard Schrijvers updated OCM-49:
------------------------------

    Summary: ObjectContentManagerImpl should not use workspace move but rather do it through the jcr session  (was: ObjectContentManagerImpl should not use workspace copy and move but rather do it through the jcr session)
    
> ObjectContentManagerImpl should not use workspace move but rather do it through the jcr session
> -----------------------------------------------------------------------------------------------
>
>                 Key: OCM-49
>                 URL: https://issues.apache.org/jira/browse/OCM-49
>             Project: Jackrabbit OCM
>          Issue Type: Improvement
>            Reporter: Ard Schrijvers
>            Assignee: Ard Schrijvers
>             Fix For: 2.0.0
>
>
> The OCM interface has the following javadocs for 'save' :
>    /**
>      * Save all modifications made by the object content manager
>      *
>      * @throws ObjectContentManagerException
>      *             when it is not possible to save all pending operation into
>      *             the JCR repo
>      */
> public void save() throws ObjectContentManagerException;
> In my opinion, this implies that a remove, insert, update, copy and move all are not persisted until the save is being called. This is the case for remove, insert and update, but not for copy and move: They are instant due to the workspace copy / move. 
> Imo, these should be replaced. The workspace move results in *every* confusing problems. For example currently with workspace move below works:
> ocm.insert(a);
> ocm.save();
> ocm.move("/source", "/result");
> assertFalse(ocm.objectExists("/source"));
> But, if before the move you fetch the 'source' node (setting it to null, refreshing jcr session etc etc does not help)
> ocm.insert(a);
> ocm.save();
> // due to fetching node here, the unit test start to fail!!
> Node n = ocm.getSession().getNode("/source");
> ocm.move("/source", "/result");
> assertFalse(ocm.objectExists("/source"));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (OCM-49) ObjectContentManagerImpl should not use workspace move but rather do it through the jcr session

Posted by "Ard Schrijvers (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OCM-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ard Schrijvers resolved OCM-49.
-------------------------------

    Resolution: Fixed
    
> ObjectContentManagerImpl should not use workspace move but rather do it through the jcr session
> -----------------------------------------------------------------------------------------------
>
>                 Key: OCM-49
>                 URL: https://issues.apache.org/jira/browse/OCM-49
>             Project: Jackrabbit OCM
>          Issue Type: Improvement
>            Reporter: Ard Schrijvers
>            Assignee: Ard Schrijvers
>             Fix For: 2.0.0
>
>
> The OCM interface has the following javadocs for 'save' :
>    /**
>      * Save all modifications made by the object content manager
>      *
>      * @throws ObjectContentManagerException
>      *             when it is not possible to save all pending operation into
>      *             the JCR repo
>      */
> public void save() throws ObjectContentManagerException;
> In my opinion, this implies that a remove, insert, update, copy and move all are not persisted until the save is being called. This is the case for remove, insert and update, but not for copy and move: They are instant due to the workspace copy / move. 
> Imo, these should be replaced. The workspace move results in *every* confusing problems. For example currently with workspace move below works:
> ocm.insert(a);
> ocm.save();
> ocm.move("/source", "/result");
> assertFalse(ocm.objectExists("/source"));
> But, if before the move you fetch the 'source' node (setting it to null, refreshing jcr session etc etc does not help)
> ocm.insert(a);
> ocm.save();
> // due to fetching node here, the unit test start to fail!!
> Node n = ocm.getSession().getNode("/source");
> ocm.move("/source", "/result");
> assertFalse(ocm.objectExists("/source"));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira