How to force EJB Scheduler in JBeret

87 Views Asked by At

I'm implementing a Scheduler based in JBeret SchedulerTimer.

I had it working with the possibility of "Calendar-based Schedule" and "persistence" (EJB Timer), but currently the project has these features disabled reverting to Managed Scheduled Executor Service Jberet scheduling type. Don't know what were the changes that made these features become disabled, but I need to activate them again.

Is there a way to force the project to use EJB timer?

The feature check is done through rest Api, but it is not clear what to change to have EJB feature available

1

There are 1 best solutions below

1
On

Corrected the problem.

The BatchRestService asks for supported features to jberet through the restApi http://localhost:8080/project/api//schedules/features

The project needs to explicitly load the correct dependency, I had both jberet-scheduler-executor and jberet-scheduler-timer in the project's pom.xml, this caused some conflict and the executor was answering that it didn't support the Calendar and Persistence features.

I've used only the jberet-scheduler-timer dependency and it worked (removed the jberet-scheduler-executor)