protected int getRequestNumber()
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getRequestNumber");

      int reqnum = -1;

      // Retrieve Client Conversation State if necessary
      validateConversationState();
      
      int initialRequestNumber = -1;
      
      while((reqnum < 0) || (!getConversation().checkRequestNumberIsFree(reqnum)))
      {
    	  // Now get the unique request number
    	  reqnum = cConState.getUniqueRequestNumber();
    	  
    	  if(initialRequestNumber == reqnum)
	      {
    		  // If we get here, request numbers have wrapped. Continue and use the first request number we got.
	    	  // This will cause the old behaviour to throw out the request ID as a 'duplicate request' in JFap's
	    	  // ConversationImpl. It'll manifest as an SIErrorException CWSIJ0046E.
    		  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc,"Request numbers wrapped");
	    	  break;
	      }
          // If initialRequestNumber is less than 0, it's the first time around the loop. So cache the first
	      // request number we got so we can detect wrapping.
	      if(initialRequestNumber < 0) initialRequestNumber = reqnum;
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getRequestNumber", ""+reqnum);
      return reqnum;
   }
protected int getRequestNumber ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getRequestNumber" ) ; int reqnum = - 1 ; validateConversationState ( ) ; int initialRequestNumber = - 1 ; while ( ( reqnum < 0 ) || ( ! getConversation ( ) . checkRequestNumberIsFree ( reqnum ) ) ) { reqnum = cConState . getUniqueRequestNumber ( ) ; if ( initialRequestNumber == reqnum ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Request numbers wrapped" ) ; break ; } if ( initialRequestNumber < 0 ) initialRequestNumber = reqnum ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getRequestNumber" , "" + reqnum ) ; return reqnum ; }
@return Returns a Conversation wide unique request number.