This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Sun ePractice Examination Errors - JMS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Sun ePractice Examination Errors - JMS" Watch "Sun ePractice Examination Errors - JMS" New topic
Author

Sun ePractice Examination Errors - JMS

J J Wright
Ranch Hand

Joined: Jul 02, 2008
Posts: 254
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
Lann Lu
Ranch Hand

Joined: May 31, 2008
Posts: 45
I don't get it. What is difference b/w Option c and d?

Somebody sheds some light.

Thanks!
Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 402
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
J J Wright
Ranch Hand

Joined: Jul 02, 2008
Posts: 254
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.
Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 402
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 ]
J J Wright
Ranch Hand

Joined: Jul 02, 2008
Posts: 254
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
Lann Lu
Ranch Hand

Joined: May 31, 2008
Posts: 45
This is so confusing.

What kind of architect does Sun want?
Bryan Aho
Ranch Hand

Joined: Feb 28, 2006
Posts: 57
Well it seems like the purpose of the ePractice exam is to get you thinking, so it seems like it's working!



Bryan Aho<br />Trinity Technology Group
Sreeni Jamakayala
Greenhorn

Joined: Sep 10, 2008
Posts: 18
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
giuseppe fanuzzi
Ranch Hand

Joined: Sep 18, 2006
Posts: 99
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?


GiUsEpPe (SCJP, SCWCD, SCBCD, IBM OOAD, SCEA/OCMJEA 5)
Sreeni Jamakayala
Greenhorn

Joined: Sep 10, 2008
Posts: 18
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.
Vinod Iyer
Ranch Hand

Joined: Apr 13, 2006
Posts: 53
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 !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sun ePractice Examination Errors - JMS
 
Similar Threads
JMS Message Selectors
Section 3: 3: Integration and Messaging - Objective 3.3
SCEA 5/1 - JMS question.
A query about using Message Selectors option
JMS Queue and Topic