[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Failover analysis
timfox
do-not-reply at jboss.com
Tue Jan 9 03:54:52 EST 2007
"ovidiu.feodorov at jboss.com" wrote : Keeping a single centralized valve per connection gives a single point of bottleneck. All threads invoking into any delegate will have to acquire/release the synchronization element of that valve. This will lead to a lot of contention.
|
| Distributing the load across different valve instances will relieve some of this pressure, with no apparent drawback.
|
I don't really agree with this. You would only get a lot of contention if the threads were all attempting to get the same write lock, but in the normal case they would be getting the read lock, and multiple read locks can obtained at any one time - this is kind of the whole point of read locks.
There may be a very small synchronized region in actually executing the call to get the read lock but this is probably insignificant.
If we can reduce the scope for deadlock and make the code simpler by using a single pair of locks I would prefer that solution.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999355#3999355
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999355
More information about the jboss-dev-forums
mailing list