Author |
Message
|
kotla.satya |
Posted: Fri Sep 21, 2007 1:22 am Post subject: Sample JMS code for creating and using JMS CorrelationID |
|
|
Apprentice
Joined: 30 Jan 2006 Posts: 40 Location: chennai-India
|
HI All,
Can any one please post me sample JMS code for generating a correlation id and for using the same for retrival of a message.
Thanks in advance. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Sep 21, 2007 1:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
It's not best practice to generate a correl id. Either get MQ to do it (using new_correl_id) or copy the msg id if that's what your pattern requires.
To retrieve by correl id set a selector. There's example code in the usual places. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kotla.satya |
Posted: Fri Sep 21, 2007 1:54 am Post subject: |
|
|
Apprentice
Joined: 30 Jan 2006 Posts: 40 Location: chennai-India
|
Vitor wrote: |
It's not best practice to generate a correl id. Either get MQ to do it (using new_correl_id) or copy the msg id if that's what your pattern requires.
. |
My intention is to generate a message id only and assign it to correlation id.
Could you please post me a sample jms program for that.
Thanks in advance. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Sep 21, 2007 2:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kotla.satya wrote: |
[Could you please post me a sample jms program for that. |
Google or this forum could find you half a dozen samples in 5 minutes. IIRC there's some supplied with the product.
Sorry to hear your life's still so busy:
http://www.mqseries.net/phpBB2/viewtopic.php?p=190891 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kotla.satya |
Posted: Fri Sep 21, 2007 2:20 am Post subject: |
|
|
Apprentice
Joined: 30 Jan 2006 Posts: 40 Location: chennai-India
|
Sorry,I tried intially and then only requested as I could not get the exact details.
Sorry,If my posts are worrying. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Sep 21, 2007 2:30 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kotla.satya wrote: |
Sorry,If my posts are worrying. |
It would be more worrying if you were actually trying to create a correl id (id creation has been the subject of many posts).
Following from your previous post, do you now have access to the documentation in the link provided? This describes both the correl id option & message selectors. Further details of correl id are provided in the Application Programming Guide & Application Programming Reference.
The APG, while not Java specifc, is well worth making the time to read. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kotla.satya |
Posted: Fri Sep 21, 2007 3:07 am Post subject: |
|
|
Apprentice
Joined: 30 Jan 2006 Posts: 40 Location: chennai-India
|
[quote="Vitor"]
kotla.satya wrote: |
Following from your previous post, do you now have access to the documentation in the link provided? . |
I am not having access to those documents |
|
Back to top |
|
 |
Vitor |
Posted: Fri Sep 21, 2007 3:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kotla.satya wrote: |
I am not having access to those documents |
You need to sort that out. They're a vital source of reference, and even the most paranoid management shouldn't have the IBM site on a banned list. There's no material on it that even the most sensitive would find offensive.
(They don't list prices ) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Sep 21, 2007 3:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
There a samples on this site and in the product's sample directories...
You may need to do a custom install to get the java support... and samples
Enjoy and get a reliable internet connection!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|