- World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.

Get it now !!
Send your Resume to 6000 Companies
JMS Interview Questions & Answers - Learning Mode

JMS Interview Questions & Answers - Learning Mode

Java Message Service (JMS) is an application program interface (API) from Sun Microsystems that supports the formal communication known as messaging between computers in a network. Sun's JMS provides a common interface to standard messaging protocols and also to special messaging services in support of Java programs. JMS (Java Message Service) is an API that provides the facility to create, send and read messages. It provides loosely coupled, reliable and asynchronous communication. JMS is also known as a messaging service.

Try JMS Interview Questions & Answers - Exam Mode

1 2 3 4 5 6 7 Next

Sort By : Latest First | Oldest First | By Rating

JMS Interview Questions & Answers - Learning Mode
Try JMS Interview Questions & Answers - Exam Mode
Question: What is the difference between queue and topic

Answer: A point-to-point (PTP) product or application is built around the concept of message queues, senders, and receivers. Each message is addressed to a specific queue, and receiving clients extract messages from the queue(s) established to hold their messages. Queues retain all messages sent to them until the messages are consumed or until the messages expire.

In a publish/subscribe (pub/sub) product or application, clients address messages to a topic. Publishers and subscribers are generally Source:
Question: What is the difference between Point to Point and Publish/Subscribe Messaging Domains

Answer: A point-to-point (PTP) product or application is built around the concept of message queues, senders, and receivers. Each message is addressed to a specific queue, and receiving clients extract messages from the queue(s) established to hold their messages. Queues retain all messages sent to them until the messages are consumed or until the messages expire

In a publish/subscribe (pub/sub) product or application, clients address messages to a topic. Publishers and subscribers are generally Source:
Question: What is the Role of the JMS Provider?

Answer: JMS is the ideal high-performance messaging platform for intrabusiness messaging, with full programmatic control over quality of service and delivery options.
JavaMail provides lowest common denominator, slow, but human-readable messaging using infrastructure already available on virtually every computing platform. Source:
Question: What is publish/subscribe messaging?

Answer: With publish/subscribe message passing the sending application/client establishes a named topic in the JMS broker/server and publishes messages to this queue. The receiving clients register (specifically, subscribe) via the broker to messages by topic; every subscriber to a topic receives each message published to that topic. There is a one-to-many relationship between the publishing client and the subscribing clients. Source:
Question: what is the use of JMS?In which situations we are using JMS?Can we send message from one server to another

Answer: You can use it in the context of mutithreading but it means JMS is not meant for Multithreading. Its basically meant for object communication.

It will be useful when you are writing some event based applications like Chat Server which needs a publish kind of event mechanism to send messages between the server to the clients who got connected with the server.

Moreover JMS gives Loosely-coupled kind of mechanism when compared with RMI which is tightly-coupled. In JMS there is no nee Source:
Question: What kind of information found in the header of a Message ?

The header of a message contains message identification and routing information. This includes , but is not limited to :

JMSRedelivered Source:
Question: What is the difference between durable and non-durable subscriptions?

Answer: Point-To-Point (PTP). This model allows exchanging messages via queues created for some purposes. A client can send and receive messages from one or several queues. PTP model is easier than pub/sub model.
A durable subscription gives a subscriber the freedom of receiving all messages from a topic, whereas a non-durable subscription doesn't make any guarantees about messages sent by others when a client was disconnected from a topic. Source:
Question: What Is the JMS API?

Answer: The Java Message Service is a Java API that allows applications to create, send, receive, and read messages. Designed by Sun and several partner companies, the JMS API defines a common set of interfaces and associated semantics that allow programs written in the Java programming language to communicate with other messaging implementations.
The JMS API minimizes the set of concepts a programmer must learn to use messaging products but provides enough features to support sophisticated messaging Source:
Question: What is the Java Message Service?

Answer: A: The Java Message Service (JMS) API is an API for accessing enterprise messaging systems. It is part of the Java 2 Platform, Enterprise Edition (J2EE). Source:
Question: Explain about session interface?

Answer: Session interface is an important concept which deals partly with the queue system. It is a single thread session where messages are sent in an order. It holds the messages if transaction phase is selected and it also has facility for roll back. Source:
Question: Is the Java Message Service another mail API?

Answer: A: No. The term messaging is broadly defined in computing. It is used for describing various operating system concepts; it is used to describe email and fax systems; and with the JMS API, it is used to describe asynchronous communication between enterprise applications.<br><br>JMS messages are asynchronous requests, reports, or events that are consumed by enterprise applications, not humans. They contain vital information needed to coordinate these systems. They contain precisely for Source:
Question: Explain about Connection factory interface?

Answer: This has settings which creates a connection between the client and JMS provider. These settings are accessed through portable interface and need not be changed every time. These settings are configured in JNDI namespace. Source:
Question: What is JMS administered object ?

Answer: A preconfigured JMS object (a resource manager connection factory or a destination) created by an administrator for the use of JMS clients and placed in a JNDI namespace. Source:
Question: Where can I find a JMS API discussion group?

Answer: You can find a JMS API discussion forum at You must be a member of the Java Developer Connection to join this forum. Source:
Question: What is the recoverability of messages for closed consumers?

Answer: ..A: For messages consumed from a queue or durable subscription, a rollback ensures that the messages are not acknowledged and that they will be delivered to the next consumer of these persistent entities. The JMS specification states that messages delivered to non-durable subscribers may be dropped. This statement means that the JMS API does not define the recoverability of messages consumed from a non-durable subscriber. Source:
How to create a durable subsriber ?

Answer: Having performed the normal setup, an application can create a durable subscriber to a destination. To do this, the client program creates a durable TopicSubscriber, using session.createDurableSubscriber. The name subName is used as an identifier of the durable subscription.
session.createDurableSubscriber( Topic topic, java.lang.String subName, java.lang.String messageSelector, boolean noLocal);
Alternatively, you can use the two-argument form of this operation, wh Source:
Question: Explain about message listeners?

Answer: It acts as an asynchronous event handler for messages. It implements the message listener interface. A developer defines the actions which should be taken when the message arrives such as deleting, forwarding, etc. A queue connection can be initiated once this connection is defined. Source:
Question: What is object message ?

Answer: Object message contains a group of serializeable java object. So it allows exchange of Java objects between applications. sot both the applications must be Java applications. Source:
Question: What is the use of BytesMessage?

Answer: BytesMessage contains an array of primitive bytes in it's payload. Thus it can be used for transfer of data between two applications in their native format which may not be compatible with other Message types. It is also useful where JMS is used purely as a transport between two systems and the message payload is opaque to the JMS client. Whenever you store any primitive type, it is converted into it's byte representation and then stored in the payload. There is no boundary line between Source:
Question: What is the difference between queue and topic?

Answer: A topic is typically used for one to many messaging
i.e. it supports publish subscribe model of messaging.
While queue is used for one-to-one messaging i.e. it
supports Point to Point Messaging.

Submitted by Janani Vajjiram ( Source:

1 2 3 4 5 6 7 Next

India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.28125 Seconds