Академический Документы
Профессиональный Документы
Культура Документы
1. What is JMS ?
A. JMS (JAVA MESSAGING SERVICE) is an API .It is a specification with one
package javax.jms .It is a technology which can pass the information
synchronously or asynchronously .
2. On what technology is JMS based ?
A. JMS is based on Message-Oriented MiddleWare (MOM).
3. What was the technology for messaging services before JMS was released?
A. Before JMS API specification was released by javasoft ,there was
IBM’s MQSeries implementation of MOM (Message-Oriented MiddleWare).
4. What is MOM (Message-Oriented MiddleWare) ?
A. MOM is a software infrastructure that asynchronously connects multiple
system’s through the production and consumption of data message.
5. How many types of data passing does JMS specification allows ?What are they?
A. JMS specification allows two types of data passing.
a)publish/subscribe [pub/sub model]
b)point-to-point [p-t-p model]
Non-DurableSubscription :-
Non-DurableSubscription will not recive the messages published when the client
connection is not active.
10. Write the steps to write p-to-p model application ?
A.
steps to write Sender application :-
a)We have to get the QueueConnection through jndi.
b)Create QueueSession by invoking a method createQueueSession() .
c)Create a Queue object by invoking createQueue() on QueueSession interface.
d)Create a QueueSender object of a Queue by invoking
createSender(javax.jms.Queue q)
on QueueSession.
e)Create TextMessage object and set the text to be send .
f)Send the message by using a method send() .
steps to write Receiver application :-
a)We have to get the QueueConnection through jndi.
b)Create QueueSession by invoking a method createQueueSession() .
c)Create a Queue object by invoking createQueue() on QueueSession interface.
d)Create a QueueReceiver object of a Queue by invoking
createReceiver(javax.jms.Queue) on QueueSession.