Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##
- ## JIRA 6.3 SETUP
- ##
- (1) JVM Setup
- -Dfelix.fileinstall.dir=<...>/atlassian-jira-6.3.13-standalone/home/load -Dfelix.cm.loglevel=4 -Dfelix.fileinstall.loglevel=4
- (2) Additional Bundles / JIRA Plugins
- org.apache.felix.fileinstall-2.0.8.jar
- org.apache.felix.configadmin-1.8.8.jar
- (3) Activator Code
- -- SNIP --
- MyService service = new MyService();
- Dictionary<String,String> properties = new Hashtable<>();
- properties.put( Constants.SERVICE_PID, "myservice" );
- String[] classes = new String[] { MyService.class.getName(), ManagedService.class.getName() };
- final ServiceRegistration serviceRegistration = bundleContext.registerService(classes, service, properties);
- -- SNIP --
- (4) Config Change Callback
- -- SNIP --
- public class MyService implements org.osgi.service.cm.ManagedService {
- public void updated( Dictionary<String, ?> properties ) {
- if( properties != null ) {
- org.slf4j.LoggerFactory.getLogger(getClass()).error("" +properties);
- }
- }
- }
- -- SNIP --
- (5) Configuration Directory "load" should contain a properties file myservice.cfg
- (6) Define JIRA Component extending ManagedService with Service Property PID (+ public = true)
- https://answers.atlassian.com/questions/140877/how-to-pass-a-parameter-to-a-spring-component?page=1#174536
Advertisement
Add Comment
Please, Sign In to add comment