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

    Which one of the following queries selects the customer whose order has the highest total price?

    A. CriteriaBuilder cb = ... Criteria Query cq = cb.create Query (Customer.class); Root c = cq.from(Customer.class); Join o = c.join(Customer .orders); cq.select(c).distinct(true); Subquery sq = cq.subquery(Double.class); Root subo = cq.correlate(o); sq.select(cb.max(subo.get(Order_.totalPrice))); cq.where(cb.equal(o.get(Order_.totalPrice), cb.all(sq)));
    B. CriteriaBuilder cb = ... CriteriaQuery cq = cb.createquery(customer.class) Root c = cq.from(Customer.class); Join o = c.join(Customer .orders); cq.select(c).distinct(true); Subquery sq = cq.subquery(Double.class); Root subo = cq.correlate(o); sq.select(cb.max(subo.get(Order_.totalPrice))); cq.where(cb.equal(o.get(Order_.totalPrice), cb.all(sq)));
    C. CriteriaBuilder cb = ... CriteriaQuery cq = cb.cteateQuery(Customer.class); Root c = cq.from(Customer.class); Join o = c.join(Customer .orders); cq.select(c).distinct(true); Subquery sq = cq.subquery(Double.class); Root subo = cq.correlate(o); sq.select(cb.max(subo.get(Order_.totalPrice))); cq.where(cb.equal(o.get(Order_.totalPrice), cb.all(sq)));
    D. CriteriaBuilder cb = ... CriteriaQuery cq = cb.createQuery(Customer.class); Root c = cq.from(Customer.class); Join o = c.join(Customer_.orders); cq.select(c).distinct(true); Subquery sq = cq.subquery(Double.class); Root subo = sq.from(Order.class); sq. select (ci: . max ( subo . get (Order_ . Total Price) ) ) ; cq.where(sq.all(o.gei(Order_.totalPrice)));

  • Question 12:

    An application has two entities, parson and Address.

    The application calls the DeletePersonsByStatus named query. Which of the following is true?

    A. The person entities are removed, but NOT their related address entities.
    B. The person entities, and all their related address entities, are removed.
    C. The DeletePersonsByStatus named query is ill-formed, and will be rejected by the persistence provider.
    D. The named query will fall.

  • Question 13:

    FooBean and BarBean are both EJB 3.0 stateless beans with container-managed transaction demarcation. All business methods in FooBean have transaction attribute REQUIRED, and all business methods in BarBean have transaction attribute REQUIRED_NEW. The business method foo in FooBean invokes the Business method bar in BarBean.

    Given:

    10.

    Public class BarBean {

    11.

    public void bar () {

    12.

    throw new RuntimeException ("unexpected error . . . ");

    13.

    }}

    Which is true about the method of invocation assuming execution reaches line 12?

    A. FooBean.foo method receives javax.ejb.EJBException.
    B. The BarBean bean instance is in ready state for the next invocation.
    C. FooBean.foo method receives javax -ejb. EJBTtansactionRolledbackException.
    D. FooBean.foo method receives the original RuntimeException thrown from BarBean.bar method.

  • Question 14:

    Consider a persistence application with following entity:

    @Entity

    Public class MyEntity {

    @Column (name = "FIELDA_COLUMN")

    int fieldA;

    int fieldB;

    int fieldC;

    int fieldD;

    An orm.xml is packaged in the application with the following contents:

    Which two of following statement are true. (Choose two)

    A. fieldA is mapped to column FIELDA
    B. fieldB is mapped to column NEW_COLB
    C. fieldD is a persistent attribute of MyEntity
    D. fieldD is not a persistence attribute of MyEntity

  • Question 15:

    An application uses an application-managed entity manager. Which of the following is NOT true?

    A. The application may specify whether the scope of the persistence context is extended.
    B. The application must use EntityManagerFactory instances to create entity managers.
    C. Entity manager instances must be explicitly closed.
    D. The application may need to call EntityManager. joinTransaction If a JTA aware entity manager is used.

  • Question 16:

    Which statement is true about the @OrderColumn annotation?

    A. If mime is not specified, it defaults to the foreign key column.
    B. The OrderColumn annotation may be specified only on a relationship.
    C. The OrderColumn annotation is always specified on the owning side of a relationship.
    D. The order column is not visible as part of the state of the entity.

  • Question 17:

    A developer wrote an entity class with the following method:

    Private static Logger logger = Logger.getLogger ("myLogger");

    @PrePersist

    @PreUpdate

    Public void doA ()

    { Logger.info ("A");

    }

    @PostPersist

    @PostUpdate

    Public void doB ()

    { logger.info ("B");

    }

    What will the log message contain when an application does the following?

    1.

    Begins a transaction

    2.

    Creates the entity

    3.

    Persists the entity

    4.

    Commits the transaction

    5.

    Begins the entity data

    6.

    Modifies the entity data

    7.

    Merges the entity

    8.

    Commits the second transaction

    A. A A B B
    B. A B A B
    C. A B B A B
    D. The application will throw an exception because multiple lifecycle callback annotations applied to a single method.

  • Question 18:

    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:

    -Person1 is a Person entity with a primary key of 50

    -Parent1is a Parent entity with a primary key of 100

    -Child1 is a chi id entity with a primary key of 400

    -

    Child2 is a child entity with a primary key of 600

    Caching has been enabled in the persistence unit, the persistence provider supports caching, and none of entities have the Cacheable annotation applied, or a cacheable XML element in persistence.xml.

    The application executes the following code:

    Cache cache = . . . ;

    Cache.evict(person.class)

    Assume there is no concurrent activity involving the cache. Which two statements are correct? (Choose two)

    A. Only person1 will be removed from cache.
    B. Person1, parent1, child1, and child2 will be removed from cache.
    C. Result is true
    D. Result is false

  • Question 19:

    A developer wants to model the grades for a student as a Map. Assume that Student and Course are entitles, and that grades are modeled by integers.

    Which of the following two statements are correct? (Choose two)

    A. The developer can model the grades as an element collection in the Student entity.
    B. The developer can model the grades as a oneToMany relationship in the Student entity.
    C. The mapping for the key of the map can be specified by the @MapKeycolumn annotation.
    D. The mapping for the value of the map can be specified by the @Column annotation.

  • Question 20:

    Consider the following web application: Here MyEntity1.class and MyEntity2.class are annotated with @Entity and MyEmbeddable1-class and MyEmbeddable2-class are annotated with @Embeddable. MyPU is container managed. Which of the following represents set of classes considered managed by MyPU?

    A. MyEntity1, and MyEmbeddable1
    B. MyEntity1, MyEmbeddable1, MyEntity2, and MyEmbeddable2
    C. MyEntity1, MyEmbeddable1, and MyEntity2
    D. MyEntity1 and MyEntity2

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.