On Thu, Mar 24, 2016 at 7:28 PM, Isuru Perera <[email protected]> wrote:

> So, when deploying multiple products, this "id" should be changed and each
> server must specify a unique id, right? (Otherwise how can we uniquely
> identify a server?)
>
> How can I access this "id" from my component. Is there an API?
>

Yes you should give a unique id value, if you want to identify the server
uniquely. There is no such API,  to get it directly, What you can do is,
acquire the CarbonRuntime OSGi service,
and get the ServerConfiguration which contain this information.

[1].
https://github.com/wso2/carbon-kernel/blob/master/core/src/main/java/org/wso2/carbon/kernel/CarbonRuntime.java#L40

>
> On Thu, Mar 24, 2016 at 6:30 PM, Aruna Karunarathna <[email protected]>
> wrote:
>
>>
>>
>> On Thu, Mar 24, 2016 at 6:23 PM, Isuru Perera <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> $subject?
>>>
>>> What are the reasons for adding it? Can I use that to identify a carbon
>>> server uniquely?
>>>
>>> For example, in Carbon Metrics, I want to use some value to identify a
>>> server (The source of metrics). So, I have used a configuration named
>>> source and I use hostname as the default value. Can we use this "id" for
>>> that?
>>>
>>
>> AFAIK,  you can use that value to uniquely identify a server. That's the
>> idea behind that property.
>>
>>>
>>> Thanks!
>>>
>>> --
>>> Isuru Perera
>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>> Contact: +IsuruPereraWSO2
>>> <https://www.google.com/+IsuruPereraWSO2/about>
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> [email protected]
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>>
>> *Aruna Sujith Karunarathna *
>> WSO2, Inc | lean. enterprise. middleware.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> Mobile: +94 71 9040362 | Work: +94 112145345
>> Email: [email protected] | Web: www.wso2.com
>>
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 <https://www.google.com/+IsuruPereraWSO2/about>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 

*Aruna Sujith Karunarathna *
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 9040362 | Work: +94 112145345
Email: [email protected] | Web: www.wso2.com
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to