-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: Migrate JobProcessor Discovery from Jandex to CDI #30545
Comments
…hanged the processors discovery from Jandex to CDI.
I confirmed that the discovery process no longer relies on the Jandex index. A new restriction has been introduced, requiring beans to have the “Dependent” scope, ensuring a unique and independent instance per job—which is reasonable. However, this restriction introduces a validation step that throws an exception if a non-dependent bean is detected. This behavior disrupts the entire queue subsystem. Implementing a non-disruptive mechanism to log an exception when an unsuitable bean is marked as a Queue candidate would be highly beneficial. This would allow the system to report the issue while keeping the remaining valid queues functional and available. I introduced a bean annotated with @Queue and @ApplicationScoped, and I noticed that initialization starts from the servlet. However, when the detection process begins and encounters an invalid bean, the registration breaks, causing the rest of the system to stop functioning. |
Parent Issue
#29474
Task
Overview
Replace the current Jandex-based JobProcessor discovery mechanism with a standard CDI-based approach to improve maintainability and align with Java EE standards.
Current Implementation
The
JobProcessorScanner
class currently:JobProcessor
implementationsJobQueueManagerAPI
Proposed Changes
@Inject Instance<JobProcessor>
JobQueueHelper
to use CDI discoveryBenefits
Technical Details
Files to Modify
com.dotcms.jobs.business.api.JobProcessorScanner
com.dotcms.jobs.business.api.JobProcessorFactory
com.dotcms.jobs.business.processor.JobProcessor
com.dotcms.rest.api.v1.job.JobQueueHelper
Implementation Steps
Proposed Objective
Core Features
Proposed Priority
Priority 2 - Important
The text was updated successfully, but these errors were encountered: