docs: public SIBusMessage receiveWithWait(SITransaction tran, long timeout)
        throws SISessionUnavailableException, SISessionDroppedException,
               SIConnectionUnavailableException, SIConnectionDroppedException,
               SIResourceException, SIConnectionLostException, SILimitExceededException,
               SIErrorException,
               SINotAuthorizedException,
               SIIncorrectCallException
     {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "receiveWithWait", new Object[] {tran, ""+timeout});
  
        SIBusMessage mess = null;
  
        if (state == StateEnum.CLOSED || state == StateEnum.CLOSING) {
          throw new SISessionUnavailableException(nls.getFormattedMessage("SESSION_CLOSED_SICO1013", null, null));
        }
  
        executingReceiveWithWait = true;
  
        // XCT instrumentation for SIBus
        //lohith liberty change
      /*  if (XctSettings.isAnyEnabled())
        {
           Xct xct = Xct.current();
           if(xct.annotationsEnabled())
           {
              Annotation annotation= new Annotation(XctJmsConstants.XCT_SIBUS).add(XctJmsConstants.XCT_PROXY_RECEIVE_WITH_WAIT);
              annotation.associate(XctJmsConstants.XCT_DEST_NAME,destName);
              annotation.add(new Annotation(XctJmsConstants.XCT_DEST_TYPE).add(destType.toString()));
          
              xct.begin(annotation);
           }
           else
              xct.begin();
        }*/
        
        try
        {
           // Now we need to synchronise on the transaction object if there is one.
           if (tran != null)
           {
              synchronized (tran)
              {
                 // Check transaction is in a valid state.
                 // Enlisted for an XA UOW and not rolledback or
                 // completed for a local transaction.
                 if (!((Transaction) tran).isValid())
                 {
                    throw new SIIncorrectCallException(
                       nls.getFormattedMessage("TRANSACTION_COMPLETE_SICO1022", null, null)
                    );
                 }
  
                 mess = _receiveWithWait(tran, timeout );
              }
           }
           else
           {
              mess = _receiveWithWait(null, timeout);
           }
        } finally {
          executingReceiveWithWait = false;
            
           // XCT instrumentation for SIBus
          
          //lohith liberty change
           if(mess != null)
           {/*
              if (XctSettings.isAnyEnabled())
              {
                 Xct xct = Xct.current();
                 if(xct.annotationsEnabled())
                 {
                    Annotation annotation= new Annotation(XctJmsConstants.XCT_SIBUS).add(XctJmsConstants.XCT_PROXY_RECEIVE_WITH_WAIT);
               
                    String xctCorrelationID = mess.getXctCorrelationID();
      		                
                    if(xctCorrelationID != null)
                    {
                       try
                       {
                          String[] xctIds = Xct.getXctIdsFromString(xctCorrelationID);
                          annotation.associate(XctJmsConstants.XCT_ID,xctIds[0]) ;
                          annotation.associate(XctJmsConstants.XCT_ROOT_ID,xctIds[1]);
                       }
                       catch(IllegalArgumentException e)
                       {
                          //No FFDC Code needed
                          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                             SibTr.debug(tc, "Ignoring: Invalid XCT Correlation ID " + e);
                       }
                    }               
                    xct.end(annotation);                  
                 }
                 else         
                    xct.end();         
              }
           */}
           else
           {/*
              if (XctSettings.isAnyEnabled())
              {
                 Xct xct = Xct.current();
                 if(xct.annotationsEnabled())
                 {
                    Annotation annotation= new Annotation(XctJmsConstants.XCT_SIBUS).add(XctJmsConstants.XCT_PROXY_RECEIVE_WITH_WAIT);            
                    annotation.add(XctJmsConstants.XCT_NO_MESSAGE);
                    xct.end(annotation);                  
                 }
              else         
                 xct.end(); 
              }            
           */}
        }
  
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "receiveWithWait");
        return mess;
  
     }