nerdexam
Oracle

1Z0-895 · Question #33

A developer writes a Singleton bean that uses the java Persistence API within a business method: Two different concurrently executing caller threads acquire an EJB reference to PersonBean and each…

The correct answer is B. 1. Only one transaction is required. LockType READ allows simultaneous access to singleton beans. Note: READ public static final LockType READ For read-only operations. Allows simultaneous access to methods designated as READ, as long as no WRITE lock is held. javax.ejb, Enum…

Transactions

Question

A developer writes a Singleton bean that uses the java Persistence API within a business method: Two different concurrently executing caller threads acquire an EJB reference to PersonBean and each invoke the getPerson () method one time. How many distinct transaction are used to process the caller invocations?

Exhibit

1Z0-895 question #33 exhibit

Options

  • A0
  • B1
  • C2

How the community answered

(41 responses)
  • A
    10% (4)
  • B
    73% (30)
  • C
    17% (7)

Explanation

Only one transaction is required. LockType READ allows simultaneous access to singleton beans. Note: READ public static final LockType READ For read-only operations. Allows simultaneous access to methods designated as READ, as long as no WRITE lock is held. javax.ejb, Enum LockType

Topics

#Singleton bean#concurrent access#container-managed transactions#JPA

Community Discussion

No community discussion yet for this question.

Full 1Z0-895 Practice