users@glassfish.java.net

Re: Why does my timer expunge?

From: Lachezar Dobrev <l.dobrev_at_gmail.com>
Date: Tue, 6 Aug 2013 14:52:25 +0300

  Did the 'catch' code crash?

2013/8/6 Oliver B. Fischer <mailsink_at_swe-blog.net>:
> Hi,
>
> I have a timeout callback method in a singleton which starts every minute:
>
> @Schedule(hour = "*", minute = "*", timezone = "UTC",
> persistent = false, info = "InitialESSyncTimer")
> protected void triggerFullUpdateAfterApplicationStart()
> {
> try {
> runFullUpdate();
> }
> catch (RuntimeException e) {
> ...
> }
> }
>
> This method is always expunged by GlassFish on every occurence of
> RuntimeException? But why? I catch every exception. Actually the container
> is only allowed to expunge a timer if the callback method throws an
> exception.
>
> What did I miss?
>
> Best,
>
> Oliver