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.

Reply via email to