|
INTERVIEW QUESTIONS
J2EE
JMS
DETAILS
Question: According to Section 3.4 of the JMS Specification, a client can effectively set only three of the message header fields. All the others are set either by the JMS provider or by the send or publish method. Why do all the fields have a setter method, when any client setting will be overridden when the message is sent or when the JMS provider delivers it? Wouldn't it make sense to allow only getter methods for most of the fields?
Answer: A: The specification requires setter methods mainly for consistency, so that each message header field has both a getter and setter method. Another reason is to allow a receiving client to change a field after a message is received but before it is passed to some other part of an application for processing. Although most setter methods are used very rarely, they are provided to give programmers flexibility.
|
|
|
Category |
JMS Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 8845 users |
Added on |
9/2/2014 |
Views |
66113 |
Rate it! |
|
|
Question:
According to Section 3.4 of the JMS Specification, a client can effectively set only three of the message header fields. All the others are set either by the JMS provider or by the send or publish method. Why do all the fields have a setter method, when any client setting will be overridden when the message is sent or when the JMS provider delivers it? Wouldn't it make sense to allow only getter methods for most of the fields?
Answer:
A: The specification requires setter methods mainly for consistency, so that each message header field has both a getter and setter method. Another reason is to allow a receiving client to change a field after a message is received but before it is passed to some other part of an application for processing. Although most setter methods are used very rarely, they are provided to give programmers flexibility. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
A: The JMS specification does not specify exactly what exceptions are delivered to an ExceptionListener or when they are delivered, so providers vary in how they handle connection problems. Check with your JMS provider if you have questions.
|
View Answer
|
|
According to the specification, "Getting a property value for a name which has not been set is handled as if the the property exists with a null value." In the case of getStringProperty, does this mean a null value or a null string?
|
View Answer
|
|
Why can't I run the JMS API sample programs using the J2EE 1.2.x SDK?
|
View Answer
|
|
What is the recoverability of messages for closed consumers?
|
View Answer
|
|
How does CLIENT_ACKNOWLEDGE mode work when there are two or more TopicSubscribers to the same topic within a session?
|
View Answer
|
|
What message distribution policy does the JMS API specify when there are two or more QueueReceivers for the same queue at the same time?
|
View Answer
|
|
Can a message be acknowledged after its message consumer is closed?
|
View Answer
|
|
Why doesn't the JMS API provide subscription notification? If it were possible for a publisher to detect when subscribers for a topic existed, it could inhibit publication on unsubscribed topics.
|
View Answer
|
|
Why doesn't the JMS API provide a send-to-list mechanism?
|
View Answer
|
|
Why doesn't the JMS API provide end-to-end synchronous message delivery and notification of delivery?
|
View Answer
|
|
How is the JMS API aligned with the CORBA Notification Service?
|
View Answer
|
|
Why doesn't the JMS API specify a set of JavaBeans components?
|
View Answer
|
|
Why are there two separate JMS API domains, point-to-point and publish/subscribe, instead of just one?
|
View Answer
|
|
Does the JMS API provide a version of a distributed Java event model?
|
View Answer
|
|
What JDK release does the JMS API need?
|
View Answer
|
|
Why is the JMS API promoted as a technology for providing communication between components within an enterprise, but not for business-to-business (B2B) communication between enterprises over the Internet? What prevents its use over the Internet?
|
View Answer
|
|
Where can I find a JMS API discussion group?
|
View Answer
|
|
Q: What is the relationship between the Java Message Service, the Java Transaction API, and the Java Transaction Service?
|
View Answer
|
|
What is the relationship between the Java Message Service, the Java Transaction API, and the Java Transaction Service?
|
View Answer
|
|
What is the relationship between the Java Message Service and the Java DataBase Connectivity (JDBC) API?
|
View Answer
|