tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Gallimore <jonathan.gallim...@gmail.com>
Subject Re: IBM MQ Message property is null in MDB
Date Wed, 26 Jul 2017 13:27:57 GMT
Hi

Thanks for your email!

I'll debug my WMQ setup this evening for you and see if I can see anything
on the TomEE side that might be preventing this from working as you'd
expect.

Jon

On Wed, Jul 26, 2017 at 2:52 AM, gnanapandithan <m.gnanapandithan@gmail.com>
wrote:

> I am publishing JMS text message to topic and consumer is able to consumer
> (
> MDB ) the text message. But  not able to get *Message Object and String
> property*. it is null in MDB consumer side. I have defined MDB in
> ejb-jar.xml under META-INF folder. I am using
>
> TomEE plus 7.0.2
> JMS 2.0
> IBM MQ 8
> JDK 1.8
> Topic
>
> I refereed below mentioned Tomee official example. In example they used
> tomee.xml instead i used resource.xml and don't use web.xml
>
> Consumer is MessageDrivenBean
>
> Consumer is able to get Text or Object Message. But Message property is
> null.
>
> *http://tomee.apache.org/tomee-and-webspheremq.html
> *
>
> @Resource(name = "qcf")
>     private ConnectionFactory connectionFactory;
>     @Resource(name = "queue")
>     private Queue queue;
>     Connection connection = connectionFactory.createConnection();
>     Session session = connection.createSession(false,
> QueueSession.AUTO_ACKNOWLEDGE);
>     MessageProducer producer = session.createProducer(queue);
>     TextMessage message = session.createTextMessage();
>     message.setText("Test Message");
> *    message.setObjectProperty("a","b");
>    message.setStringProperty("c","D");
> *    connection.start();
>     producer.send(message);
>     session.close();
>     connection.close();
>
> Guide me why message property is null in MDB consumer.
>
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/IBM-MQ-Message-property-is-null-in-MDB-tp4682317.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message