Hi,

Would the solution be perhaps to use 2 sessions 
*       One which use only for save Use 
*       Other, for make the handlings

For examples: 

Session s1 = repository.login(new SimpleCredentials("username", 
"password".toCharArray()));

Session s2 = repository.login(new SimpleCredentials("username", 
"password".toCharArray()));

Node root1 = s1.getRootNode();
Node parent = root1.getNode("hello");
Node child_1 = parent.getNode("world");
Child_1.setProperty("message","hello world");


Node child_2 = parend.addNode("newNode");
child_2.setProperty("message","test");

//save only child_1
if (child_1.isNew()) {
     Node root2=s2.getRootNode();
        Node parent_2 =Root2.getNode("hello");
        parent_2.add(child_1);
        parent_2.save();
}
Else {
        child_1.save();
}



Can it be done?, consistent ?
Would it have problems in mode multi user?

Regards,

Christophe

 
-----Message d'origine-----
De : Jukka Zitting [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 1 septembre 2006 16:15
À : [email protected]
Objet : Re: question about save Node

Hi,

On 9/1/06, Stefan Guggisberg <[EMAIL PROTECTED]> wrote:
> that would be a violation of the jsr 170 spec:

Ah, good point.

Hmm, I agree with Jacco that the feature would be quite useful every
now and then. Perhaps I'll suggest to relax that for JSR 283, though
backwards compatibility may prevent the change.

BR,

Jukka Zitting

-- 
Yukatan - http://yukatan.fi/ - [EMAIL PROTECTED]
Software craftsmanship, JCR consulting, and Java development


Reply via email to