jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gadbury <gadb...@googlemail.com>
Subject Re: User Managed Transactions...
Date Tue, 28 Jul 2009 16:06:07 GMT

Thank you for the clarification Alex, and for adding the info to the Wiki.

I am using Jackrabbit 1.4 - does it still apply?

When you mention 'in Jackrabbit', do you mean when using Jackrabbit
implementations such as org.apache.jackrabbit.core.SessionImpl and
org.apache.jackrabbit.core.NodeImpl , rather than the core JCR?

I must admit the only Jackrabbit I am currently using is the configuration,
registration of custom node types and registration / unregistration of the
repository in JNDI.

Should I be replacing all of my JCR with Jackrabbit?  I'd like to be sure
that I am using Jackrabbit to ensure UUIDs are already assigned when the
node is created and don't change upon save.

Can JCR and Jackrabbit be interchanged?  i.e. could I use a Jackrabbit
PropertyImpl with a JCR Node?

Sorry for the silly questions!

Kind regards,


Alexander Klimetschek wrote:
> On Tue, Jul 28, 2009 at 4:51 PM, Gadbury<gadbury@googlemail.com> wrote:
>> If I am within a user managed transaction's scope, and I have added a
>> node
>> and then call session.save(), is it safe to rely on that node's UUID or
>> would I have to wait until the transaction has been committed?
>> Here is the excerpt from the JCR 1.0 specification:
>> When UUIDs are Assigned
>>        In some client-server implementations the assignment of a
>> permanent UUID
>> may be done on the server.
>>        In these cases it is not practical for a newly created
>> referenceable node
>> to be given a UUID upon creation.
>>        Rather, it makes more sense for the UUID to be assigned upon save
>> of that
>> node.
>>        In such cases a “dummy UUID” may be assigned on creation of a new
>> node
>> while the real UUID assignment takes place later, upon save.
>>        Applications should not, therefore, rely on the UUID of a node
>> before that
>> node is saved for the first time.
> The spec only talks about creating node vs. save(), but since in case
> of transactions a tx commit comes after a save(), you can be sure that
> the "final" UUID is assigned after your save - you don't have to wait
> for the commit.
> In Jackrabbit, UUIDs are already assigned when the node is created and
> don't change upon save. I added this implementation choice item to
> http://wiki.apache.org/jackrabbit/JcrSpecImplementation
> Regards,
> Alex
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com

View this message in context: http://www.nabble.com/User-Managed-Transactions...-tp24687924p24702610.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message