Which two statements are true about the timer service of a business component container?

Which two statements are true about the timer service of a business component container?

Which two statements are true about the timer service of a business component container?

A.
Timed notifications for all types of session beans can be scheduled by using this service.

B.
When the server is shut down, the timer is persisted automatically and becomes active again
when the server is restarted.

C.
Each instance of message driven beans has unique timers.

D.
When stateful session bean instance is removed, the container detaches the timers associated
with the instance and allocates them to the new instance.

E.
When a transaction is rolled hark, the timer creation within the transaction is also rolled back.



Leave a Reply 8

Your email address will not be published. Required fields are marked *


kta

kta

A ispartially correct:Timed notifications for all types of session beans can be scheduled by using this service “!except!” statefull beans
B – correct accordingly specs
C – wrong
d – wrong
e correct accordingly to specs

wrong, correct are B and E

Pesho

Pesho

What about MDBs I have never heard of time service and MDBs

Jacobo

Jacobo

A – Wrong, not for stateful beans.
B – wright JEE 6 Tutorial “Timers are persistent by default. If the server is shut down or crashes, persistent timers are saved and will become active again when the server is restarted. If a persistent timer expires while the server is down, the container will call the @Timeout method when the server is restarted.”
C – it´s wrong
D – False, because A is False.
E – True; jee 6 tutorial: “An enterprise bean usually creates a timer within a transaction. If this transaction is rolled back, the timer creation also is rolled back. Similarly, if a bean cancels a timer within a transaction that gets rolled back, the timer cancellation is rolled back. In this case, the timer’s duration is reset as if the cancellation had never occurred.”

So, B&E are correct.

Ashishkumar

Ashishkumar

Nice Explanation !

Stephen Ubogu

Stephen Ubogu

B and E

Ashishkumar

Ashishkumar

BE

As per Jacobo comment.