This content has been marked as final.
Show 4 replies
-
1. Re: MDB and @Timeout
fvnkerk Dec 15, 2009 9:36 AM (in response to fvnkerk)Is @Timeout even supported in JBoss 4.2.3.GA? -
2. Re: MDB and @Timeout
jaikiran Dec 15, 2009 2:08 PM (in response to fvnkerk)Try this against latest stable JBoss AS-5.1.0. -
3. Re: MDB and @Timeout
fvnkerk Dec 17, 2009 8:32 AM (in response to jaikiran)I tried it on JBoss AS 5.1.0.GA as you suggested but got the same behaviour. The process did however lead me to some other tests to see what could be wrong.
What I found was that if I remove the timer.cancel() call in onMessage(...), the timeout method is called after completion of onMessage(...) and not when the timeout occurs.
So one of the following must be the case:
- The timeout method is called on the same instance that created the Timer. I was under the impression that the timeout method can be called on any instance of the Mdb pool.
- I only have one MDB instance. Eventhough I set the minimum instances to 5.
- The TimerService and @Timeout cannot be used like this.
Not sure which yet.
- The timeout method is called on the same instance that created the Timer. I was under the impression that the timeout method can be called on any instance of the Mdb pool.
-
4. Re: MDB and @Timeout
jaikiran Dec 17, 2009 8:46 AM (in response to fvnkerk)TimerService is transaction aware resource. Which means that your calls to createTimer will not be actually complete, unless the transaction completes. In your case, you are calling the cancel even before the transaction (associated with the onMessage) completes. Hence the timer is not being created.