protected boolean matchBranchCoupling ( int couplingType1 , int couplingType2 , ManagedConnectionFactory managedConnectionFactory ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; boolean matched = true ; if ( isJDBC && couplingType1 != couplingType2 ) { // ResourceRefInfo.BRANCH_COUPLING_UNSET can default to BRANCH_COUPLING_TIGHT or BRANCH_COUPLING_LOOSE if ( couplingType1 == ResourceRefInfo . BRANCH_COUPLING_UNSET ) couplingType1 = ( ( WSManagedConnectionFactory ) managedConnectionFactory ) . getDefaultBranchCoupling ( ) ; else if ( couplingType2 == ResourceRefInfo . BRANCH_COUPLING_UNSET ) couplingType2 = ( ( WSManagedConnectionFactory ) managedConnectionFactory ) . getDefaultBranchCoupling ( ) ; matched = couplingType1 == couplingType2 ; } if ( isTraceOn && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Match coupling request for " + couplingType1 + " and " + couplingType2 + " match is " + matched ) ; } return matched ; }
May be called if couplingType indicates LOOSE or TIGHT or is UNSET