ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » MQMD Usage in MDB

Post new topic  Reply to topic
 MQMD Usage in MDB « View previous topic :: View next topic » 
Author Message
mqmaniac
PostPosted: Mon Jul 07, 2008 7:17 am    Post subject: MQMD Usage in MDB Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Jul 07, 2008 7:30 am    Post subject: Re: MQMD Usage in MDB Reply with quote

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
View user's profile Send private message Send e-mail
mqmaniac
PostPosted: Mon Jul 07, 2008 7:37 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Jul 07, 2008 8:59 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mqmaniac
PostPosted: Mon Jul 07, 2008 9:38 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Jul 07, 2008 11:18 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQMD Usage in MDB
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.