jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ducrocq Christophe" <Christophe.Ducr...@atosorigin.com>
Subject RE: question about save Node
Date Fri, 01 Sep 2006 15:46:29 GMT

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:jukka.zitting@gmail.com] 
Envoyé : vendredi 1 septembre 2006 16:15
À : users@jackrabbit.apache.org
Objet : Re: question about save Node

Hi,

On 9/1/06, Stefan Guggisberg <stefan.guggisberg@gmail.com> 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/ - info@yukatan.fi
Software craftsmanship, JCR consulting, and Java development



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message