Hi Ramesh, Thanks for the explanation.
If you are worried about locking a particular location in the workspace tree, you can use a "private" temporary location to construct your node tree, save and then use Workspace.move() to move the tree atomically into the appropriate location without locking the destination at all. Generally, I think that we could look into making removing the illegal state on the parent node for "mergable" child additions and removals. This would require some rework of the Jackrabbit internals but would in my mind be a valuable extension. So if you feel like this would be a good way to resolve your issue in the long term feel free to file a jira issue. regards, david On 8/24/06, Ramesh Devaraj <[EMAIL PROTECTED]> wrote:
Hi I my use case I want minimize time between locking and unlocking. In Detail: 1. I don't to lock the parent node than create a child node than save and unlock it (here other threads working parallel has wait for long time until it is unlocked) 2. If I create a child node than I am not able to lock its parent (API throws the exception "Unable to lock node. Node has pending changes") So I want create node which is not attached/added to the workspace e.g. in the memory Now I can lock the parent node & add the newly created child than save than unlock (here I can save some time between lock and unlock) Regards ramesh -----Ursprüngliche Nachricht----- Von: David Nuescheler [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 24. August 2006 15:54 An: users@jackrabbit.apache.org Betreff: Re: creating node Every node in a workspace has a path. If the path is irrelevant to you application you can for example create all the "unfiled" nodes in a single location say ("/bag"). In my personal experience I have found that users who would like to create nodes without meaningful paths, usually base their content model on a somewhat suboptimal nodetype design and usually do not take the benefits of hierarchical operations into consideration like access control inheritance, deep locks, meaningful exports, etc... Maybe you can elaborate on your use case a little more. regards, david 'users@jackrabbit.apache.org'; '[EMAIL PROTECTED]'
-- ---------------------------------------------------------------------- http://jcr.day.com JCR in Action! ---------------------------------------< [EMAIL PROTECTED] >--- This message is a private communication. If you are not the intended recipient, please do not read, copy, or use it, and do not disclose it to others. Please notify the sender of the delivery error by replying to this message, and then delete it from your system. Thank you. The sender does not assume any liability for timely, trouble free, complete, virus free, secure, error free or uninterrupted arrival of this e-mail. For verification please request a hard copy version. mailto:[EMAIL PROTECTED] http://www.day.com David Nuescheler Chief Technology Officer Day Software AG Barfuesserplatz 6 / Postfach 4001 Basel Switzerland T 41 61 226 98 98 F 41 61 226 98 97