Hi, On 11/5/07, Dan Diephouse wrote: > This is probably a
horrendously stupid question, but I'm hoping someone > can help
me figure out how to enforce constraints nodes. I'm writing a >
JCR store for Abdera to store Atom entries. I'm creating a node
for each > entry and one of the properties on the node is the
"resource name". > (I.e. what's in the HTTP URL -
/my_entry.atom). I don't ever want to > have multiple nodes with
the same resource name property. Whats the best > way to enforce
this so I can never have two threads create the same > resource
at the same time? There's nothing like a UNIQUE constraint in
JCR or Jackrabbit (though it might be good to have at least a
Jackrabbit feature request in Jira for that), so the closest you
can get probably to make the "resource name" be the name of the
entry node and have all the entries stored as children of a
parent node that doesn't allow same-name-siblings. Alternatively
you need to implement that constraint in your code. Whenever
creating a new node (or modif