synchronized a section of code that might cause a race condition while trying to get a logical connection that doesn't have a transaction started yet in order to issue a commit prepared.