nerdexam
Oracle

1Z0-895 · Question #2

You are writing a client that sends a message to a JMS queue. The client includes the following code snippet:

The correct answer is D. You could add more name-value pairs to the message body of the MapMessage if they were required by. createMapMessage MapMessage createMapMessage() throws JMSException Creates a MapMessage object. A MapMessage object is used to send a self-defining set of namevalue pairs, where names are String objects and values are primitive values in the Java programming language…

Server Installation and Configuration

Question

You are writing a client that sends a message to a JMS queue. The client includes the following code snippet:

Options

  • AThe message can be consumed by durable subscriber.
  • BIn the first line, the argument to the createProducer method needs to be cast to a Destination.
  • CThe message is sent using non-default deliver mode, priority, and expiration time values.
  • DYou could add more name-value pairs to the message body of the MapMessage if they were required by

How the community answered

(34 responses)
  • A
    3% (1)
  • B
    12% (4)
  • C
    6% (2)
  • D
    79% (27)

Explanation

createMapMessage MapMessage createMapMessage() throws JMSException Creates a MapMessage object. A MapMessage object is used to send a self-defining set of namevalue pairs, where names are String objects and values are primitive values in the Java programming language. javax.jms,Interface Session

Topics

#JMS#MapMessage#MessageProducer#delivery mode

Community Discussion

No community discussion yet for this question.

Full 1Z0-895 Practice