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

Adrian Brock abrock at redhat.com
Fri Feb 20 07:27:03 EST 2009


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.

-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-development mailing list