nerdexam
Oracle

1Z0-895 · Question #62

A developer implements a stateless session bean as a timed object. The bean contains two local business methods with the transaction attribute REQUIRED. A client begins a UserTransaction and calls…

The correct answer is A. 0. An enterprise bean usually creates a timer within a transaction. If this transaction is rolled back,the timer creation also is rolled back. The transaction will roll back. The creation of the timer will rock back. There will be zero timers. Note: The UserTransaction interface…

Timer Service

Question

A developer implements a stateless session bean as a timed object. The bean contains two local business methods with the transaction attribute REQUIRED. A client begins a UserTransaction and calls the foo local business method. The foo method returns five seconds later. The client rolls back the transaction and then calls the bar local business method. Assuming there have been no other client invocations on the stateless session bean, what is the value of the size variable when control reaches Line 18?

Exhibit

1Z0-895 question #62 exhibit

Options

  • A0
  • B1
  • C-1

How the community answered

(21 responses)
  • A
    76% (16)
  • B
    19% (4)
  • C
    5% (1)

Explanation

An enterprise bean usually creates a timer within a transaction. If this transaction is rolled back,the timer creation also is rolled back. The transaction will roll back. The creation of the timer will rock back. There will be zero timers. Note: The UserTransaction interface defines the methods that allow an application to explicitly manage transaction boundaries. rollback() rolls back the transaction associated with the current thread. Returns the number of elements in this collection. If this collection contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE. The Java EE 6Tutorial. PartNo: 821?Transactions andTimers

Topics

#timer service#REQUIRED transaction attribute#UserTransaction rollback#timed object

Community Discussion

No community discussion yet for this question.

Full 1Z0-895 Practice