



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Here are JMS interview questions and answers for fresher as well experienced candidates to get their dream job.
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.
JMS provides both type of messaging, synchronous Asynchronous
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.
There are two types of messaging models that JMS provides – Point to point queuing Second one is publish and subscribe
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. JMS (Java Message Service) Interview Questions
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.
JMS provider JMS client Messages Administered objects Native clients
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
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.
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.
The different types of messages available in JMS API are Message, TextMessage, BytesMessage, ObjectMessage and MapMessage.
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.
JMS client is a language program that sends or receives messages.
JMS has no inherent support for email operations.
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.
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.
The application client like enterprise JavaBeans components and web components can send or receive JMS message synchronously. In addition, the application clients can also receive message asynchronously. With the help of message-driven beans, JMS provider can optionally implement the processing of messages. Message-driven beans are a type of enterprise bean that enables the asynchronous consumption of messages. The operation of sending and receiving message is carried out in distributed operation, which allows JMS operations and database accesses within a single transaction.
The types of messages that are supported by JMS are Stream Messages Text Messages Map Messages Bytes Messages Object Messages