public boolean isSameRM(XAResource xaRes) throws XAException
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "isSameRM", xaRes);

      boolean result = false;

      // If the passed in XAResource is not a client proxy version
      // don't even try - there is no way for us to know here
      if (xaRes instanceof OptimizedSIXAResourceProxy)
      {
         // We have no idea what the state of the other connection is in here,
         // so catch anything it might throw - just to be on the safe side.
         try
         {
            SICoreConnection thisConnection = ((ClientConversationState) getConversation().getAttachment()).getSICoreConnection();
            SICoreConnection otherConnection = ((ClientConversationState) ((OptimizedSIXAResourceProxy) xaRes).getConversation().getAttachment()).getSICoreConnection();

            result = thisConnection.isEquivalentTo(otherConnection);
         }
         catch (Throwable t)
         {
            // No FFDC code needed
            // They must have passed in an invalid type of connection, or one that
            // was null, or closed - so we would assume they are not equal. For helpfulness
            // though, print out the exception
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Caught an exception comparing the connections", t);
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.exception(this, tc, t);
         }
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "isSameRM", ""+result);
      return result;
   }
public boolean isSameRM ( XAResource xaRes ) throws XAException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "isSameRM" , xaRes ) ; boolean result = false ; if ( xaRes instanceof OptimizedSIXAResourceProxy ) { try { SICoreConnection thisConnection = ( ( ClientConversationState ) getConversation ( ) . getAttachment ( ) ) . getSICoreConnection ( ) ; SICoreConnection otherConnection = ( ( ClientConversationState ) ( ( OptimizedSIXAResourceProxy ) xaRes ) . getConversation ( ) . getAttachment ( ) ) . getSICoreConnection ( ) ; result = thisConnection . isEquivalentTo ( otherConnection ) ; } catch ( Throwable t ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Caught an exception comparing the connections" , t ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . exception ( this , tc , t ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "isSameRM" , "" + result ) ; return result ; }
@see XAResource#isSameRM(javax.transaction.xa.XAResource)