[jboss-dev] Change in locking behavior in MainDeployer [WAS: Port conflict in tx manager - cluster-udp-SYNC-0

Jason T. Greene jason.greene at redhat.com
Fri Feb 20 09:43:11 EST 2009


Adrian Brock wrote:
> On Thu, 2009-02-19 at 16:17 -0600, Brian Stansberry wrote:
>> 1) Is the reason you changed MainDeployerImpl.process() from a shared 
>> lock (lockRead() call) to an exclusive lock (lockWrite() call) because 
>> only a single thread at a time can be allowed to call 
>> deployers.process()? If so we're stuck.
> 
> On the contrary, the read/write lock semantics are supposed to be:
> 
> 1) a read lock is used throughout to allow multi-threaded access unless
> somebody owns a write lock
> 2) the write lock is used at shutdown to stop any other calls from
> entering during the shutdown process and shutdown does not occur
> until other threads have exited the deployers.
> 
> NOTE: before shutdown() enters the write lock it
> sets the deployers into a special mode where the
> process() calls on other threads will exit the next time 
> it hits the check in the relevant loops.
> 

Conversation is continued in forum discussion here:

http://www.jboss.org/index.html?module=bb&op=viewtopic&t=150897

-- 
Jason T. Greene
JBoss, a division of Red Hat



More information about the jboss-development mailing list