Follow @devglan

jms Interview Questions and Answers

Each jms Interview Question Sets contains 12 questions.

1)   What is JMS?

JMS stands for Java Messaging Service. It is the new standard for inter client communication. It allows the J2EE application component to create, send, read and receive the messages asynchronously.

2)   What are the advantages of JMS?

JMS is asynchronous in nature. Thus not all the pieces need to be up all the time for the application to function as a whole. Even if the receiver is down the MOM will store the messages on it's behalf and will send them once it comes back up. Thus at least a part of application can still function as there is no blocking.

3)   What do you mean by Synchronous and Asynchronous type of messaging?

Synchronous: In this type of messaging, client waits for the server to respond to a message immediately. Ex: Telephone call, two way radio communication.
Asynchronous: In this type of messaging, client does not wait for a message from the server, but automatically an event is created to trigger a message from a server. Ex: email, text messaging.

4)   How many types of messaging model do JMS provide for and what are they?

There are two types of messaging models that JMS provides :
1. Point to point queuing
2. public and subscribe

5)   What is the difference between topic and queue in JMS?

1. Queue technique is used for one to one messaging, and it supports point to point messaging. In this technique once a message is consumed by any one of the consumer, the message is destroyed from the queue.
2.Topic is typically used for one to many messaging and it supports public subscribe model of messaging. A single message can be consumed by multiple consumers.

6)   What is the role of the JMS provider?

The JMS provider handles data conversion, security of the messages and the client triggering. It specifies the level of encryption, security level of the message and the best-data type for the non-JMS client.

7)   What are the components of JMS?

JMS provider
JMS client
Administered objects
Native clients

8)   Give an example of using point to point model in JMS?

Example for point to point model, would be a print out. When you select a print-out option, your system sends the message to the server, and once the print-out is taken out, again this server will send the message back to you. Point to point model is used, when the information is specific to a single client.

9)   What is the important part of JMS applications?

Message Producer
Message Consumer
Connection factory and destination

10)   What is JMS provider?

An implementation of the JMS interface for a Message Oriented Middleware (MOM). Providers are implemented as either a Java JMS implementation or an adapter to a non-Java MOM.

11)   What is JMS client?

An application or process that produces and/or receives messages.

12)   What is JMS producer?

A JMS client that creates and sends messages.

Is this page helpful to you? Please give us your feedback below. We would love to hear your thoughts on these articles, it will help us improve further our learning process.