• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Basic JMS Question

 
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
bit confusing Khaled...

Did not get you?
 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. This what I was looking for. Many thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic