EJB3 Timer-service in cluster environment

41 views
Skip to first unread message

Amol

unread,
Jul 14, 2020, 1:54:57 AM7/14/20
to Thorntail
Hi, 

I am trying to have EJB3 Timer-Service in cluster env. 

I am trying to achieve this by adding below properties in 

-Dthorntail.ejb3.timer-service.default-data-store=TEST-EJB-Timer
-Dthorntail.ejb3.timer-service.thread-pool-name=default
-Dthorntail.ejb3.timer-service.database-data-stores.TEST-EJB-Timer.database=postgresql
-Dthorntail.ejb3.timer-service.database-data-stores.TEST-EJB-Timer.datasource-jndi-name=<data-store-jndi-name>
-Dthorntail.ejb3.timer-service.database-data-stores.TEST-EJB-Timer.partition=timer  
-Dthorntail.ejb3.timer-service.file-data-stores.TEST-EJB-Timer.path=<data-store-path>

Added timer-sql.properties under module org/jboss/as/ejb3/main/timers


create-table.postgresql=create table jboss_ejb_timer (id varchar primary key not null, timed_object_id varchar not null, initial_date timestamp, repeat_interval bigint, next_date timestamp, previous_run timestamp, primary_key varchar, info varchar, timer_state varchar, schedule_expr_second varchar, schedule_expr_minute varchar, schedule_expr_hour varchar,schedule_expr_day_of_week varchar, schedule_expr_day_of_month varchar, schedule_expr_month varchar, schedule_expr_year varchar, schedule_expr_start_date varchar, schedule_expr_end_date varchar, schedule_expr_timezone varchar, auto_timer boolean, timeout_method_name varchar, timeout_method_declaring_class varchar, timeout_method_descriptor varchar, calendar_timer boolean, partition varchar not null);
create-timer.postgresql=insert into jboss_ejb_timer (id, timed_object_id, initial_date, repeat_interval, next_date, previous_run, primary_key, info, timer_state, schedule_expr_second, schedule_expr_minute, schedule_expr_hour, schedule_expr_day_of_week, schedule_expr_day_of_month, schedule_expr_month, schedule_expr_year, schedule_expr_start_date, schedule_expr_end_date, schedule_expr_timezone, auto_timer, timeout_method_name, timeout_method_declaring_class, timeout_method_descriptor, calendar_timer, partition) values ((?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?), (?));
update-timer.postgresql=update jboss_ejb_timer set next_date=(?), previous_run=(?), timer_state=(?) where timed_object_id=(?) and id=(?) and partition=(?);
delete-timer.postgresql=delete from jboss_ejb_timer where timed_object_id=(?) and id=(?) and partition=(?);
load-all-timers.postgresql=select id, timed_object_id, initial_date, repeat_interval, next_date, previous_run, primary_key, info, timer_state, schedule_expr_second, schedule_expr_minute, schedule_expr_hour, schedule_expr_day_of_week, schedule_expr_day_of_month, schedule_expr_month, schedule_expr_year, schedule_expr_start_date, schedule_expr_end_date, schedule_expr_timezone, auto_timer, timeout_method_name, timeout_method_declaring_class, timeout_method_descriptor, calendar_timer from jboss_ejb_timer where timed_object_id=(?) and partition=(?);
load-timer.postgresql=select id, timed_object_id, initial_date, repeat_interval, next_date, previous_run, primary_key, info, timer_state, schedule_expr_second, schedule_expr_minute, schedule_expr_hour, schedule_expr_day_of_week, schedule_expr_day_of_month, schedule_expr_month, schedule_expr_year, schedule_expr_start_date, schedule_expr_end_date, schedule_expr_timezone, auto_timer, timeout_method_name, timeout_method_declaring_class, timeout_method_descriptor, calendar_timer from jboss_ejb_timer where timed_object_id=(?) and id=(?) and partition=(?);



But after adding above properties Uber JAR is not getting started.

Can someone please help me understand what is missing/wrong with the configuration?
 
Any sample for Timer-Server will help.

Thanks,
-Amol

Ladislav Thon

unread,
Jul 14, 2020, 3:48:37 AM7/14/20
to thor...@googlegroups.com

Hi,

I'm afraid your message has very little details about what's actually going on (e.g. what's the error message?), but I can tell you one thing: Thorntail doesn't support clustering. If you were able to get some of it running, nice for you, but this is certainly out of Thorntail scope. If you want application server clustering, I recommend you move to WildFly.

Thanks for understanding,

LT

--
You received this message because you are subscribed to the Google Groups "Thorntail" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thorntail+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thorntail/b43c4790-cd15-4f21-824f-0ee09a207e5do%40googlegroups.com.

Amol

unread,
Jul 14, 2020, 5:03:38 AM7/14/20
to Thorntail
Thanks, LT for the updates.

I really want to support EJB3 Timer-Service in Clustered Env. through Throntail microservice but seems Throntail doesn't support clustering.

Do you have any plans to support the same?

-Amol

To unsubscribe from this group and stop receiving emails from it, send an email to thor...@googlegroups.com.

Ladislav Thon

unread,
Jul 14, 2020, 5:19:55 AM7/14/20
to thor...@googlegroups.com

I'm afraid that is not gonna happen.

If you really want application server clustering, please investigate moving to WildFly. They have full MicroProfile support now, and are working on an uberjar packaging as well:

LT

To unsubscribe from this group and stop receiving emails from it, send an email to thorntail+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thorntail/c683cfd5-c96a-480c-b1c4-44eb1d178618o%40googlegroups.com.

Amol

unread,
Jul 14, 2020, 7:39:19 AM7/14/20
to Thorntail
Thanks LT for the help.

Sure I will investigate on this. 

-Amol
Reply all
Reply to author
Forward
0 new messages