>Is it really faster?
In the case where no contention is encountered, the simpler approach avoids an extra object construction, so the answer is "sometimes" ;-). >I didn't want to synchronize on the stub object >itself in case we decide in the future that we have to synchronize other >stub methods. It would be wrong to hold those methods up just to check a >boolean. It's not really the stub that needs synchronizing in this case, >just one tiny little piece of it. I see. On the other hand, there is a greater risk of a coding slip introducing deadlocks. >When the type mapping registration code goes into the service, this whole >if block will go away, so even if it's not perfect, it's only temporary. It's not imperfect. I just wanted to understand why you'd done it that way. Thanks for taking the time to explain it. Glyn