You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Marcin Cenkier <ma...@cognifide.com> on 2005/10/03 14:44:55 UTC

sequencer in jr

Hi,
I need an integer sequencer in JR. Is there such functionality, or a 
workaround? Creating a node and incrementing its property could work iff 
I could synchronize access to the node, but I don't like the idea of 
locking this node for the time a process increments the value.
Any thoughts?

cheers,
m

-- 
Best Regards,                              Senior developer at Cognifide
Marcin Cenkier                                         www.cognifide.com

Re: sequencer in jr

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi Marcin,

Marcin Cenkier wrote:
> I need an integer sequencer in JR. Is there such functionality, or a 
> workaround? Creating a node and incrementing its property could work iff 
> I could synchronize access to the node, but I don't like the idea of 
> locking this node for the time a process increments the value.
> Any thoughts?

locking the node is the only way to serialize access to a property.

though, it would be interesting to build a decoration layer using the 
jcr-ext in contrib that allows to specify isolation levels for sessions. 
that layer would then provide the functionality your are looking for in 
a transparent manner.

regards
  marcel