jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Connor, Brett (LNG-TWY)" <Brett.Con...@lexisnexis.co.uk>
Subject RE: Problem with node.checkin() in same transaction node was created
Date Mon, 22 Sep 2008 17:08:08 GMT
You need checkin() for the first one, after the save(), without any
checkout(). I don't know why you have the error you're getting, your
original code snippet looked ok at a quick glance. Perhaps there is some
other resource involved in the tx that's causing the problem?

WRT root version, if you look at the UUIDs you find that the UUID of the
root version is the same as the first version following the successors
chain. The root version is just a "symbolic link" to the first node, if
that makes sense.


-----Original Message-----
From: kenclark [mailto:kenclark@snet.net] 
Sent: 22 September 2008 17:46
To: users@jackrabbit.apache.org
Subject: Re: Problem with node.checkin() in same transaction node was
created


So then the correct way to handle adding the initial state of the
nt:file node is to do a checkin() immediately after the save, as I have
in my original code snippet?  (Or should I do a checkout() first even
though this is a new node?)

Thanks,
ken


Julian Reschke wrote:
> 
> kenclark wrote:
>> 
>> I reread the spec, and it is still not clear to me what exactly 
>> happens with the root version.  My assumption was that it is, like 
>> you say, exactly like any other version -- it should be a copy of the

>> versioned node as of the time the version was created (i.e. the 
>> initial save of the node).
>> ...
> 
> No, the root version is special; it only acts as root node for the 
> version history (it's the predecessor of the first "real" version).
> 
> BR, Julian
> 
> 

--
View this message in context:
http://www.nabble.com/Problem-with-node.checkin%28%29-in-same-transactio
n-node-was-created-tp19601525p19611941.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


REED ELSEVIER (UK) LIMITED - Registered office - 1-3 STRAND, LONDON WC2N 5JR
Registered in England - Company No. 02746621


Mime
View raw message