SCJP, SCWCD, SCBCD, SCEA 5
Originally posted by Jonathan Aotearoa:
The following is from one of Sun's SCEA ePractice questions.
Your application sends three messages with no delivery failures to a JMS destination, where two consumers consume messages from the destination.
How do both consumers ensure they receive all messages?
A) Consumers listen to a JMS queue without message selectors
B) Consumers listen to a JMS queue with message selectors
C) Consumers subscribe to a JMS topic with message selectors
D) Consumers subscribe to a JMS topic without message selectors
Answer
Option C is correct
Options A, B are incorrect because consumers subscribe to a JMS topic
Option D is incorrect because consumers subscribe to a JMS topic with message selectors
This seems completely wrong! The JMS 1.1 specification contains the following description of a selector:
�A JMS message selector allows a client to specify, by message header, the messages it�s interested in. Only messages whose headers and properties match the selector are delivered. The semantics of not delivered differ a bit depending on the MessageConsumer being used.�
Section 6.11 of the specification, TopicSubscriber, goes on to say:
�Messages filtered out by a subscriber�s message selector will never be delivered to the subscriber. From the subscriber�s perspective, they simply don�t exist.�
Has any one else come across any other errors in the SCEA ePractice questions from Sun? This is second one I�ve found. I guess it�s not a bad thing if it causes you to think a little harder but then again it�s pretty disappointing after having paid good money for these questions.
SCJP, SCWCD, SCBCD, SCEA 5
SCJP, SCWCD, SCBCD, SCEA 5
Bryan Aho<br />Trinity Technology Group
GiUsEpPe (SCJP, SCWCD, SCBCD, IBM OOAD, SCEA/OCMJEA 5)
J J Wright wrote:The following is from one of Sun's SCEA ePractice questions.
Your application sends three messages with no delivery failures to a JMS destination, where two consumers consume messages from the destination.
How do both consumers ensure they receive all messages?
A) Consumers listen to a JMS queue without message selectors
B) Consumers listen to a JMS queue with message selectors
C) Consumers subscribe to a JMS topic with message selectors
D) Consumers subscribe to a JMS topic without message selectors
Answer
Option C is correct
Options A, B are incorrect because consumers subscribe to a JMS topic
Option D is incorrect because consumers subscribe to a JMS topic with message selectors
This seems completely wrong! The JMS 1.1 specification contains the following description of a selector:
�A JMS message selector allows a client to specify, by message header, the messages it�s interested in. Only messages whose headers and properties match the selector are delivered. The semantics of not delivered differ a bit depending on the MessageConsumer being used.�
Section 6.11 of the specification, TopicSubscriber, goes on to say:
�Messages filtered out by a subscriber�s message selector will never be delivered to the subscriber. From the subscriber�s perspective, they simply don�t exist.�
Has any one else come across any other errors in the SCEA ePractice questions from Sun? This is second one I�ve found. I guess it�s not a bad thing if it causes you to think a little harder but then again it�s pretty disappointing after having paid good money for these questions.