ServiceContext class has methods which synchronize on refreshContext boolean variable. Java typically creates only two objects of boolean type. So its better to synchronize on a different object lock. I've tested this behavior on a test code, and indeed it seemed that java just had two objects for boolean type.
Since the ServiceContext is used quite frequently, the synchronization policy selected will impact performance.