jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject Re: [jr3] Synchronized sessions
Date Thu, 25 Feb 2010 14:49:22 GMT

On 24.02.2010 21:19, Thomas Müller wrote:
> Hi,
>> deadlocks
> I think it's relatively simple to synchronize all methods on the session.

Yes, but this creates a big potential for deadlocks ...

>> If we want to make sessions thread-safe, we should use proper
>> implementations.
> Yes, that's what I want to write: a proper implementation.

I disagree that this would be a proper implementation.

>> any concurrent use of the same session is unsupported.
> The disadvantage of this is that there is no way to enforce correct
> usage. In some cases, incorrect usage leads to data corruption. I
> believe data corrupt is not acceptable, even if the user made a
> mistake.

Anything can go wrong -- and if people do the wrong things, well, fine,
let them do ...

And I don't say, we should not make Session thread-safe. But if we set
out to do it, we should do it right. And just synchronizing all methods
is just not right.


View raw message