Which two code fragments can be used on Line 22 to persist an order instance assuming that all references are properly initialized?

Given this Java EE application that uses a JTA application-managed entity manager:
20. UserTransaction utx = …;
21. utx.beginQ;
22. // insert code here
23. utx.commitQ;
Which two code fragments can be used on Line 22 to persist an order instance assuming that all
references are properly initialized? (Choose two.

Given this Java EE application that uses a JTA application-managed entity manager:
20. UserTransaction utx = …;
21. utx.beginQ;
22. // insert code here
23. utx.commitQ;
Which two code fragments can be used on Line 22 to persist an order instance assuming that all
references are properly initialized? (Choose two.

A.
em.merge(order); em.flushQ;

B.
em.persist(order); em.flushO;

C.
em.joinTransactionO; em.persist(order);

D.
em = emfcreateEntityManagerQ; em.persist(order);



Leave a Reply 0

Your email address will not be published. Required fields are marked *