Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Retry logic in EJB tier (e.g. how to workaround thread limitations)  RSS feed

 
wayne stevens
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to implement basic retry logic in the EJB tier. Something similar to
while number of trys is less than max trys
try something
if it doesn't work wait a few seconds
try again
Trouble is, waiting a few seconds in an EJB tier is no easy feat since you cannot use threads. Surely somebody has run into this problem and worked out a solution.
Any ideas??
thanks!!
wayne
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In most solutions I've seen the retry is driven from outside the EJB -- e.g. from a thread in the servlet tier.
Kyle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!