Felix Meschberger wrote: > Hi, > > Jukka Zitting schrieb: >> On Wed, Oct 8, 2008 at 4:06 PM, Felix Meschberger <[EMAIL PROTECTED]> wrote: >>> I have the vague guts feeling, that this is not a good idea because it >>> creates too big synchronized blocks. >> Why would that be a problem? By definition we should not be having >> more than one concurrent thread accessing such blocks. > > ehrm, because the synchronized blocks may become too big, which is > always fragile.
IMO synchronizing access on the JCR API level is desirable because it is simple and effective. the synchronization issues we had so far were very difficult to debug or reproduce with a regression test due to the various levels of synchronization. the only disadvantage I see right now is that there might be users that share a session among threads for read-only purpose. those will see a decrease in concurrency. > well, this is an interesting point ;-) While I think a service may > account for some client problems, it may not account for all problems. > Most notably, if a client is violating the contract, the client should > get into trouble I general I agree but when others get in trouble as well then something is wrong with the implementation. i.e. the repository should never get corrupted even when multiple threads use whatever method on a single session. regards marcel
