Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Timeout mechanism in EJB  RSS feed

 
Pearlo Muthukumaran
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
How to implement a timeout mechnaism within a SLSB/SFSB method or a MDB?
The requirement is that an EJB Client invokes a method and witin the method some resource is called and after sometime later say 4 secs some other component is to be checked if an attribute is set and based on that the method must return some object back to the calling client.....ALL SYNCHRONOUSLY CARRIED OUT....!!!
I have gone through EJB timers for a roundabout.....but they are in 2.1 and I'm using 2.0.
I know that it is RIDICULOUS even to think of threads as that will create a chaos (even if some app server allows it!!! lots are forums have lots of discussions about this)
How about this ??
starttime = System.currentTimeMillis();
endtime = starttime + interval;
while(System.currentTimeMillis()!=endtime){
SIMPLY IDLE........
}
blah.......
blah.......
Can anyone provide me pointers.
Rgds
 
Pearlo Muthukumaran
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone had any idea about the timeout mechanism please?
Rgds
Muthu
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!