ComponentLocator.getComponent(ClusterLockService.class)
returns null, so what do I do?
I couldn't find any information about component-import anywhere, so I'm not sure if I need something extra in the atlassian-plugin.xml?
Community moderators have prevented the ability to post new answers.
Apparently it's not possible to get ANY components via the ComponentLocator (except the basic Confluence manager classes), so even the plugin's own components are not registered.
The only way to get an external component into the job seems to be to pass it via the JobDataMap. Ugly, but it seems to work.
Since the standard Confluence AbstractJob jobs cannot be parameterized or scheduled/triggered via the Java API, this is the only way to run adhoc jobs in Confluence.
In standard components, injecting the ClusterLockService works, but obviously in a PluginJob I cannot use injection (default constructor!), so I need the ComponentLocator.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FWIW, the component-import doesn't help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.