Solved

what does setJMSCorrelationID and setClientID

Posted on 2007-11-16
1
506 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

757 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

21 Experts available now in Live!

Get 1:1 Help Now