1 Reply Latest reply on Jun 16, 2005 1:49 AM by belaban

    Why is GlobalTransaction.create(...) synchronized?


      Is there a particular reason why GlobalTransaction.create(...) is synchronized?

      As far as I can tell, the only thing it's doing that requires synchronization during GlobalTransaction construction is the call to newId() from the GlobalTransaction constructor. Since newId() is already a synchronized method, there seems little sense in holding the exclusive static lock on GlobalTransaction.class for longer than necessary.