If you want to learn how to use the JMS API then Sun's JMS tutorial is
a pretty good start...
http://incubator.apache.org/activemq/how-do-i-get-started-with-jms.html
Alternatively you could stick to writing business level POJOs and hide
the middleware via Lingo which hides the JMS API from you letting you
focus on your business logic
http://lingo.codehaus.org/
On 10/3/06, Pico Florin <[EMAIL PROTECTED]> wrote:
Hi, all!
I'm newbie in using the activemq API and I have some problems in receiving
a JMS message from a web server. Here is the scenario:
I have a reach client who sends JMS messages to a web server (Tomcat) and
it (the client) expects a reply from the server. I have read the documentation
related to this subject from here:
http://activemq.org/site/how-should-i-implement-request-response-with-jms.html
but I'm a litlle bit confused because of this lines of code (bolded):
//server side
public void onMessage(Message request) { Message response =
session.createMessage();
response.setJMSCorrelationID(request.getJMSCorrelationID())
producer.send(request.getJMSReplyTo(), response) }
1. In this case who is the session and how can I obtain it?
2. Who is the producer and how can I obtain it?
On the client should I use the code:
// client side Destination tempDest = session.createTemporaryQueue();
MessageConsumer responseConsumer = session.createConsumer(tempDest); ... //
send a request.. message.setJMSReplyTo(tempDest)
message.setJMSCorrelationID(myCorrelationID); producer.send(message);
responseConsumer.receive(1000);
in order to receive the message?
Thank you,
Florin
---------------------------------
Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail
--
James
-------
http://radio.weblogs.com/0112098/