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 51:

    A developer wants to create a Java Persistence query that will include a subquery. Which three are true? (Choose three.)

    A. Subqueries can be used in a FROM clause.
    B. Subqueries can be used in a WHERE clause.
    C. The ANY expression can be used only with a subquery.
    D. The EXISTS expression can be used only with a subquery.
    E. The MEMBER expression can be used only with a subquery.

  • Question 52:

    The developer wants to override the default mappings for an embeddable class Address used by the customer entity.

    The Address class is defined as follows:

    @Embeddable public class Address (

    private String street;

    private String city;

    private String country;

    . . .

    )

    Assume that NO mapping descriptor is present. Which code segment below shows the correct way to override the default mapping for address?

    A. @AttributeOverrides ({ @AttributeOverride (name = "street", column = @Column (name = ADDR_STREET)), @AttributeOverride (name = "city, column = @Column (name = ADDR_CITY)), @AttributeOverride (name = "country, column = @Column (name = ADDR_COUNTRY)), }} @Embedded Address addr;
    B. @ AttributeOverrides ({ @AttributeOverride (name = "street", column = @Column (name = "name_STREET")), @AttributeOverride (name = "city, column = @Column (name = "name_CITY")), @AttributeOverride (name = "country, column = @Column (name = "name_COUNTRY")), }} @Embedded Address addr;
    C. @ AttributeOverrides ({ @AttributeOverride (name = "street", column (name = "name_STREET")), @AttributeOverride (name = "city, column (name = "name_CITY")), @AttributeOverride (name = "country, column (name = "name_COUNTRY")), }} @Embedded Address addr;
    D. @AttributeOverrides ({ @AttributeOverride (name = "addr.street", column = @Column (name = ADDR_STREET)), @AttributeOverride (name = "addr.city", column = @Column (name = ADDR_CITY)), @AttributeOverride (name = "addr.country", column = @Column (name = ADDR_COUNTRY)), }} @Embedded Address addr;

  • Question 53:

    A developer wants to ensure that an entity's data is up-to-date with regard to the database. Which of the following statements is guaranteed to accomplish this?

    A. Call EntityManager.refresh on the entity.
    B. Add acacheable (false) annotation on the entity class.
    C. Call EntityManager.find on the entity.
    D. Use a named query to retrieve the entity.

  • Question 54:

    A developer has created a deep entity class hierarchy with many polymorphic relationships between entitles. Which inheritance strategy, as defined by the inheritanceType enumerated type, will be most performed in this scenario?

    A. Single table-per-class-hierarchy (InheritanceType.SINGLE_TABLE)
    B. Joined-subclass (inheritanceType. JOINED)
    C. Table-per-concrete-class (inheritanceType.TABLE_PER_CLASS)
    D. Polymorphic join table (inheritanceType. POLYMORPHIC_JOIN_TABLE)

  • Question 55:

    A session bean business method throws an exception during execution.

    Which two are responsibilities of the Bean Provider when throwing the exception? (Choose two.)

    A. For application exceptions, ensure that ifthe current transaction commits there will be noloss ofdata integrity.
    B. For application exceptions, ensure that the current transaction will commit.
    C. For system errors, when the client is remote through a java.rmi.remoteException that wraps the original exception.
    D. For checked exceptions from which the bean cannot recover, throw an EJBException that wraps the original exception.

  • Question 56:

    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 circustance that would cause setRollbackOnly to throw an IllegalStateException.
    C. The bean is using bean managed transaction demarcation, and uaerTransaccion.begin has been invoked.
    D. The setRollbackOnly method is invoked within a bean-managed transaction, and userTransaction.commit has NOT been invoked.

  • Question 57:

    A developer who is designing entity classes to map a legacy database encounters a table called STUDENT_RECORD.

    This table has two columns, STUDENT_ID and STUDENT_INFO_ID. The primary key of this table consists of both columns, and there is a unique constraint on each info column.

    The STUDENT_ID column is foreign key to the STUDENT table and STUDENT_INFO_ID column is a foreign key to the STUDENT_DAT table.

    What entity classes and relationships can the developer use to model these tables and relationship?(Choose two)

    A. Model the student table as a student entity and STUDENT_DATA table StudentData entity. Model the STUDENT_RECORDS table as bidirectional many-to-many relationship between the student entity on the student data entity.
    B. Model the STUDENT table as a Student entity and the STUDENT-DATA table as a StudentData entity. Model the STUDENT_RECORD table as a bidirectional one-to-one relationship between the student entity and the StudentData entity.
    C. Model the STUDENT table as a Student entity and the STUDENT-DATA table as a StudentData entity. Model the Student-Records table as a student record entity. Create a many-to- one one relationship from the StudentRecord entity to the student entity and many-to-one relationship from the StudentRecord entity entity to the Student entity and many-to-one relationship from the student entity to the StudentData entity and one-to-many relationship from the StudentData entity to the StudentRecord entity.
    D. Model the STUDENT table as a Student entity and the STUDENT-DATA table as a StudentData entity. Model the STUDENT-RECORD table as a StudentRecord entity. Create a bidirectional one-to-one relationship between the StudentRecord entity and bidirectional one-to- one relationship between the Student Record entity and the Student Data entity.

  • Question 58:

    An application that uses container-managed transaction demarcation creates a query within an active transaction and receives a QueryTimeoutException. Which of those scenarios describes what happens to the active transaction?

    A. The statement and the transaction continue.
    B. The query is recreated within the current transaction.
    C. The statement and the transaction are marked for rollback.
    D. The statement is rolled back, but the transaction continues.

  • Question 59:

    A user entity is retrieved in a query and stored in an instance variable user. The user entity has a single valued name property that uses the mapping defaults, and a photo property, which is lazily loaded. The application then calls the

    following method:

    PersistenceUtil.isLoaded (user);

    Which two of the following statements are correct?

    A. The name property was loaded from the database.
    B. The name property was NOTbeloaded from the database.
    C. The name property may or may not have been loaded from the database.
    D. The photo property was loaded from the database.
    E. The photo property was NOT loaded from the database.
    F. The photo property may or may not have been loaded from the database.

  • Question 60:

    The developer has modeled student interests as a set :

    @Entity public class Student {

    @Id int student Id;

    string name;

    @ElementaryCollection

    Set Interests;

    . . .

    }

    The developer wants the values of this set to be stored using a column named student_intersets.

    Select the item below that accomplishes this task:

    A. @ElementaryCollection @Column(name = "student_interests") Set interests;
    B. @ElementaryCollection (column = "student_intersets") Set interests;
    C. @ElementaryCollection @CollectionTable (column = "student_intersets") Set interests;
    D. @ElementaryCollection @CollectionTable (column = @column(name = "student_interests")) Set interests;

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.