jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <dan.diepho...@mulesource.com>
Subject Enforcing constraints; Sessions and Threading
Date Mon, 05 Nov 2007 17:22:32 GMT
Hi all,

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?

Also, can anyone point me to something which highlights how Sessions and 
threads are supposed to work? Are sessions single threaded? Can they be 
shared accross threads for reading? Should I pool them? Do I logout at 
app shut down or when I'm done reading data (it seems the former).

- Dan

-- 
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com/blog


Mime
View raw message