In the Apache Felix framework that Jira runs on, there is a concept that allows you to define configuration files with hotswap functionality. Is this somehow possible to achieve in Jira Plugins as well?
Example from Karaf
In Karaf - which also is based on Apache Felix - this works by annotating Spring/Blueprint components with a configuration class, such as:
@Component(name="MyComponent")
@Designate(ocd = MyConfig.class)
public class MyComponentImpl implements MyComponent {
@Activate
public void activate(MyConfig config) {
// Do something with the config object
AssertTrue(config.getUsername() == "username")
}
}
Then define that configuration class with some default values:
@ObjectClassDefinition(name = "MyConfigFileName")
@interface MyConfig {
String username() default "username";
String password() default "password";
}
If you then drop a file named `MyConfigFileName.cfg` into the folder `karafhome/etc`, the Apache Felix framework will reload all Spring components (here `MyComponent`) that use the `MyConfig` configuration, and update it's values:
# MyConfigFileName.cfg
username = helloWorld
password = h3110W0rld!
Is this possible in Jira?
From what I understand, the functionality described above should be possible to achieve in Jira as well, but the question is: how? If we import the Maven dependency required for the annotations and give it a spin, which folder should configurations be added to?
No, it reads config at startup and caches most of it.
Thanks for your answer, Nic! Do you know if there are any unofficial ways of doing this?
I imagine that if Jira runs on top of Felix, then this should be possible. However, for all I know Jira could be a wrapper for the entire Felix framework, which would complicate things.
The reason why I'm asking is because not having the ability to hot-swap configuration makes it much more difficult for our DevOps team, and we would rather not implement a custom solution if we don't have to.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not that I'm aware of, it's just not coded for. Because once your Jira is configured correctly on a system level, you should not be messing with it. It's rare to need to change the system files, they're definitely not things you should be "hot swapping"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.