Java EE 6 Java Persistence API Developer Certified Expert

Here you have the best Oracle 1z0-898 practice exam questions

  • You have 63 total questions to study from
  • Each page has 5 questions, making a total of 13 pages
  • You can navigate through the pages using the buttons at the bottom
  • This questions were last updated on October 27, 2025
  • This site is not affiliated with or endorsed by Oracle.
Question 1 of 63
Entity lifecycle callback methods may be defined in which three classes? (Choose three)
    Correct Answer: B, D, E

Question 2 of 63
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?
    Correct Answer: A

Question 3 of 63
A developer is creating an entity which is mapped to a table that has a primary key constraint defined on two character columns and would like to use mapping defaults as much as possible to simplify the code.
Which two mapping options can be chosen? (Choose two.)
    Correct Answer: C, E

Question 4 of 63
A developer wants to model the grades for a student as a Map<course, integer>. Assume that Student and Course are entitles, and that grades are modeled by integers.
Which of the following two statements are correct? (Choose two)
    Correct Answer: A, D
    A: JPA 2.0 defines an ElementCollection mapping. It is meant to handle several non-standard relationship mappings. An ElementCollection can be used to define a one-to-many relationship to an Embeddable object, or a Basic value (such as a collection of Strings). An ElementCollection can also be used in combination with a Map to define relationships where the key can be any type of object, and the value is an Embeddable object or a Basic value.
    D:
    Example of an ElementCollection relationship database:
    Exam 1z0-898: Question 4 - Image 1
    Example of an ElementCollection relationship annotations
    @Entity
    public class Employee {
    @Id
    @Column(name="EMP_ID")
    private long id;
    ...
    @ElementCollection
    @CollectionTable(
    name="PHONE",
    joinColumns=@JoinColumn(name="OWNER_ID")
    )
    private List<Phone> phones;
    ...
    }
    @Embeddable
    public class Phone {
    private String type;
    private String areaCode;
    @Column(name="P_NUMBER")
    private String number;
    ...
    }
    Reference: Java Persistence/ElementCollection AD
Question 5 of 63
Consider a persistence application with the following orm.xml:
Exam 1z0-898: Question 5 - Image 1
What will be the effect of the above orm.xml?
    Correct Answer: D