Create a new, empty TrmClientAttachRequest message

@return The new TrmClientAttachRequest.
@exception MessageCreateFailedException Thrown if such a message can not be created
191964
public TrmClientAttachRequest createNewTrmClientAttachRequest() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createNewTrmClientAttachRequest");
    TrmClientAttachRequest msg = null;
    try {
      msg = new TrmClientAttachRequestImpl();
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createNewTrmClientAttachRequest");
    return msg;
  }
1285978
public final ControlDecisionExpected createNewControlDecisionExpected() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createNewControlDecisionExpected");
    ControlDecisionExpected msg = null;
    try {
      msg = new ControlDecisionExpectedImpl(MfpConstants.CONSTRUCTOR_NO_OP);
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createNewControlDecisionExpected");
    return msg;
  }
39674
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info)
	{
		Util.log("In OTMJCAManagedConnectionFactory.createManagedConnection");
		try
		{
			Kit kit = getKit();
			PBKey key = ((OTMConnectionRequestInfo) info).getPbKey();
			OTMConnection connection = kit.acquireConnection(key);
			return new OTMJCAManagedConnection(this, connection, key);
		}
		catch (ResourceException e)
		{
			throw new OTMConnectionRuntimeException(e.getMessage());
		}
	}
1013282
public final ControlFlushed createNewControlFlushed() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createNewControlFlushed");
    ControlFlushed msg = null;
    try {
      msg = new ControlFlushedImpl(MfpConstants.CONSTRUCTOR_NO_OP);
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createNewControlFlushed");
    return msg;
  }
1117531
@Override
    public IQueueMessage<ID, DATA> createMessage(DATA content) {
        return messageFactory.createMessage(content);
    }
723182
public final ControlDecision createNewControlDecision() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createNewControlDecision");
    ControlDecision msg = null;
    try {
      msg = new ControlDecisionImpl(MfpConstants.CONSTRUCTOR_NO_OP);
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createNewControlDecision");
    return msg;
  }
921515
public final ControlRequestFlush createNewControlRequestFlush() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createNewControlRequestFlush");
    ControlRequestFlush msg = null;
    try {
      msg = new ControlRequestFlushImpl(MfpConstants.CONSTRUCTOR_NO_OP);
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createNewControlRequestFlush");
    return msg;
  }
729768
public JsJmsMapMessage createJmsMapMessage() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createJmsMapMessage");
    JsJmsMapMessage msg = null;
    try {
      msg = new JsJmsMapMessageImpl(MfpConstants.CONSTRUCTOR_NO_OP);
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createJmsMapMessage");
    return msg;
  }
250109
public Message createObjectMessage(Serializable messageData, String sender, String recipients) {
        try {
            return decorateMessage(getSession().createObjectMessage(messageData), sender, recipients);
        } catch (JMSException e) {
            throw MiscUtil.toUnchecked(e);
        }
    }
541535
private String createError(String errorMsg, Throwable t) {

        StringBuffer msg = new StringBuffer();
        msg.append(errorMsg);
        msg.append("\n");
        msg.append(t.getMessage());
        msg.append("\n");
        msg.append(CmsException.getStackTraceAsString(t));

        return createError(msg.toString());
    }
1297386
public BaseMessage sendMessageRequest(BaseMessage messageOut)
    {
        TrxMessageHeader trxMessageHeader = (TrxMessageHeader)messageOut.getMessageHeader();
        
        BaseMessage messageReply = null;
        String strMessageCode = (String)trxMessageHeader.get(LocalMessageTransport.LOCAL_PROCESSOR);
        if (trxMessageHeader.getMessageInfoMap() != null)
        {
            trxMessageHeader.getMessageInfoMap().remove(TrxMessageHeader.MESSAGE_PROCESSOR_CLASS);
            trxMessageHeader.getMessageInfoMap().remove(TrxMessageHeader.BASE_PACKAGE);
        }
        MessageProcessInfoModel recMessageProcessInfo = (MessageProcessInfoModel)this.getRecord(MessageProcessInfoModel.MESSAGE_PROCESS_INFO_FILE);
        if (recMessageProcessInfo == null)
            recMessageProcessInfo = (MessageProcessInfoModel)Record.makeRecordFromClassName(MessageProcessInfoModel.THICK_CLASS, this);
        messageOut.setMessageHeader(null);  // Since I am basically change this from out to in
        recMessageProcessInfo.setupMessageHeaderFromCode(messageOut.getMessage(), strMessageCode, null);
        recMessageProcessInfo.free();
        String strDefaultProcessorClass = BaseMessageInProcessor.class.getName();
        BaseExternalMessageProcessor messageInProcessor = (BaseExternalMessageProcessor)BaseMessageProcessor.getMessageProcessor(this.getTask(), (BaseMessage)messageOut.getMessage(), strDefaultProcessorClass);
        if (messageInProcessor != null)
        {   // Always
                // Note: Since recProduct is already read you may be able to speed things up by passing recProduct to this process..
            messageReply = messageInProcessor.processMessage((BaseMessage)messageOut.getMessage());
            messageInProcessor.free();
        }
        messageOut.setMessageHeader(trxMessageHeader);  // Restore this to the original message
        // Note messageReply is an internal message, ready to use updating the record
        ExternalMessage externalTrxMessage = this.createExternalMessage(messageReply, null);
        if (externalTrxMessage != null)
            externalTrxMessage.convertInternalToExternal(this);    // Convert my standard message to the OTA EC message
        return messageReply;
    }
1213185
public MessagelistenerType<MessageadapterType<T>> getOrCreateMessagelistener()
   {
      List<Node> nodeList = childNode.get("messagelistener");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new MessagelistenerTypeImpl<MessageadapterType<T>>(this, "messagelistener", childNode, nodeList.get(0));
      }
      return createMessagelistener();
   }
586081
public BaseMessage createReplyMessage(BaseMessage messageIn)
    {
        //ProductRequest productRequest = (ProductRequest)messageIn.getMessageDataDesc(null);
        BaseMessage replyMessage = (BaseMessage)this.getMessageProcessInfo().createReplyMessage(messageIn);
        
        //BaseProductResponse responseMessage = (BaseProductResponse)replyMessage.getMessageDataDesc(null);
        //responseMessage.moveRequestInfoToReply(productRequest);
        if (replyMessage == null)
            replyMessage = new TreeMessage(null, null);
        if (replyMessage.getExternalMessage() == null)
            new ExternalMapTrxMessageIn(replyMessage, null);
        return replyMessage;    // Override this!
    }
943892
public TrxMessageHeader createProcessMessageHeader(MessageDetailTarget recMessageDetailTarget, String strMessageTransport)
    {
        if ((this.getEditMode() != DBConstants.EDIT_CURRENT) && (this.getEditMode() != DBConstants.EDIT_IN_PROGRESS))
            return null;    // Must have a valid record
        TrxMessageHeader trxMessageHeader = new TrxMessageHeader(null, null);
        // Add properties from this process info
        MessageInfo recMessageInfo = (MessageInfo)((ReferenceField)this.getField(MessageProcessInfo.MESSAGE_INFO_ID)).getReference();
        if (recMessageInfo == null)
            return null;    // Impossible
        trxMessageHeader = recMessageInfo.addMessageProperties(trxMessageHeader);
        trxMessageHeader = this.addMessageProperties(trxMessageHeader);
        
        if (recMessageDetailTarget != null)
        {
            if (m_recMessageDetail == null)
            {
                RecordOwner recordOwner = this.findRecordOwner();
                m_recMessageDetail = new MessageDetail(recordOwner);
                recordOwner.removeRecord(m_recMessageDetail);
                this.addListener(new FreeOnFreeHandler(m_recMessageDetail));
            }
            Vector<MessageDetailTarget> vMessageDetailTarget = new Vector<MessageDetailTarget>();
            while (recMessageDetailTarget != null)
            {
                vMessageDetailTarget.addElement(recMessageDetailTarget);
                recMessageDetailTarget = recMessageDetailTarget.getNextMessageDetailTarget();
            }
            for (int i = vMessageDetailTarget.size() - 1; i >= 0; i--)
            {
                recMessageDetailTarget = vMessageDetailTarget.get(i);
                trxMessageHeader = recMessageDetailTarget.addMessageProperties(trxMessageHeader);
            }
            MessageTransport recMessageTransport = null;
            if ((strMessageTransport == null) || (strMessageTransport.length() == 0))
                strMessageTransport = (String)trxMessageHeader.get(MessageTransport.SEND_MESSAGE_BY_PARAM);
            if ((strMessageTransport != null) && (strMessageTransport.length() != 0))
                recMessageTransport = this.getMessageTransport(strMessageTransport);
            if (recMessageTransport == null)
            { // Still no transport, see if there is a default transport in the MessageDetail
                for (int i = 0; i < vMessageDetailTarget.size(); i++)
                {
                    recMessageDetailTarget = vMessageDetailTarget.get(i);
                    recMessageTransport = m_recMessageDetail.getDefaultMessageTransport(recMessageDetailTarget, this);
                    if (recMessageTransport != null)
                        break;
                }
            }
            if (recMessageTransport == null)
            { // See if there is a default transport specified in this record
                if (!this.getField(MessageProcessInfo.DEFAULT_MESSAGE_TRANSPORT_ID).isNull())
                    recMessageTransport = (MessageTransport)((ReferenceField)this.getField(MessageProcessInfo.DEFAULT_MESSAGE_TRANSPORT_ID)).getReference();
            }
            if (recMessageTransport == null)
            { // See if there is a default transport in the MessageDetailTarget chain.
                for (int i = 0; i < vMessageDetailTarget.size(); i++)
                {
                    recMessageDetailTarget = vMessageDetailTarget.get(i);
                    recMessageTransport = recMessageDetailTarget.getMessageTransport(trxMessageHeader);
                    if (recMessageTransport != null)
                        if ((recMessageTransport.getEditMode() == DBConstants.EDIT_CURRENT) || (recMessageTransport.getEditMode() == DBConstants.EDIT_IN_PROGRESS))
                            break;
                }
            }
            if ((recMessageTransport == null)
                || ((recMessageTransport.getEditMode() != DBConstants.EDIT_CURRENT) && (recMessageTransport.getEditMode() != DBConstants.EDIT_IN_PROGRESS)))
                    recMessageTransport = this.getMessageTransport(MessageTransport.DIRECT);
            trxMessageHeader = recMessageTransport.addMessageProperties(trxMessageHeader);
            for (int i = vMessageDetailTarget.size() - 1; i >= 0; i--)
            {
                recMessageDetailTarget = vMessageDetailTarget.get(i);
                trxMessageHeader = m_recMessageDetail.addMessageProperties(trxMessageHeader, recMessageDetailTarget, this, recMessageTransport);
            }
            for (int i = vMessageDetailTarget.size() - 1; i >= 0; i--)
            {
                recMessageDetailTarget = vMessageDetailTarget.get(i);
                trxMessageHeader = recMessageDetailTarget.addDestInfo(trxMessageHeader);
            }
        }
        else
        { // If there is no target detail, at least try to get the transport
            MessageTransport recMessageTransport = null;
            if ((strMessageTransport == null) || (strMessageTransport.length() == 0))
                strMessageTransport = (String)trxMessageHeader.get(MessageTransport.SEND_MESSAGE_BY_PARAM);
            if ((strMessageTransport != null) && (strMessageTransport.length() != 0))
                recMessageTransport = this.getMessageTransport(strMessageTransport);
            if (recMessageTransport != null) if (true)
                trxMessageHeader = recMessageTransport.addMessageProperties(trxMessageHeader);          
        }
        trxMessageHeader = this.addTransportProperties(trxMessageHeader, null);
        if (trxMessageHeader.get(MessageConstants.QUEUE_NAME) != null)
            trxMessageHeader.setQueueName((String)trxMessageHeader.get(MessageConstants.QUEUE_NAME));
        if (trxMessageHeader.get(MessageConstants.QUEUE_TYPE) != null)
            trxMessageHeader.setQueueType((String)trxMessageHeader.get(MessageConstants.QUEUE_TYPE));
        
        return trxMessageHeader;
    }
637304
public TrmMeLinkReply createNewTrmMeLinkReply() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createNewTrmMeLinkReply");
    TrmMeLinkReply msg = null;
    try {
      msg = new TrmMeLinkReplyImpl();
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createNewTrmMeLinkReply");
    return msg;
  }
726642
public BaseMessageReceiver createMessageReceiver()
    {
        RemoteTask server = (RemoteTask)((App)this.getMessageManager().getApplication()).getRemoteTask(this.getMessageManager());
        try   {
            return new RemoteMessageReceiver(server, this);
        } catch (RemoteException ex)    {
            ex.printStackTrace();
        }
        return null;
    }
1108072
protected Response createBadRequest(String message) {
    ErrorResponse entity = new ErrorResponse();
    entity.setMessage(message);
    return Response
      .status(Response.Status.BAD_REQUEST)
      .entity(entity)
      .build();
  }