Author |
Message
|
mqmaniac |
Posted: Mon Jul 07, 2008 7:17 am Post subject: MQMD Usage in MDB |
|
|
 Master
Joined: 27 Dec 2005 Posts: 201
|
Hi Everyone,..I am writing my first MDB program to Modify MQMD inside
Can you pls help me understand the follwoing.
1.How to Read MQMD Inside MDB {Inside the OnMessage Method}.
2.Can we Set ReplytoQueueManager in JMS Header ? Does JMS Header have a ReplytoQueueManager Property at all? |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 07, 2008 7:30 am Post subject: Re: MQMD Usage in MDB |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqmaniac wrote: |
Hi Everyone,..I am writing my first MDB program to Modify MQMD inside
Can you pls help me understand the follwoing.
1.How to Read MQMD Inside MDB {Inside the OnMessage Method}.
2.Can we Set ReplytoQueueManager in JMS Header ? Does JMS Header have a ReplytoQueueManager Property at all? |
Read up on a JMS tutorial there are enough of these on the web.
JMS sets a DESTINATION. The destination will have both qname and qmgrname... but the form will be that of the uri: "queue://<qmgrname>/<queuename>[?<qattr1>[&<qattrn>]]"
And before you ask, NO you CANNOT mix MQ Base and MQ JMS programming
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqmaniac |
Posted: Mon Jul 07, 2008 7:37 am Post subject: |
|
|
 Master
Joined: 27 Dec 2005 Posts: 201
|
Thanks for the reply,..
Can I conclude the following...
1.We cannot modify/use MQMD in an MDB ?
2.If we are to program an MDB ,..we should always use JMS Messaging ?
and if thats the case ,.How do I convert a JMS Messging to a MQ Messge when we put to a Queue..
Pls respond thank you.. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 07, 2008 8:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqmaniac wrote: |
Thanks for the reply,..
Can I conclude the following...
1.We cannot modify/use MQMD in an MDB ? |
No, you will just have to use the JMS methods to modify it.
mqmaniac wrote: |
2.If we are to program an MDB ,..we should always use JMS Messaging ?
and if thats the case ,.How do I convert a JMS Messging to a MQ Messge when we put to a Queue..
Pls respond thank you.. |
Yes.
Check out the Using java manual (links at top of page) and the mapping of JMS to MQ and vice/versa.
Check out the targetClient property for your destinations.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqmaniac |
Posted: Mon Jul 07, 2008 9:38 am Post subject: |
|
|
 Master
Joined: 27 Dec 2005 Posts: 201
|
Thanks Again for the reply,..
1.Now using the JMS Mesthods inside OnMessage ( msg),...
a.)Does the MDB Map On Its OWN the MQMD to JMS Header Once the message is Read from the Queue ?
b.) The Whole Idea of JMS is Logical,.. I mean we use the JMS Header stuff in our Programs internally But Physically when a message is on a Queue ITS ALWAYS (MQMD+MQRFH+Body) ?
Pls Help |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 07, 2008 11:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqmaniac wrote: |
a.)Does the MDB Map On Its OWN the MQMD to JMS Header Once the message is Read from the Queue ? |
Yes
mqmaniac wrote: |
b.) The Whole Idea of JMS is Logical,.. I mean we use the JMS Header stuff in our Programs internally But Physically when a message is on a Queue ITS ALWAYS (MQMD+MQRFH+Body) ?
Pls Help |
Not quite. The targetClient attribute of the destinaton determines whether an MQRFH is generated or not. However you need to be aware of the fact as the message.properties are stored in the usr section of the MQRFH.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|