Solved

what does setJMSCorrelationID and setClientID

Posted on 2007-11-16
1
508 Views
Last Modified: 2008-02-18
in some of the examples for published/subscriber messaging, i see the use of setJMSCorrelationID() and setClientID().  the documentation for them don't seem to be very clear.  what do they do?  and are they essential?  

i am try to create a durable subscriber, and i didn't use these two methods, and the subscriber seems to be working fine as far as getting messages that it subcribes for.  
0
Comment
Question by:mmingfeilam
1 Comment
 
LVL 13

Accepted Solution

by:
Bart Cremers earned 250 total points
ID: 20303744
The JMSCorrelationID header field is used for linking one message with another. It typically links a reply message with its requesting message.

I don't know where you did get the setClientID() from because that method is not specified in the JMS specification.

So, in short, they are not at all essential, only there for you to make life easier.

eg. In our system we use JMSCorrelationIDs to map a message to a record in a database table. The JMSCorrelationID is passed on to several message driven beans, so the last bean in the queue can update the final state of the record in the database.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to parse custom JSON to POJO java 4 57
advertisement module in core php 4 148
simple java question 3 44
tomcat administrtor 12 34
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now