Minyaa JIRA is now upgraded to JIRA 4.3.4 + Minyaa 3.1 !

Minyaa Suite

Init of Greenhopper raises a too early call of CustomFieldManager, that init load of Minyaa Customfield. If one of CF has dependencies on Minyaa Components (Not yet loaded), then JIRA is locked

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 3.2.1
  • Component/s: None
  • Security Level: Public
  • Labels:
    None
  • Rank:
    Issue can not be ranked. 
  • Workers:

Description

If CustomfieldManager is called by any Plugin during the start of JIRA (here GreenHopper, but it may true for any other plugin), then the CustomfieldManager tries to load any defined customfield.
If one these customfield has dependencies on component provided by a plugin, this plugin may be not yet loaded. In such case, a org.picocontainer.defaults.UnsatisfiableDependenciesException is raised, JIRA is locked and is not available.

Classically, a Customfield looks like :

public class MyCFType {
   protected final OneJIRAComponent oneJIRAComponent;
   protected final OtherJIRAComponent otherJIRAComponent;
   protected final MyPluginComponent myPluginComponent;
	
   public MyCFType(OneJIRAComponent oneJIRAComponent, OtherJIRAComponent otherJIRAComponent, MyPluginComponent myPluginComponent) {
      this.oneJIRAComponent = oneJIRAComponent;
      this.otherJIRAComponent = otherJIRAComponent;
      this.myPluginComponent = myPluginComponent;
   }
   
   public anyMethod() {
      oneJIRAComponent.doSomething();
      otherJIRAComponent.doSomething();
      myPluginComponent.doSomething();
   }
}

To avoid the current issue, it would be better to do :

public class MyCFType {
   protected final OneJIRAComponent oneJIRAComponent;
   protected final OtherJIRAComponent otherJIRAComponent;
   protected MyPluginComponent myPluginComponent;

   public MyCFType(OneJIRAComponent oneJIRAComponent, OtherJIRAComponent otherJIRAComponent) {
      this.oneJIRAComponent = oneJIRAComponent;
      this.otherJIRAComponent = otherJIRAComponent;
   }
   
   public anyMethod() {
      oneJIRAComponent.doSomething();
      otherJIRAComponent.doSomething();
      getMyPluginComponent().doSomething();
   }
   
   public MyPluginComponent getMyPluginComponent() {
      if (myPluginComponent == null) {
         myPluginComponent = (MyPluginComponent)ComponentManager.getComponentInstanceOfType(MyPluginComponent.class);
      }
      return myPluginComponent;
   }
}

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    16/Sep/11 7:49 AM
    Updated:
    18/Sep/11 4:51 AM
    Resolved:
    18/Sep/11 4:51 AM