Exam 1z0-900 All QuestionsBrowse all questions from this exam
Question 34

Given the code fragment:

How can you get all property names of a JMS message in the JMS consumer onMessage operation?

    Correct Answer: B

    The correct way to get all property names of a JMS message in the JMS consumer onMessage operation is by using the getPropertyNames method, which returns an Enumeration. Therefore, the correct answer is: Enumeration props = msg.getPropertyNames();

Discussion
kozionovOption: B

B https://docs.oracle.com/javaee/7/api/javax/jms/Message.html#getPropertyNames--

orjavaOption: B

Answer B