Best approach to poll information from a database within an EJB -
i trying poll information database in ejb. specifically, need check if condition met before proceeding other business logic in ejb. know best approach tackle this? thinking of sort of job scheduler polls info database, , once condition met notify ejb continue. believe using thread.sleep in loop during transaction bad idea, not sure. help.
well, after research ended using ejb timer , @asynchronous annotation on ejb method (both methods worked well). idea set timers query database periodically , check if condition interested in met.
Comments
Post a Comment