Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Alice Newsgroups: comp.lang.java.programmer Subject: Re: static synchronized method Date: Wed, 27 Jul 2011 22:04:48 -0400 Organization: Ain't got none sorry Lines: 22 Message-ID: References: <0e62fc71-0ae6-408c-9e93-c43b3b7c56f0@28g2000pry.googlegroups.com> <5e8aeead-b963-4c96-a757-f1c22f719462@r5g2000prf.googlegroups.com> NNTP-Posting-Host: mv3kRe1TBhjPaJQkaBzPqw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: WinVN 0.99.12z (x86 32bit) X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6624 On 27/07/2011 5:06 PM, lewbloch wrote: > Henderson wrote: >> The main concern, instead, is invariant violation when the design >> expects a singleton of some sort: a single global registry of some sort, >> a single global interning cache, a single INSTANCE reference to a single >> singleton instance such as what java.awt.Toolkit.getDefaultToolkit() >> returns, etc.; if there are suddenly two of a thing like that when the >> design calls for exactly one, then problems can ensue, but problems that >> have nothing to do with concurrency and data races. > > Classloaders define a sort of namespace wherein the "same" class from > two different classloaders is actually two different classes. Like so > much in Java, this is a very powerful technique that can mess you up a > lot if you're careless or don't fully grasp the consequences. Classic pontification. > Classloader magic is one of those "here there be dragons" regions of > Java. I've dabbled in it, but I am Dukas' Sorcerers Apprentice when > it comes to their use. Classic pontification.