stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chamila De Alwis <chami...@wso2.com>
Subject Re: Tenant listeners added twice in the Cartridge Agent
Date Mon, 22 Sep 2014 07:33:03 GMT
>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.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Mon, Sep 22, 2014 at 12:20 PM, Chamila De Alwis <chamilad@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 <chamilad@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
>>
>>
>>
>

Mime
View raw message