This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes timers related doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "timers related doubt" Watch "timers related doubt" New topic
Author

timers related doubt

Aditya Vasudeva
Ranch Hand

Joined: May 27, 2008
Posts: 76
in the spec it says that a timeout callback method must execute within a transaction.
Isn't it possible that the timer expires when a transaction is not active?
What would happen then? Is it therefore, necessary to mention a REQUIRED or REQUIRES_NEW for a timeout callback method??
Vinay Nath
Ranch Hand

Joined: Jul 06, 2008
Posts: 85
you are absolutely right, required and requires_new make sure when timeout method is called there is a new transaction created for the method when CMT is used.

I guess when using BMT you have to create a new transaction in the timeout method manually using userTransaction object but nothing abt it is mentioned in specs.


SCDJWS 5.0, SCBCD 5.0, SCWCD 5.0, SCJP 5.0
Aditya Vasudeva
Ranch Hand

Joined: May 27, 2008
Posts: 76
thanks for the explanation, vinay
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: timers related doubt
 
Similar Threads
Container-Managed Transaction
Java Beat Question
Transaction Attribute for timeout callback method
Enthuware questions
Transactions