Free Oracle 1Z0-860 Exam Questions (page: 12)

B. Thepassed object is NOT found inthedatabase.
C. The passed object is NOT managed by the entity manager.
D. There is no active transaction to manage the database removal.
Answer(s): C
QUESTION: 31
A developer is designing a Java Persistence application that is mapped to a set of existing
tables.
This set includes table EMPLOYEE, DEPARTMENT, and PROJECT. Tables EMPLOYEE and
DEPARTMENT do NOT define any foreign key constraints to table PROJECT. Table PROJECT
defines foreign key constraints with references to tables EMPLOYEE and DEPARTMENT and
an extra column called COST. The table EMPLOYEE is mapped to an entity Employee and the
table DEPARTMENT to an entity Department.
How can the table PROJECT be mapped so the persistence application can be portable?

A. Such sets of tables cannotbemappedandkeep the application portable.
B. Map thetablePROJECT asasecondary table for either the Employee or Departmententity.
C. Map the table PROJECT to bidirectional many-to-many relationships between the
Employeeand Departmentusing a Java. util.Mapas the type ofthefield or property.
D. Mapthe tablePROJECT to an entity Projectwith afield or property cost mappedto thecolumn
COST and one-to-many relationshipstothis entity in the Employee and the Department.
Answer(s): D
QUESTION: 32
A CMT session bean named MrBean contains a method storeStuff which is annotated as
follows:
22. @TransactionAttributeO"ransactionAttributeType.REQUIRES_NEW)
23. public void storeStuffO {
Al other methods of this bean have no transaction annotations. Given the following part of an
ejbjar.
xml:
23. <container-transaction>
24. <method>
25. <ejb-name>MrBean</ejb-name>
26. <method-name>*</method-name>
27. </method>
28. <transaction-attribute>NotSupported</transaction-attribute>
29. </container-transaction>
Which statement is correct about the methods in MrBean?

A. Al methods of MrBean have transaction attribute REQUIRED.
B. Al methodsofMrBean have transactionattribute NONSUPPORTED.
C. MethodstoreStuffhastransactionattributeREQUIRES_NEWandthe other methods have
transaction attribute REQUIRED.
D. Method storeStuff has transaction attribute NONSUPPORTED and the other methods have
transaction attribute REQUIRED.
E. Method storeStuff has transaction attribute REQUIRES NEWandthe other


13

Viewing page 12 of 108



Post your Comments and Discuss Oracle 1Z0-860 exam prep with other Community members:

1Z0-860 Exam Discussions & Posts