Bug 1010418

Summary: RFE: Refactor jobs scheduled by StartupBean into separate server plugins
Product: [Other] RHQ Project Reporter: Elias Ross <genman>
Component: Core ServerAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.9CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://community.jboss.org/thread/230921
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Elias Ross 2013-09-20 18:14:32 UTC
StartupBean.java includes about 15 jobs scheduled into Quartz for execution.

Some of these may be candidates for refactoring as separate server plugins.

Reasons:
1. As the word 'refactoring' suggests, it allows the core startup code to have less explicit dependencies. It also allows the code to be split into multiple modules which are more easily maintained.
2. Allows administrators to stop, pause, or change the frequency of job execution. Some jobs (like the Out-of-band) metrics feature may not used and could be disabled. Calculating baselines may not be used as well.
3. Allows the configuration settings for jobs where necessary. A lot of things are hard-coded, for lack of a way to introduce a setting. It also would allow configuration settings from 'SystemSettings' to be moved to a plugin-specific area.
 
Reasons not to:
1. Certain jobs are not complex to warrant the upkeep of a separate module.
2. Exposing configuration and job control for everything is not as helpful as it is dangerous.
3. Configuration of key settings (data retention) may be taken away from an easy-to-find area and moved to a plugin area.


The other problem is, certain jobs like DataPurgeJob do an awful lot. So in addition, it would make sense to divide jobs into smaller execution steps.