File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Basic JMS Question

 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am still new to JMS and I want to ask about how the JMS provider distinguishes between clients. For example, a Queue JMS object is for sending for messages between two clients [Producer and Subscriber]. How each client is identified ??? Is it through the Connection factory object it uses.

Thanks
 
Jetendra Ivaturi
Ranch Hand
Posts: 159
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kahled...

By looking at the code, you can get who is Sender and Receiver.

onMessage() is the method to receive messages. So he is the receiver.

Provided both should follow all the steps to send or receive messages.

I mean getting connectionfactory object. Getting the Queue Jndi and all.
 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats' not what I mean. I mean JMS is for sending and exchanging of message between applications. Every application can be [once a consumer and once a sender]. Logically, every application has to identify itsself. For example, Khaled application is different from Jetendra application. When an application creates a connection a queue objects, how will the application provider know that this is either Khaled or Jetendra .

Thanks in advance.
 
Jetendra Ivaturi
Ranch Hand
Posts: 159
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bit confusing Khaled...

Did not get you?
 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typically an application server administrator creates a Queue object. The purpose of this queue object is exchanging of messages between two applications. Right ?? How does an application access this queue object ??
It gets Connection Factory object through dependency injection and then creates a connection and a session then message production or consumer.

Let's say two applications will be using this Queue, Application one and application two. Application one is running and wants to send messages to this queue. How will the JMS provider distinguish between the two applications using the queue. Some sort of identification should occcur when an application connects to a queue. My question is how is this done.
 
Jetendra Ivaturi
Ranch Hand
Posts: 159
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With Connection Factory Jndi name. and the URL to connect to the Queue.

Will differentiate this. I believe this is what you are looking for.
 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. This what I was looking for. Many thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic