private static Object getLockOwner(final TransactionSynchronizationRegistry transactionSynchronizationRegistry) {
        Object owner = transactionSynchronizationRegistry.getTransactionKey();
        return owner != null ? owner : Thread.currentThread();
    }
private static Object getLockOwner(final TransactionSynchronizationRegistry transactionSynchronizationRegistry) {
        Object owner = transactionSynchronizationRegistry.getTransactionKey();
        return owner != null ? owner : Thread.currentThread();
    }
private static Object getLockOwner ( final TransactionSynchronizationRegistry transactionSynchronizationRegistry ) { Object owner = transactionSynchronizationRegistry . getTransactionKey ( ) ; return owner != null ? owner : Thread . currentThread ( ) ; }
Use either the active transaction or the current thread as the lock owner

@return The lock owner
Use either the active transaction or the current thread as the lock owner