1Z0-898 Exam Details

  • Exam Code
    :1Z0-898
  • Exam Name
    :Java EE 6 Java Persistence API Developer Certified Expert
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :63 Q&As
  • Last Updated
    :Dec 12, 2021

Oracle 1Z0-898 Online Questions & Answers

  • Question 41:

    If a Persistence application locks entity x with a LockModeType.OPTIMISTIC_FORCE INCREMENT lock type, which statement is true?

    A. The Persistence application must increment the version value prior to locking the entity.
    B. This operation will result in a PersistentLockException for a non-versioned object.
    C. This operation will result in a PersistentLockException if the version checks fail.
    D. LockModeType.OPTIMISTIC_FORCE_INCREMENT is the synonym of the LockModeType.WRITE lock type.

  • Question 42:

    A JavaEE application is packaged as follows.

    Which of the following is true for a portable JavaEE application?

    A. This is an invalid application. A JavaEE application cannot have more than one persistent with same name.
    B. "MyPu" defined under each module is visible to only the defining module. There is no way other modules can access it.
    C. Code in the ejb1.jar can access "MyPU" defined under war1.war using "war1#myPU"

  • Question 43:

    Which two of the following statements are true of embeddable classes? (Choose two)

    A. An embeddable class must not be used to represent the state of another embeddable class.
    B. Null comparison operations over embeddable classes are not supported in the Java Persistence query language.
    C. An embeddable class must not contain a relationship to an entity.
    D. An embeddable class can be the key of a Map relationship.

  • Question 44:

    A named query that sets an exclusive pessimistic on the entities returned by the query by setting the NamedQuery lockMode element to LockModeType.PESSIMISTIC_FORCE_INCREMENT. The application starts transaction and executes the query.

    Which of the following statements is correct about the entities returned by the query?

    A. Only the current transition may modify or delete the entity instances.
    B. The current transaction may NOT modify or delete the entity instances.
    C. Other concurrent transactions may modify or delete the entity instances.
    D. Other concurrent transactions may modify but MAY NOT delete the entity instances.

  • Question 45:

    Given the following stateless session bean implementation classes:

    Assuming no other transaction-related metadata, what are the transaction attributes on methodB, and methodC respectively?

    A. MANDATORY, MANDATORY, and MANDATORY
    B. REQUIRED, MANDATORY, andREQUIRES_NEW
    C. MANDATORY, MANDATORY,
    D. REQUIRED, REQUIRES_NEW, and REQUIRES_NEW

  • Question 46:

    Given the following entity classes:

    @Entity

    @cacheable (true)

    Public class A { . . . }

    @Entity

    @cacheable (false)

    Public class B { . . .}

    @Entity

    Public class C { . . . }

    If the shared-cache-mode element of persistence.xml is set to ENABLE _SERVICE, which entities are cached when using a persistence provider that supports caching?

    A. A only
    B. A and B
    C. A and C
    D. A, B, and C

  • Question 47:

    The department entity has a unidirectional OneToMany relationship to the employee entity. The developer wants to model this relationship as a java.util.map such that the key of map is true employee name. The primary key of the Employees entity is empId, an integer.

    Which of the following is correct?

    A. @OneToMany (targetEntity = Employee.class) @MapKeyClass (string.class) map employees;
    B. @OneToMany @mapKey (name, "name") map < integer, Employee> Employees;
    C. @OneToMany @MapKeyJoinColumn (name = "name") map employees;
    D. @OneToMany @mapsId (name = "name") map employees;

  • Question 48:

    If a Persistence application locks entity x with a pessimistic lock, which statement is true?

    A. The Persistentprovider will lock the database row(s) that correspond to all persistent fields of properties of an instance, including element collections.
    B. Only single table per class hierarchy mapping is supported with this lock type.
    C. A Persistence provider will lock the entity relationships for which the locked entity contains the foreign key.
    D. A separate lock statement must be called for each subclass in entity hierarchy.

  • Question 49:

    Which cascade option can be specified in a mapping descriptor so that it applies to all relationships in a persistent e unit?

    A. cascade all
    B. cascade detach
    C. cascade remove
    D. cascade-persist

  • Question 50:

    The Contact Information embeddable class contains address information as well as a reference to a phone entity. The ContactInformation class is defined as follows:

    @Embeddable public class ContactInformation

    { String street;

    String city;

    @OneToOne Phone phone;

    }

    The developer wants to use this class in an Employee entity, but override the default name of the foreign key to the Phone entity. Which of the code segments shows how to do this correctly?

    A. @Entity public class Employee { @Id int empId; @AssociationOverride (name = empInfo.phone", joinColumn = @JoinColumn) (name = "INFO_FK")) ContactInformation empInfo; }
    B. @AssociationOverride (name = "empInfo.phone", joinColumn = "INFO_FK") @Id int empId; @ContactInformation empInfo; }
    C. @ AssociationOverride (name = "empInfo.phone", joinColumn = "INFO_FK") Entity public class Employee { @Id int empId; }
    D. Entity public class Employee { @Id int empId; @ AssociationOverride (name = "empInfo.phone", joinColumn = "INFO_FK") ContactInformation empInfo; }

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Oracle exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 1Z0-898 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.