nerdexam
Oracle

1Z0-860 · Question #140

A Java Persistence application has been developed for a Java SE environment and the persistence, xml file looks like this: <persistence-unit name="OrderManagement" transaction-type=RESOURCE_LOCAL>…

The correct answer is B. Remove the transaction type attribute. See the full explanation below for the reasoning.

Question

A Java Persistence application has been developed for a Java SE environment and the persistence, xml file looks like this: <persistence-unit name="OrderManagement" transaction-type=RESOURCE_LOCAL> <mapping-file>order-mappings.xml</mapping-file> <class>com.acme.Order</class> <class>com.acme.Customer</class> <class>com.acme.ltem</class> <properties> <property name="com. acme, persistence, monitoring" value="0N7> </properties> </persistence-unit> Now the developer wants to repackage it as a Java EE application and try it on several compliant Java EE 5 containers using injection to get an entity manager. Which change is needed to make to the persistence.xml?

Options

  • ASpecify the JTA data source.
  • BRemove the transaction type attribute.
  • CRemove the vendor-specific properties.
  • DRemove the list of all managed classes.

How the community answered

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

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice