A developer needs to include a set of managed classes in a persistence unit. Which two solutions are correct? (Choose two.) A. Place the class files in the orm.xml file. B. Place the class files in the root of the…

An application creates a TypedQuery object to perform a query, and sets the query object’s flush mode by calling setFlushMode (FlushModeType.commit). The query is executed within a transaction. Which of the following is true? A. Updates to the database tables…

An application has two entities, Department and Employee, and there is a one-to-many relationship between them. The application has the following query: SELECT d FROM Department d LEFT JOIN FETCH d. employees WHERE d.name = : name After receiving the…

An application has three entities: the mapped superclass person class entity, and the parent and child entities, which are subclasses of person. The application has created four entity Instances: Caching has been enabled in the persistence unit, the persistence provider…

Persistence application locks entity x with a LockModeType. PESSIMISTIC_READ lock type, which statement is true? A. This operation will force serialization among transactions attempting to read the entity data. B. This operation will result in a TransactionRolledbackException if the lock…

A session bean business method invokes UserTransaction.setRollbackonly and receives an IllegalStateException. Under which circumstance can this happen? A. The bean is using bean-managed transactions regardless of whether there is an active transaction. B. There is no circumstance that would cause…