Question 21 of 72 from exam 1Z0-900: Java EE 7 Application Developer

Question 21 of 72 from exam 1Z0-900: Java EE 7 Application Developer

Question

Given the code fragment:

@Resource(lookup = "java:comp/DefaultJMSConnectionFactory")
private ConnectionFactory cf;
@Resource(lookup = "jms/MyTopic")
private Topic topic;
public void action() {
try (IMSContext ctx =
cf.createContext(JMSContext. SESSION_TRANSACTED);) {
JMSConsumer cl = ctx.createConsumer(topic, "(grade > 50)");
JMSConsumer c2 = ctx.createConsumer(topic, "(grade <= 50)");

How are transactions managed?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

D.