PK57207 Called when adding this reference to a
reference stream when to specify that
sib.msgstore.jdbcSpillSizeRefsByMsgSize has been enabled
433389
public void setSizeRefsByMsgSize(boolean sizeByMsgSize)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setSizeRefsByMsgSize", Boolean.valueOf(sizeByMsgSize));

        this._sizeRefsByMsgSize = sizeByMsgSize;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setSizeRefsByMsgSize");
    }
600019
@Override
    public void setLimitOfTokenSize(int size) {
        if (0 >= size) {
            throw new IllegalArgumentException("Invalid limit on token size: " + size);
        }
        this.limitTokenSize = size;
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Limit on token size now: " + this.limitTokenSize);
        }
    }
68540
public PtoPMessageItemStream addNewRemotePtoPLocalization(
    TransactionCommon transaction,
    SIBUuid8 messagingEngineUuid,
    LocalizationDefinition destinationLocalizationDefinition,
    boolean queuePoint,
    AbstractRemoteSupport remoteSupport) throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "addNewRemotePtoPLocalization",
        new Object[] {
          transaction,
          messagingEngineUuid,
          destinationLocalizationDefinition,
          Boolean.valueOf(queuePoint),
          remoteSupport });

    PtoPMessageItemStream newMsgItemStream = null;

    // Add to the MessageStore
    try
    {

        if (queuePoint)
        {
          newMsgItemStream =
            new PtoPXmitMsgsItemStream(_baseDestinationHandler, messagingEngineUuid);
        }

      transaction.registerCallback(
        new LocalizationAddTransactionCallback(newMsgItemStream));

      Transaction msTran = _messageProcessor.resolveAndEnlistMsgStoreTransaction(transaction);
      _baseDestinationHandler.addItemStream(newMsgItemStream, msTran);

      // Set the default limits
      newMsgItemStream.setDefaultDestLimits();
      // Setup any message depth interval checking (510343)
      newMsgItemStream.setDestMsgInterval();

      attachRemotePtoPLocalisation(newMsgItemStream, remoteSupport);
    }
    catch (OutOfCacheSpace e)
    {
      // No FFDC code needed

      SibTr.exception(tc, e);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "addNewRemotePtoPLocalization", "SIResourceException");

      throw new SIResourceException(e);
    }
    catch (MessageStoreException e)
    {
      // MessageStoreException shouldn't occur so FFDC.
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.impl.destination.LocalisationManager.addNewRemotePtoPLocalization",
        "1:1562:1.30",
        this);

      SibTr.exception(tc, e);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "addNewRemotePtoPLocalization", e);

      throw new SIResourceException(e);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "addNewRemotePtoPLocalization", newMsgItemStream);

    return newMsgItemStream;
  }
684797
public final synchronized void commitDecrementReferenceCount(PersistentTransaction transaction) throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "commitDecrementReferenceCount");

        if (_referenceCount < 1)
        {
            SevereMessageStoreException e = new SevereMessageStoreException("Reference count decrement cannot be committed");
            FFDCFilter.processException(e, "com.ibm.ws.sib.msgstore.cache.links.ItemLink.commitDecrementReferenceCount", "1:131:1.104.1.1");
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Reference count decrement cannot be committed");
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "commitDecrementReferenceCount");
            throw e;
        }
        _referenceCount--;

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "reference count dropped to: " + _referenceCount);

        if (0 == _referenceCount)
        {
            // This causes the item's itemReferencesDroppedToZero to be called after
            // completion of this transaction
            transaction.registerCallback(this);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "commitDecrementReferenceCount");
    }
167563
@Override
    public void setJMSCorrelationIDAsBytes(byte[] cidB) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setJMSCorrelationIDAsBytes", cidB);

        try {
            // and set this into the JS msg
            msg.setCorrelationIdAsBytes(cidB);
            // Invalidate the toString cache
            cachedToString = null;
        } catch (IllegalArgumentException iae) {
            // No FFDC code needed
            // d238447 FFDC review. App' error, no FFDC required.
            throw (JMSException) JmsErrorUtils.newThrowable(JMSException.class,
                                                            "INVALID_VALUE_CWSIA0116",
                                                            new Object[] { "JMSCorrelationID", cidB },
                                                            iae,
                                                            null, // null ProbeId = no FFDC
                                                            this,
                                                            tc
                            );
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setJMSCorrelationIDAsBytes");
    }
1209417
private final void consumeNonPersistentMessages(java.util.ArrayList consumeList)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "consumeNonPersistentMessages", consumeList);

    // use a local transaction to consume all these messages
    LocalTransaction tran = parent.getLocalTransaction();
    try
    {
      Transaction msTran = parent.getMessageProcessor().resolveAndEnlistMsgStoreTransaction(tran);
      int length = consumeList.size();
      for (int i = 0; i < length; i++)
      {
        AOValue value = (AOValue) consumeList.get(i);
        dem.removeTimeoutEntry(value);
        SIMPMessage msgItem = consumerDispatcher.getMessageByValue(value);

        // PK67067 We may not find a message in the store for this tick, because
        // it may have been removed using the SIBQueuePoint MBean
        if (msgItem != null) msgItem.remove(msTran, msgItem.getLockID());
      }
      tran.commit();
    }
    catch (Exception e)
    {
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.impl.AOStream.consumeNonPersistentMessages",
        "1:2792:1.80.3.24",
        this);
      SibTr.exception(tc, e);
      
      // No matter what happens above we try to commit the transaction as we're simply
      // trying to get rid of these messages and there's no point keeping them in
      // the case of a failure
      try
      {
        tran.commit();
      }
      catch (SIException e2)
      {
        // No FFDC code needed
        
        // We really don't care about a problem in this commit
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          SibTr.debug(tc, "commit failed " + e2);
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "consumeNonPersistentMessages");
  }
413632
public final synchronized void incrementReferenceCount() throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "incrementReferenceCount");

        if (_referenceCountIsDecreasing)
        {
        	if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Cannot increment! Reference count has begun decreasing.");
        	if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "incrementReferenceCount");
            throw new SevereMessageStoreException("Cannot add more references to an item after one has been removed");
        }
        _referenceCount++;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "incrementReferenceCount");
    }
1092451
@Override
    public ManagedServiceFactory addingService(ServiceReference<ManagedServiceFactory> reference) {
        String[] factoryPids = getServicePid(reference);
        if (factoryPids == null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "handleRegistration(): Invalid service.pid type: " + reference);
            }

            return null;
        }

        ManagedServiceFactory msf = context.getService(reference);
        if (msf == null)
            return null;

        synchronized (caFactory.getConfigurationStore()) {

            for (String factoryPid : factoryPids) {
                add(reference, factoryPid, msf);
            }
        }

        return msf;
    }
1251784
private void parseMsgSize(Map<Object, Object> props) {
        String value = (String) props.get(HttpConfigConstants.PROPNAME_MSG_SIZE_LIMIT);
        if (null != value) {
            try {
                this.msgSizeLimit = Long.parseLong(value);
                if (HttpConfigConstants.UNLIMITED > getMessageSize()) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                        Tr.event(tc, "Config: Invalid size, setting to unlimited: " + this.msgSizeLimit);
                    }
                    this.msgSizeLimit = HttpConfigConstants.UNLIMITED;
                }
            } catch (NumberFormatException e) {
                // no FFDC required
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Config: Invalid maximum message size; " + value);
                }
            }
        }
    }
767513
public final void increaseReadBufferSize() {
        if (AbstractIoSessionConfig.ENABLE_BUFFER_SIZE) {
            System.out.println("AbstractIoSession.increaseReadBufferSize()");
            int newReadBufferSize = getConfig().getReadBufferSize() << 1;
            if (newReadBufferSize <= getConfig().getMaxReadBufferSize()) {
                getConfig().setReadBufferSize(newReadBufferSize);
            } else {
                getConfig().setReadBufferSize(getConfig().getMaxReadBufferSize());
            }
        }

        deferDecreaseReadBuffer = true;
    }
76566
private void parseLimitMessageSize(Map<Object, Object> props) {
        Object value = props.get(HttpConfigConstants.PROPNAME_MSG_SIZE_LIMIT);
        if (null != value) {
            try {
                this.limitMessageSize = convertLong(value);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Config: Message size limit is " + getMessageSizeLimit());
                }
            } catch (NumberFormatException nfe) {
                FFDCFilter.processException(nfe, getClass().getName() + ".parseLimitMessageSize", "1");
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Config: Invalid message size limit; " + value);
                }
            }
        }
    }
1285613
void setSize(int size) {
        if (this.size != 0) {
            final String fmt = "column size is known: %d";
            final String msg = format(fmt, this.size);
            throw new IllegalStateException(msg);
        }
        this.size = size;
        this.hash = hash();
    }
945729
@Override
    protected JsJmsMessage getMsgReference() throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getMsgReference");

        // If the body is read only, the contents should already be in the
        // JS message, so only do the copy over if we are in write mode.
        // SIB0121: ... and if the producer might modify the payload after it's been set
        if (!isBodyReadOnly() && !producerWontModifyPayloadAfterSet) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(this, tc, "Body is writeable & producer hasn't promised not to modify the payload - attempt encoding");

            try {
                int encoding = integerEncoding | floatEncoding; // NB bitwise or (|), not logical or (||)
                // check if JMS_IBM_Encoding has been set
                if (propertyExists(ApiJmsConstants.ENCODING_PROPERTY)) {
                    encoding = getIntProperty(ApiJmsConstants.ENCODING_PROPERTY);
                }

                if (bodySetInJsMsg && (encoding == lastEncoding)) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                        SibTr.debug(this, tc, "Body cached - encoding not necessary");
                }
                else {
                    // flatten and encode the data streams
                    byte[] encodedBody = _exportBody(encoding);
                    // and set it into the Jetstream message
                    jsBytesMsg.setBytes(encodedBody);
                    lastEncoding = encoding;
                    bodySetInJsMsg = true;
                }
            }

            catch (JMSException e) {
                // No FFDC code needed

                // d222942 review JMSException could be thrown by _exportBody if passed an unknown
                // value for encoding, or if there was an IO error handling the streams. These already
                // have good nls messages, so we should simply pass on, not wrap with a generic message.
                // Similarly, getIntProperty can throw a JMSException which can also be passed on.
                throw e;
            }

        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getMsgReference", jsBytesMsg);
        return jsBytesMsg;
    }
228841
public final void ruleJvmParameterizedTypeReference() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:1679:2: ( ( ( rule__JvmParameterizedTypeReference__Group__0 ) ) )
            // InternalXbase.g:1680:2: ( ( rule__JvmParameterizedTypeReference__Group__0 ) )
            {
            // InternalXbase.g:1680:2: ( ( rule__JvmParameterizedTypeReference__Group__0 ) )
            // InternalXbase.g:1681:3: ( rule__JvmParameterizedTypeReference__Group__0 )
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getJvmParameterizedTypeReferenceAccess().getGroup()); 
            }
            // InternalXbase.g:1682:3: ( rule__JvmParameterizedTypeReference__Group__0 )
            // InternalXbase.g:1682:4: rule__JvmParameterizedTypeReference__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__JvmParameterizedTypeReference__Group__0();

            state._fsp--;
            if (state.failed) return ;

            }

            if ( state.backtracking==0 ) {
               after(grammarAccess.getJvmParameterizedTypeReferenceAccess().getGroup()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
264062
@Override
    public void setJMSRedelivered(boolean arg0) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setJMSRedelivered", arg0);

        if (arg0 == false) {
            // This is well defined.
            msg.setRedeliveredCount(0);
        }
        else {
            // This is quite arbitrary, however the user application only calls
            // this if the want to alter the value after the message has been received,
            // in which case they get what they deserve.
            msg.setRedeliveredCount(1);
        }

        // Invalidate the toString cache
        cachedToString = null;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setJMSRedelivered");
    }
1067095
public void verifyMessageSize(int maxMessageSize) {
       Iterator<MessageAndOffset> shallowIter =  internalIterator(true);
       while(shallowIter.hasNext()) {
           MessageAndOffset messageAndOffset = shallowIter.next();
           int payloadSize = messageAndOffset.message.payloadSize();
           if(payloadSize > maxMessageSize) {
               throw new MessageSizeTooLargeException("payload size of " + payloadSize + " larger than " + maxMessageSize);
           }
       }
    }
965972
private void addBestEffortMessage(SIMPMessage msgItem) throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "addBestEffortMessage", new Object[] { msgItem });
    
    // Get the JsMessage as we need to update the Guaranteed fields
    JsMessage jsMsg = msgItem.getMessage();
 
    long tick = this.messageProcessor.nextTick();

    //Set a unique id in the message if explicitly told to or
    //if one has not already been set
    if(msgItem.getRequiresNewId()  ||  jsMsg.getSystemMessageId()==null)
    {
      jsMsg.setSystemMessageSourceUuid(this.messageProcessor.getMessagingEngineUuid());
      jsMsg.setSystemMessageValue(tick);
      msgItem.setRequiresNewId(false);
    }

    jsMsg.setGuaranteedValueEndTick(tick);
    jsMsg.setGuaranteedValueValueTick(tick);
    jsMsg.setGuaranteedValueRequestedOnly(false);

    // Keep MFP happy
    jsMsg.setGuaranteedValueStartTick(-1);
    jsMsg.setGuaranteedValueCompletedPrefix(-1);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "addBestEffortMessage");
  }