[concurrency-interest] synchronization edge case

Dhanji R. Prasanna dhanji at gmail.com
Mon Apr 23 23:27:20 EDT 2007


I cite this puzzle from Josh Bloch and Neal Gafter's "Java Puzzlers:"

synchronized(Thread.class) {

I tested this on a webapp deployed into BEA weblogic and it basically locks
down the entire server so that it is effectively dead (doesnt startup,
doesnt accept new deployments, doesnt service any requests, doesnt
shutdown). Java EE servers are supposed to prevent such malarkey by
installing securitymanagers that restrict (direct) access to threading apis.
But how would one do so in such a case?

I assume that internally synchronized(Thread.class) calls Object.wait(), so
is there a way to lock out wait() without AOP-style interception?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20070424/cfa80ad4/attachment.html 

More information about the Concurrency-interest mailing list