EJB 3.0 Timer Cluster Information

I was able to get some hands on the EJB3.0 Timer Service.I was able to get a timeout, and I was able to call the timer using the servlet. Context List. I deployed a simple application that sends alerts at a certain interval. I use WL 10.3.1 (does not support EJB3.1 to use Scheduler). I get warnings twice at the same time (I have a cluster with two managed servers). I looked at several examples of using a timer in a WL cluster, for example: http://shaoxiongyang.blogspot.com/2010/10/how-to-use-ejb-3-timer-in-weblogic-10.html . But I would like to avoid any configuration on the server. Is there any other way that this can be controlled in Cluster Env. I want a single timer to work at any time in the Env cluster.

Thanks...

+1
source share
1 answer

Servlet context listeners unconditionally create a timer during contextInitialized? If so, this explains the problem, since the servlet context listener will run in each JVM. You need to somehow check if the first timer has already been created. Either use getTimers, or check / insert a row into your own database table.

0
source

Source: https://habr.com/ru/post/919239/


All Articles