public static void rcvXARecover(CommsByteBuffer request, Conversation conversation,
                                   int requestNumber, boolean allocatedFromBufferPool,
                                   boolean partOfExchange)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "rcvXARecover",
                                           new Object[]
                                           {
                                              request,
                                              conversation,
                                              ""+requestNumber,
                                              ""+allocatedFromBufferPool,
                                              ""+partOfExchange
                                            });

      ConversationState convState = (ConversationState) conversation.getAttachment();
      ServerLinkLevelState linkState = (ServerLinkLevelState) conversation.getLinkLevelAttachment();

      try
      {
         int clientTransactionId = request.getInt();
         int flags = request.getInt();

         boolean requiresMSResource = false;
         if (conversation.getHandshakeProperties().getFapLevel() >= JFapChannelConstants.FAP_VERSION_5)
         {
            requiresMSResource = request.get() == 0x01;
         }

         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
         {
            SibTr.debug(tc, "XAResource Object ID", clientTransactionId);
            SibTr.debug(tc, "Flags: ", flags);
         }

         // Get the transaction out of the table
         SITransaction tran = linkState.getTransactionTable().get(clientTransactionId, true);           // D297060
         if (tran == IdToTransactionTable.INVALID_TRANSACTION)
         {
            // This is a odd (but not completely impossible situation to
            // be in).  The client has created an optimized XA transaction
            // (i.e. one in which we get the XA resource and enlist it
            // during the first transacted operation) yet the code that
            // is responsible for doing this has failed to get an XA
            // resource.  The client has then called recover on the
            // resource.  This is a very strange useage pattern for the
            // resource.  Never the less - the only reasonable course
            // of action is to signal a RM error.
            throw new XAException(XAException.XAER_RMERR);
         }

         // Get the actual transaction ...
         SIXAResource xaResource = getResourceFromTran(tran, convState, requiresMSResource);

         // Now call the method on the XA resource
         Xid[] xids = xaResource.recover(flags);
         CommsByteBuffer reply = poolManager.allocate();

         if (xids == null)
         {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "recover() returned null");
            reply.putShort(0);
         }
         else
         {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Serializing " + xids.length + " Xids");

            reply.putShort(xids.length);

            // Now for each one, serialize it and add it to the buffer list to send back
            for (int x = 0; x < xids.length; x++)
            {
               reply.putXid(xids[x]);
            }
         }

         try
         {
            conversation.send(reply,
                              JFapChannelConstants.SEG_XARECOVER_R,
                              requestNumber,
                              JFapChannelConstants.PRIORITY_MEDIUM,
                              true,
                              ThrottlingPolicy.BLOCK_THREAD,
                              null);
         }
         catch (SIException e)
         {
            FFDCFilter.processException(e,
                                        CLASS_NAME + ".rcvXARecover",
                                        CommsConstants.STATICCATXATRANSACTION_XARECOVER_01);

            SibTr.error(tc, "COMMUNICATION_ERROR_SICO2027", e);
         }
      }
      catch (XAException e)
      {
         FFDCFilter.processException(e,
                                     CLASS_NAME + ".rcvXARecover",
                                     CommsConstants.STATICCATXATRANSACTION_XARECOVER_02);

         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "XAException - RC: " + e.errorCode, e);

         StaticCATHelper.sendExceptionToClient(e,
                                               CommsConstants.STATICCATXATRANSACTION_XARECOVER_02,
                                               conversation, requestNumber);
      }

      request.release(allocatedFromBufferPool);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "rcvXARecover");
   }
public static void rcvXARecover ( CommsByteBuffer request , Conversation conversation , int requestNumber , boolean allocatedFromBufferPool , boolean partOfExchange ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "rcvXARecover" , new Object [ ] { request , conversation , "" + requestNumber , "" + allocatedFromBufferPool , "" + partOfExchange } ) ; ConversationState convState = ( ConversationState ) conversation . getAttachment ( ) ; ServerLinkLevelState linkState = ( ServerLinkLevelState ) conversation . getLinkLevelAttachment ( ) ; try { int clientTransactionId = request . getInt ( ) ; int flags = request . getInt ( ) ; boolean requiresMSResource = false ; if ( conversation . getHandshakeProperties ( ) . getFapLevel ( ) >= JFapChannelConstants . FAP_VERSION_5 ) { requiresMSResource = request . get ( ) == 0x01 ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "XAResource Object ID" , clientTransactionId ) ; SibTr . debug ( tc , "Flags: " , flags ) ; } SITransaction tran = linkState . getTransactionTable ( ) . get ( clientTransactionId , true ) ; if ( tran == IdToTransactionTable . INVALID_TRANSACTION ) { throw new XAException ( XAException . XAER_RMERR ) ; } SIXAResource xaResource = getResourceFromTran ( tran , convState , requiresMSResource ) ; Xid [ ] xids = xaResource . recover ( flags ) ; CommsByteBuffer reply = poolManager . allocate ( ) ; if ( xids == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "recover() returned null" ) ; reply . putShort ( 0 ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Serializing " + xids . length + " Xids" ) ; reply . putShort ( xids . length ) ; for ( int x = 0 ; x < xids . length ; x ++ ) { reply . putXid ( xids [ x ] ) ; } } try { conversation . send ( reply , JFapChannelConstants . SEG_XARECOVER_R , requestNumber , JFapChannelConstants . PRIORITY_MEDIUM , true , ThrottlingPolicy . BLOCK_THREAD , null ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , CLASS_NAME + ".rcvXARecover" , CommsConstants . STATICCATXATRANSACTION_XARECOVER_01 ) ; SibTr . error ( tc , "COMMUNICATION_ERROR_SICO2027" , e ) ; } } catch ( XAException e ) { FFDCFilter . processException ( e , CLASS_NAME + ".rcvXARecover" , CommsConstants . STATICCATXATRANSACTION_XARECOVER_02 ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "XAException - RC: " + e . errorCode , e ) ; StaticCATHelper . sendExceptionToClient ( e , CommsConstants . STATICCATXATRANSACTION_XARECOVER_02 , conversation , requestNumber ) ; } request . release ( allocatedFromBufferPool ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "rcvXARecover" ) ; }
Calls recover() on the SIXAResource.

Fields:

BIT16    XAResourceId
BIT32    Flags

@param request
@param conversation
@param requestNumber
@param allocatedFromBufferPool
@param partOfExchange