How to get all EJB timers?
问题 In EJB 3.1 I can get all timers for a specific bean using TimerService#getTimers() on the TimerService instance obtained for that bean. What I actually need however is a system-wide version of this. I.e. I would like to have a list of all Timers in the EJB container. Is something like that possible? 回答1: There simply is no official API for this in EJB 3.1. If you're only using annotations and/or interfaces to mark your timeout method, you could do a run-time walk over all classes on the class