docs: private void localPut(
                            MessageItem msg,
                            TransactionCommon transaction)
                      throws
                      SIIncorrectCallException,
                      SIResourceException,
                      SINotPossibleInCurrentConfigurationException,
                      SINotAuthorizedException,
                      SILimitExceededException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(
                          tc,
                          "localPut",
                          new Object[] { msg, transaction });
  
          boolean stored = false;
  
          /*
           * If a non-empty frp exists at this point then send the message to the exception
           * destination
           */
          if (!msg.getMessage().isForwardRoutingPathEmpty())
          {
              // If we have a non-empty forward routing path then throw an exception. 
              // A topicspace can only be the final element in the path.
  
              SIMPIncorrectCallException e = new SIMPIncorrectCallException(
                              nls.getFormattedMessage(
                                                      "FORWARD_ROUTING_PATH_ERROR_CWSIP0249",
                                                      new Object[] { _destination.getName(),
                                                                    _messageProcessor.getMessagingEngineName() },
                                                      null));
  
              e.setExceptionReason(SIRCConstants.SIRC0037_INVALID_ROUTING_PATH_ERROR);
              e.setExceptionInserts(new String[] { _destination.getName(),
                                                  _messageProcessor.getMessagingEngineName(),
                                                  "unknown",
                                                  SIMPUtils.getStackTrace(e) });
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              {
                  SibTr.exception(tc, e);
                  SibTr.exit(tc, "localPut", e);
              }
  
              throw e;
  
          }
  
          // If the message came in from a remote bus then
          // check whether the userId is authorised to access this destination
          if (msg.isFromRemoteBus())
          {
              // Check whether bus security is enabled 
              if (_messageProcessor.isBusSecure())
              {
                  JsMessage jsMsg = msg.getMessage();
  
                  // Before we test for anything else, see whether this message 
                  // was sent by the privileged Jetstream SIBServerSubject. If it was
                  // then we bypass the security checks
                  if (!_messageProcessor.getAuthorisationUtils().sentBySIBServer(jsMsg))
                  {
                      // Check authority to produce to destination
                      String userid = null;
                      if (_destination.isLink() && !_destination.isMQLink())
                      {
                          userid = ((LinkHandler) _destination).getInboundUserid();
                      }
  
                      // If the InboundUserid is null or we're not working with a link
                      // Set the userid from the message
                      if (userid == null)
                      {
                          // Use the id extracted from the message for access checks
                          userid = jsMsg.getSecurityUserid();
                      }
  
                      // Defect 240261: Map a null userid to an empty string
                      if (userid == null)
                      {
                          userid = ""; // Empty string means those users that have not
                                       // been authenticated, but who are still, of course,
                                       // members of EVERYONE. 
                      }
  
                      String discriminator = msg.getMessage().getDiscriminator();
  
                      // Create secContext from userid and discriminator
                      SecurityContext secContext = new SecurityContext(userid, discriminator);
  
                      if (!_destination.checkDestinationAccess(secContext,
                                                               OperationType.SEND))
                      {
                          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                              SibTr.exit(tc, "localPut", "not authorized to produce to this destination");
  
                          // Build the message for the Exception and the Notification
                          String nlsMessage =
                                          nls_cwsik.getFormattedMessage("DELIVERY_ERROR_SIRC_18", // USER_NOT_AUTH_SEND_ERROR_CWSIP0306
                                                                        new Object[] { _destination.getName(),
                                                                                      userid },
                                                                        null);
  
                          // Fire a Notification if Eventing is enabled
                          _messageProcessor.
                                          getAccessChecker().
                                          fireDestinationAccessNotAuthorizedEvent(_destination.getName(),
                                                                                  userid,
                                                                                  OperationType.SEND,
                                                                                  nlsMessage);
  
                          // Thrown if user denied access to destination
                          SIMPNotAuthorizedException e = new SIMPNotAuthorizedException(nlsMessage);
  
                          e.setExceptionReason(SIRCConstants.SIRC0018_USER_NOT_AUTH_SEND_ERROR);
                          e.setExceptionInserts(new String[] { _destination.getName(),
                                                              userid });
                          throw e;
                      }
  
                      if (!_destination.
                                      checkDiscriminatorAccess(secContext,
                                                               OperationType.SEND))
                      {
                          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                              SibTr.exit(tc, "localPut", "not authorized to produce to this destination's discriminator");
  
                          // Write an audit record if access is denied
                          SibTr.audit(tc, nls_cwsik.getFormattedMessage(
                                                                        "DELIVERY_ERROR_SIRC_20", // USER_NOT_AUTH_SEND_ERROR_CWSIP0308
                                                                        new Object[] { _destination.getName(),
                                                                                      secContext.getDiscriminator(),
                                                                                      userid },
                                                                        null));
  
                          // Thrown if user denied access to destination 
                          SIMPNotAuthorizedException e = new SIMPNotAuthorizedException(
                                          nls_cwsik.getFormattedMessage(
                                                                        "DELIVERY_ERROR_SIRC_20", // USER_NOT_AUTH_SEND_ERROR_CWSIP0308
                                                                        new Object[] { _destination.getName(),
                                                                                      secContext.getDiscriminator(),
                                                                                      userid },
                                                                        null));
  
                          e.setExceptionReason(SIRCConstants.SIRC0020_USER_NOT_AUTH_SEND_ERROR);
                          e.setExceptionInserts(new String[] { _destination.getName(),
                                                              secContext.getDiscriminator(),
                                                              userid });
                          throw e;
                      }
                  }
              }
          }
  
          boolean forcePut = msg.isForcePut();
          // Check SendAllowed for local case.
          //send allowed can be false ONLY if this msg is not force put
          boolean isSendAllowed = forcePut ||
                                  (_itemStream.isSendAllowed() && _destination.isSendAllowed());
  
          if (!isSendAllowed)
          {
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  SibTr.exit(
                             tc,
                             "localPut",
                             "Destination send disallowed");
  
              SIMPNotPossibleInCurrentConfigurationException e = new SIMPNotPossibleInCurrentConfigurationException(
                              nls.getFormattedMessage("DESTINATION_SEND_DISALLOWED_CWSIP0253",
                                                      new Object[] { _destination.getName(),
                                                                    _messageProcessor.getMessagingEngineName() }, null));
  
              e.setExceptionReason(SIRCConstants.SIRC0901_INTERNAL_MESSAGING_ERROR);
              e.setExceptionInserts(new String[] { "com.ibm.ws.sib.processor.impl.PubSubInputHandler.localPut",
                                                  "1:1334:1.329.1.1",
                                                  SIMPUtils.getStackTrace(e) });
              throw e;
          }
  
          // check total items on itemstream not exceeded (allow extra 1 for ref stream)
          //but only if forcePut==false
          long topicSpaceHighLimit = _destination.getPublishPoint().getDestHighMsgs();
          if (!forcePut &&
              ((topicSpaceHighLimit != -1)
              && (_itemStream.getTotalMsgCount() >= topicSpaceHighLimit)
              ))
          {
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  SibTr.exit(
                             tc,
                             "localPut",
                             "Destination reached high limit");
  
              SIMPLimitExceededException e = new SIMPLimitExceededException(
                              nls.getFormattedMessage("DESTINATION_HIGH_MESSAGES_ERROR_CWSIP0251",
                                                      new Object[] { _destination.getName(),
                                                                    new Long(topicSpaceHighLimit),
                                                                    _messageProcessor.getMessagingEngineName() },
                                                      null));
              e.setExceptionReason(SIRCConstants.SIRC0025_DESTINATION_HIGH_MESSAGES_ERROR);
              e.setExceptionInserts(new String[] { _destination.getName(),
                                                  new Long(topicSpaceHighLimit).toString() });
              throw e;
          }
  
          if (msg.isTransacted())
          {
              // Dont store the msg till pre-prepare when we know if there are any
              // subscribers.  For now, just register for the pre-prepare callback on
              // the transaction.  //183715.1
              registerMessage(msg, transaction); //183715.1      
          }
          else
          {
              LocalTransaction siTran = _txManager.createLocalTransaction(false);
  
              // If COD reports are required, register for the precommit callback
              if (msg.getReportCOD() != null && _destination instanceof BaseDestinationHandler)
                  msg.registerMessageEventListener(MessageEvents.COD_CALLBACK, (BaseDestinationHandler) _destination);
  
              try
              {
                  // Perform the PubSub match.
                  stored = localFanOut(msg, siTran, false);
  
                  if (stored)
                      siTran.commit();
                  else
                      siTran.rollback();
              } catch (RuntimeException e)
              {
                  // FFDC
                  FFDCFilter.processException(
                                              e,
                                              "com.ibm.ws.sib.processor.impl.PubSubInputHandler.localPut",
                                              "1:1397:1.329.1.1",
                                              this);
  
                  SIMPErrorException ee = new SIMPErrorException(e);
  
                  ee.setExceptionReason(SIRCConstants.SIRC0901_INTERNAL_MESSAGING_ERROR);
                  ee.setExceptionInserts(new String[] { "com.ibm.ws.sib.processor.impl.ProducerSessionImpl.handleMessage",
                                                       "1:1404:1.329.1.1",
                                                       SIMPUtils.getStackTrace(e) });
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  {
                      SibTr.exception(tc, ee);
                      SibTr.exit(tc, "localPut", ee);
                  }
  
                  throw ee;
  
              } catch (SIRollbackException e)
              {
                  // No FFDC code needed
                  handleRollback(siTran);
  
                  SIMPRollbackException ee = new SIMPRollbackException(e.getMessage());
                  ee.setStackTrace(e.getStackTrace());
                  ee.setExceptionReason(SIRCConstants.SIRC0901_INTERNAL_MESSAGING_ERROR);
                  ee.setExceptionInserts(new String[] { "com.ibm.ws.sib.processor.impl.ProducerSessionImpl.handleMessage",
                                                       "1:1424:1.329.1.1",
                                                       SIMPUtils.getStackTrace(e) });
  
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                      SibTr.exit(tc, "localPut", ee);
  
                  throw ee;
              } catch (SIConnectionLostException e)
              {
                  // No FFDC code needed
                  handleRollback(siTran);
  
                  SIMPConnectionLostException ee = new SIMPConnectionLostException(e.getMessage());
                  ee.setStackTrace(e.getStackTrace());
                  ee.setExceptionReason(SIRCConstants.SIRC0901_INTERNAL_MESSAGING_ERROR);
                  ee.setExceptionInserts(new String[] { "com.ibm.ws.sib.processor.impl.ProducerSessionImpl.handleMessage",
                                                       "1:1441:1.329.1.1",
                                                       SIMPUtils.getStackTrace(e) });
  
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                      SibTr.exit(tc, "localPut", ee);
  
                  throw ee;
              } catch (SIIncorrectCallException e)
              {
                  // No FFDC code needed
                  handleRollback(siTran);
  
                  SIMPIncorrectCallException ee = new SIMPIncorrectCallException(e.getMessage());
                  ee.setStackTrace(e.getStackTrace());
                  ee.setExceptionReason(SIRCConstants.SIRC0901_INTERNAL_MESSAGING_ERROR);
                  ee.setExceptionInserts(new String[] { "com.ibm.ws.sib.processor.impl.ProducerSessionImpl.handleMessage",
                                                       "1:1458:1.329.1.1",
                                                       SIMPUtils.getStackTrace(e) });
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                      SibTr.exit(tc, "localPut", ee);
                  throw ee;
              } catch (SIResourceException e)
              {
                  // No FFDC code needed
                  handleRollback(siTran);
  
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                      SibTr.exit(tc, "localPut", e);
  
                  SIMPResourceException ee = new SIMPResourceException(e);
                  ee.setExceptionReason(SIRCConstants.SIRC0901_INTERNAL_MESSAGING_ERROR);
                  ee.setExceptionInserts(new String[] { "com.ibm.ws.sib.processor.impl.ProducerSessionImpl.handleMessage",
                                                       "1:1475:1.329.1.1",
                                                       SIMPUtils.getStackTrace(e) });
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                      SibTr.exit(tc, "localPut", ee);
                  throw ee;
              }
  
              // Release the JsMessage from the parent MessageItem (Any MessageItemReferences will
              // have their own references to the JsMessage (unless they've released their's too)
              msg.releaseJsMessage();
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(tc, "localPut");
      }