protected ConnectionListener findConnectionListener ( ManagedConnection mc , Object c , Collection < ConnectionListener > listeners ) { for ( ConnectionListener cl : listeners ) { if ( cl . getManagedConnection ( ) . equals ( mc ) && ( c == null || cl . getConnections ( ) . contains ( c ) ) ) return cl ; } return null ; }
Find a ConnectionListener instance