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.
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.
SCJP 1.4 & 1.5, SCWCD 1.5. Learn and Let Learn.
posted 10 years ago
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 .
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.