1.) Which of the following are Roles of a JMS Provider? A) Handles security of messages. B) Data Conversion. C) Client Triggering. D) All the above. E) None of the above. Ans: D) 2.) What are the three components of a Message? A JMS message has three components 1.A header 2.Properties 3.A body 3.) What are the different types of messages available in the JMS API? The types of messages are Message, TextMessage, BytesMessage, StreamMessage, ObjectMessage, MapMessage are the different messages available in the JMS API 4.) What is JMS? JMS is an acronym used for Java Messaging Service. It is used to creating software using asynchronous messaging. 5.) How JMS is different from RPC? In RPC the method invoker waits for the method to finish execution and return the control back to the invoker. Thus it is completely synchronous in nature. While in JMS the message sender just sends the message to the destination and continues it's own processing. The sender does not wait for the receiver to respond. This is asynchronous behavior. 6. What is the difference between topic and queue? 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. 7. What is the use of Message object? Message is a light weight message having only header and properties and no payload. Thus if theIf the receivers are to be notified abt an event, and no data needs to be exchanged then using Message can be very efficient. 8. What is the use of TextMessage? TextMessage contains instance of java.lang.String as it's payload. Thus it is very useful for exchanging textual data. It can also be used for exchanging complex character data such as an XML document. 9. What is the difference between BytesMessage and StreamMessage? BytesMessage stores the primitive data types by converting them to their byte representation. Thus the message is one contiguous stream of bytes. While the StreamMessage maintains a boundary between the different data types stored because it also stores the type information along with the value of the primitive being stored. BytesMessage allows data to be read using any type. Thus even if your payload contains a long value, you can invoke a method to read a short and it will return you something. It will not give you a semantically correct data but the call will succeed in reading the first two bytes of data. This is strictly prohibited in the StreamMessage. It maintains the type information of the data being stored and enforces strict conversion rules on the data being read. 10.What is the difference between Point to Point and Publish/Subscribe Messaging Domains? Messaging is playing an increasingly important role in enterprise computing. Its advantages are a natural result of several factors: the trend toward peer-to-peer computing, greater platform heterogen.
|
|
|
|
|
| Author: supreme 31 May 2008 | Member Level: Gold | Rating: Points: 2 |
Great collection of questions and answers. Keep Going
|