Results 1 to 6 of 6

Thread: SpringJMSTemplate:Max size limit when used to send message to Websphere MQ 7

  1. #1
    Join Date
    Sep 2012
    Posts
    5

    Default SpringJMSTemplate:Max size limit when used to send message to Websphere MQ 7

    I am using SpringJMSTemplate to send messages to queue which is Websphere MQ 7.
    Queue max length is set to 100MB.
    But using JMSTemplate, I am unable to send messages greater than 4MB.
    Where as native JMS implementation ,in conjunction with JNDI,I am able to sned messages as large as 70MB.
    Is there a limitation from JMSTemplate?
    What else may be the reason?
    Please help.

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    When you say you can't, are you getting any exceptions?

  3. #3
    Join Date
    Sep 2012
    Posts
    5

    Default

    Quote Originally Posted by oleg.zhurakousky View Post
    When you say you can't, are you getting any exceptions?
    Here is the exception I am getting:

    0:45:17,193 ERROR [STDERR] at java.lang.Thread.run(Thread.java:662)
    10:45:17,194 ERROR [STDERR] Caused by: com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ2007: Failed to send a message to destination 'ng.slt.01'. JMS attempted to perform an MQPUT or MQPUT1; however WebSphere MQ reported an error. Use the linked exception to determine the cause of this error.
    10:45:17,194 ERROR [STDERR] at com.ibm.msg.client.wmq.common.internal.Reason.reas onToException(Reason.java:608)
    10:45:17,194 ERROR [STDERR] at com.ibm.msg.client.wmq.common.internal.Reason.crea teException(Reason.java:236)
    10:45:17,194 ERROR [STDERR] at com.ibm.msg.client.wmq.internal.WMQMessageProducer .checkJmqiCallSuccess(WMQMessageProducer.java:1112 )
    10:45:17,194 ERROR [STDERR] at com.ibm.msg.client.wmq.internal.WMQMessageProducer .checkJmqiCallSuccess(WMQMessageProducer.java:1068 )
    10:45:17,194 ERROR [STDERR] at com.ibm.msg.client.wmq.internal.WMQMessageProducer .access$800(WMQMessageProducer.java:72)
    10:45:17,194 ERROR [STDERR] at com.ibm.msg.client.wmq.internal.WMQMessageProducer $SpiIdentifiedProducerShadow.sendInternal(WMQMessa geProducer.java:864)
    10:45:17,194 ERROR [STDERR] at com.ibm.msg.client.wmq.internal.WMQMessageProducer $ProducerShadow.send(WMQMessageProducer.java:542)
    10:45:17,194 ERROR [STDERR] at com.ibm.msg.client.wmq.internal.WMQMessageProducer .send(WMQMessageProducer.java:1223)
    10:45:17,194 ERROR [STDERR] at com.ibm.msg.client.jms.internal.JmsMessageProducer Impl.sendMessage(JmsMessageProducerImpl.java:935)
    10:45:17,194 ERROR [STDERR] at com.ibm.msg.client.jms.internal.JmsMessageProducer Impl.send_(JmsMessageProducerImpl.java:787)
    10:45:17,194 ERROR [STDERR] at com.ibm.msg.client.jms.internal.JmsMessageProducer Impl.send(JmsMessageProducerImpl.java:442)
    10:45:17,194 ERROR [STDERR] at com.ibm.mq.jms.MQMessageProducer.send(MQMessagePro ducer.java:304)
    10:45:17,195 ERROR [STDERR] at org.springframework.jms.core.JmsTemplate.doSend(Jm sTemplate.java:592)
    10:45:17,195 ERROR [STDERR] at org.springframework.jms.core.JmsTemplate.doSend(Jm sTemplate.java:569)
    10:45:17,195 ERROR [STDERR] at org.springframework.jms.core.JmsTemplate$3.doInJms (JmsTemplate.java:536)
    10:45:17,195 ERROR [STDERR] at org.springframework.jms.core.JmsTemplate.execute(J msTemplate.java:466)
    10:45:17,195 ERROR [STDERR] ... 155 more
    10:45:17,195 ERROR [STDERR] Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2010' ('MQRC_DATA_LENGTH_ERROR').
    10:45:17,195 ERROR [STDERR] at com.ibm.msg.client.wmq.common.internal.Reason.crea teException(Reason.java:223)
    10:45:17,195 ERROR [STDERR] ... 169 more
    10:45:17,196 ERROR [STDERR] Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2010
    10:45:17,196 ERROR [STDERR] at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiPutM essageWithProps(RemoteFAP.java:7437)
    10:45:17,196 ERROR [STDERR] at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiPut( RemoteFAP.java:6873)
    10:45:17,196 ERROR [STDERR] at com.ibm.msg.client.wmq.internal.WMQMessageProducer $SpiIdentifiedProducerShadow.sendInternal(WMQMessa geProducer.java:857)
    10:45:17,196 ERROR [STDERR] ... 165 more

  4. #4
    Join Date
    Sep 2012
    Posts
    5

    Default

    Here is my applicationContext.xml:

    <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
    <property name="connectionFactory">
    <ref bean="connectionFactory" />
    </property>
    <property name="defaultDestination">
    <ref bean="jmsQueue" />
    </property>
    </bean>
    <bean id="connectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">

    <property name="hostName">
    <value>${${env}.slt.queue.hostname}</value>
    </property>
    <property name="port">
    <value>${${env}.slt.queue.host.port}</value>
    </property>
    <property name="queueManager">
    <value>${${env}.slt.queue.host.queueManager}</value>
    </property>
    <property name="channel">
    <value>${${env}.slt.queue.host.channel}</value>
    </property>

    <property name="transportType">
    <value>${${env}.slt.queue.host.transportType}</value>
    </property>
    </bean>
    <bean id="jmsQueue" class="com.ibm.mq.jms.MQQueue">
    <constructor-arg value="${${env}.slt.queue}" />
    </bean>

  5. #5
    Join Date
    Sep 2012
    Posts
    5

    Default

    Here is the method I am using to send messages:

    jmsTemplate.send(new MessageCreator() {
    public Message createMessage(Session session)
    throws JMSException {



    ObjectMessage bytes = session.createObjectMessage();
    SLTMessageObject dto=new SLTMessageObject();

    dto.setIpPartyId(ipPartyId);
    dto.setPartyUserId(partyUserId);
    dto.setPartyUserName(partyUserName);
    dto.setEmailId(emailId);
    dto.setGroupId(groupId);
    //dto.setSourceId(sourceId);
    //dto.setMessage(input);

    dto.setActionType(actionType);
    bytes.setObject(dto);

    /*MapMessage mapObject = session.createMapMessage();
    mapObject.setObject("First", f);*/



    logger.info("JmsQueueSender:sendMessages() ..... Leaving");
    return bytes;
    }

  6. #6
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    This has nothing to do with JmsTemplate since it does not impose any restrictions on the message size.
    Quick research renders these links: http://stackoverflow.com/questions/3...plate-security and
    http://publib.boulder.ibm.com/infoce...fm12170 _.htm

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •