code: public synchronized Object verifyConnectionListener(ConnectionListener cl) throws ResourceException
     {
        for (Map.Entry<Object, Map<ManagedConnectionPool, ConnectionListener>> entry : transactionMap.entrySet())
        {
           if (entry.getValue().values().contains(cl))
           {
              try
              {
                 TransactionalConnectionManager txCM = (TransactionalConnectionManager)cm;
                 Transaction tx = txCM.getTransactionIntegration().getTransactionManager().getTransaction();
                 Object id = txCM.getTransactionIntegration().getTransactionSynchronizationRegistry().getTransactionKey();
  
                 if (!id.equals(entry.getKey()))
                    return entry.getKey();
              }
              catch (Exception e)
              {
                 throw new ResourceException(e);
              }
           }
        }
  
        return null;
     }
docs: Verify if a connection listener is already in use
  @param cl The connection listener
  @return The transaction object if in use, or null if not
  @exception ResourceException Thrown in case of an error