users@ejb-spec.java.net

[ejb-spec users] [jsr345-experts] Re: [ejb-spec issues] [JIRA] Commented: (EJB_SPEC-47) Discovering all timers within the container

From: Adam Bien <abien_at_adam-bien.com>
Date: Thu, 3 May 2012 04:01:37 +0200

On 18.04.2012, at 22:31, arjan tijms (JIRA) wrote:

>
> [ http://java.net/jira/browse/EJB_SPEC-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=338135#action_338135 ]
>
> arjan tijms commented on EJB_SPEC-47:
> -------------------------------------
>
>> It can be a security issue to get access to the timers of one application from within another application deployed into the same server.
>> What would a be scenario where an application needs to know all the timers?
>
> I can't speak for Piotr, but I guess what was actually meant is discovering all timers within a single application.
>
> At least for that the scenarios are plenty, with an example being able to build an admin page showing all active timers in an application and offering the ability to invoke any one of those via a button.

Exactly. It is one of the remaining reasons, why you still sometimes need Quartz Scheduler.

+1 for getTimers for admin purposes.

>
>> Discovering all timers within the container
>> -------------------------------------------
>>
>> Key: EJB_SPEC-47
>> URL: http://java.net/jira/browse/EJB_SPEC-47
>> Project: ejb-spec
>> Issue Type: New Feature
>> Reporter: Piotr Nowicki
>>
>> It would be nice to have a well defined way to access all timers available in the container. Right now, we can fetch only timers associated with particular bean using i.e. injected TimerService and its getTimers().
>> How about defining either:
>> a.) additional method, i.e.
>> TimerService#getAllTimers()
>> b.) overloaded method, i.e.:
>> TimerService#getTimers(boolean containerWide)
>> when set to 'true' it would return all available timers on the container level; when set to 'false' it would return bean-private timers only.
>> TimerService#getTimers() and TimerService#getTimers(false) must yield the same results.
>> This problem has been "discussed" i.e. here: http://stackoverflow.com/questions/4530275/how-to-get-all-ejb-timers or here: http://stackoverflow.com/questions/8681557/job-scheduling-ejb-3-1-timers-or-quartz/8683595#8683595
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators: http://java.net/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>