• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sun ePractice Examination Errors - JMS

 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't get it. What is difference b/w Option c and d?

Somebody sheds some light.

Thanks!
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is so confusing.

What kind of architect does Sun want?
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well it seems like the purpose of the ePractice exam is to get you thinking, so it seems like it's working!

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Sreeni Jamakayala
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 !
 
reply
    Bookmark Topic Watch Topic
  • New Topic