The largest Interview Solution Library on the web

Interview Questions
« Previous | 0 | 1 | 2 | 3 | 4 | Next »

1.What is JMS?

JMS means 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

2.What type of messaging is provided by JMS?

JMS provides both type of messaging,

  • synchronous
  • Asynchronous

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. 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, blog posting.

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 –

  • Point to point queuing
  • Second one is public and subscribe

5.Explain the difference between topic and queue?

Queue technique is used for one to one messaging, and it supports point to point messaging. While topic is typically used for one to many messaging and it supports public subscribe model of messaging.

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
  • Messages
  • 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.For JMS-enabled application, what are the core JMS-related objects required?

  • The core JMS-related objects that are required are –
  • The connection object
  • One or more sessions within a connection that provides a context for message sending and receiving.
  • A topic or queue object within a session representing the destination within the message broker.
  • Appropriate sender or publisher or receiver within a session.

10.What is JMS administered object?

JMS administered object is a pre-configured JMS object that is created by an administrator for the use of JMS clients and placed in JNDI namespace.

11.What is the important part of JMS applications?

  • Session
  • Connection
  • Message
  • Message Producer
  • Message Consumer
  • Connection factory and destination

12.What is JMS session?

A JMS session is a single-threaded context for sending and receiving JMS messages. A JMS session could be a locally transacted, non-transacted or distributed transacted.

13.Mention the difference between durable and non-durable subscription?

Durable subscription gives a subscriber the freedom of receiving all messages from a topic, while a non-durable subscription does not make any guarantees about messages sent by others when a client get disconnected by others.

14.What is Byte Message?

Byte message is a stream of uninterrupted bytes. It contains an array of primitive bytes in its payload. For the transfer of data between two applications in their native format, byte message is used, which may be not possible with other message types.

15. Mention different types of messages available in JMS API?

The different types of messages available in JMS API are Message, TextMessage, BytesMessage, ObjectMessage and MapMessage.

16.What is the difference between the P2P (Peer to Peer) model and subscribe model?

P2P model is highly reliable and it is used in a one-to-one situation, while subscribe model is used in one-to-many situation. It is very fast but less reliable.

17.What is a JMS client?

JMS client is a language program that sends or receives messages.

18.Can we send e-mail messages using JMS?

JMS has no inherent support for email operations.

19.Explain how Application server handles the JMS Connection?

  • With the help of Application server, the server session is created and it stores them in a pool
  • To put messages in JMS session, connection consumer, uses the Server session
  • Server session is the one that creates the JMS session
  • Application written by Application programmers creates the message listener.

20.What is the difference between JMS and RPC (Remote Procedure Call)?

The basic difference between JMS and RPC lies in the way they message. JMS uses asynchronous messaging type while, RPC creates synchronous messaging type. The method invoker in RPC, waits for the method to finish execution and return back the control to the invoker. In JMS the message sender just sends the message to the destination and continues its own processing.

« Previous | 0 | 1 | 2 | 3 | 4 | Next »

copyright © 2014 - all rights riserved by