Forums Register Login

Sun ePractice Examination Errors - JMS

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
I don't get it. What is difference b/w Option c and d?

Somebody sheds some light.

Thanks!
+Pie Number of slices to send: Send
Hi Jonathan Aotearoa

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.



My answer is D for this, Option C might be correct depends on the selector

Thanks
+Pie Number of slices to send: Send
Option C cannot be correct because a selector will only ever filter messages (assuming its conditional statement is met). Therefore, if you want to receive all message there�s no reason whatsoever to use a selector. It�s so obviously wrong I can�t see how Sun could miss this.
+Pie Number of slices to send: Send
Hi Jona

Your argument is correct, But we can define a selector, match to all messages, in that case C is an answer. Thats why I said C would be an answer depends on selector

Does sun give any explanation for the answer? and why D is incorrect
[ October 28, 2008: Message edited by: Chaminda Amarasinghe ]
+Pie Number of slices to send: Send
Hi Chaminda,

This is true but the question makes no statement about the actual value of the message selectors. Therefore, the only assumption we can make is that they're performing their intended task which is of course to filter.

I've emailed Sun about this now. I'll update the thread accordingly if/when I get any feedback.

Kind regards,

Jonathan
+Pie Number of slices to send: Send
This is so confusing.

What kind of architect does Sun want?
+Pie Number of slices to send: Send
Well it seems like the purpose of the ePractice exam is to get you thinking, so it seems like it's working!

+Pie Number of slices to send: Send
When I answered this question, I selected D to be correct as you don't need a selector to pick ALL messages. I too felt that Sun's answer C is not correct.

I do agree though it is working in the sense that it is making you think and read more
+Pie Number of slices to send: Send
Hi all!
I also answered D, but the question specifies "How do both consumers ensure they receive all messages".
The only method for ensuring that a receiver get a message from a provider is with a "message selector", because "Message selectors assign the work of filtering messages to the JMS provider rather than to the application" (http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JMS4.html).

What do you think?
+Pie Number of slices to send: Send
As I understand, you need a message selector only when you want to filter messages based on some criteria/selection. In this case consumer(s) need to receive all messages. So no filtering criteria is required.
+Pie Number of slices to send: Send
 

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.



This particular question has been corrected. Now it says durable subscriber !
Beware the other head of science - it bites! Nibble on this message:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2432 times.
Similar Threads
JMS Message Selectors
A query about using Message Selectors option
Section 3: 3: Integration and Messaging - Objective 3.3
JMS Queue and Topic
SCEA 5/1 - JMS question.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:04:59.