Hi Chamila, On Mon, Sep 22, 2014 at 1:03 PM, Chamila De Alwis <chami...@wso2.com> wrote:
> From Git blame annotations, it looks like the additional paths for these > two event listeners are added possibly by merging by accident. Because one > path passes variables that are not picked up by the shell script > extensions, no visible errors are occurring. > Good work in finding these problems. Lets work on fixing these problems as a part of the Cartridge Agent refactoring effort. > > > Regards, > Chamila de Alwis > Software Engineer | WSO2 | +94772207163 > Blog: code.chamiladealwis.com > > > > On Mon, Sep 22, 2014 at 12:20 PM, Chamila De Alwis <chami...@wso2.com> > wrote: > >> Hi guys, >> >> Any idea if the two paths are intentional or a flow? >> >> >> Regards, >> Chamila de Alwis >> Software Engineer | WSO2 | +94772207163 >> Blog: code.chamiladealwis.com >> >> >> >> On Sat, Sep 20, 2014 at 8:40 PM, Chamila De Alwis <chami...@wso2.com> >> wrote: >> >>> Hi, >>> >>> In org.apache.stratos.cartridge.agent.CartridgeAgent "tenant/#" topic >>> listeners are added twice. SubscriptionDomainAddedEventEventListener and >>> SubscriptionDomainRemovedEventListener is first added in >>> subscribeToTopicsAndRegisterListeners() method at line 254. Then these two >>> are added again in registerTenantEventListeners() method at line 438. >>> >>> There are two overriding methods for >>> executeSubscriptionDomainAddedExtension() and >>> executeSubscriptionDomainRemovedExtension() each accepting a map of >>> "STRATOS_" prepended environment parameters and the other accepting >>> individual parameters like tenant Id and domain name. >>> >>> Furthermore, in CartridgeAgentConstants there are two entries for each >>> of the extension scripts, one hardcoding the script name and the other >>> taking the script name from the stratos.sh properties. >>> >>> The extension script seems to be using the "STRATOS_" prepended >>> properties for its use. Therefore, the path with individual parameters >>> seems to be a dead end. >>> >>> Furthermore, in the method subscribeToTopicsAndRegisterListeners() >>> method, two threads are started with the same "instance/#" topic listener, >>> at line 243 and 297. The second one seems to be mistakenly added, may be >>> while merging conflicts? >>> >>> >>> Regards, >>> Chamila de Alwis >>> Software Engineer | WSO2 | +94772207163 >>> Blog: code.chamiladealwis.com >>> >>> -- >>> <http://code.chamiladealwis.com> >>> Thanks and Regards, >>> >>> Isuru H. >>> <http://code.chamiladealwis.com> >>> +94 716 358 048 <http://code.chamiladealwis.com>* <http://wso2.com/>* >>> >>> >>> * <http://wso2.com/>* >>> >>> >>>