On Sun, Jun 5, 2011 at 11:43 AM, Saminda Wijeratne <samin...@wso2.com>wrote:

> Thanks Senaka, you suggestions for #1 are really useful.
>
> For #2 we'll be a 3rd party application (aka. an eclipse plugin ;)). Thus
> ServerConfiguration is not accessible to us, unless it is exposed as an
> admin service. is it?
>

Don't you make use of the carbon.base bundle in Eclipse? If you do, its a
matter of providing the location to the carbon.xml file and initializing the
ServerConfiguration. Also, ServerConfiguration is a singleton, and,
re-initializations should be done forcefully.

Thanks,
Senaka.

Saminda
>
>
> On Sun, Jun 5, 2011 at 11:15 AM, Senaka Fernando <sen...@wso2.com> wrote:
>
>>
>>
>> On Sun, Jun 5, 2011 at 11:12 AM, Senaka Fernando <sen...@wso2.com> wrote:
>>
>>>
>>>
>>> On Sun, Jun 5, 2011 at 11:05 AM, Saminda Wijeratne <samin...@wso2.com>wrote:
>>>
>>>> I have 2 scenarios which I want to identify the product, its version &
>>>> its associated carbon version.
>>>>
>>>>    1. Given a product binary distribution
>>>>    2. Given a running product instance (say we have the url +
>>>>    credentials)
>>>>
>>>> How to accomplish this?
>>>>
>>>
>>> Product name/version is on the carbon.xml, and can be read for #1, and
>>> programmatically accessed through the ServerConfiguration for #2.
>>>
>>> Carbon version is on $CARBON_HOME/bin/wso2carbon-version.txt and can be
>>> read for #1, and programmatically accessed by reading the file, and parsing
>>> the string, and removing everything infront of the last "v". AFAIU, I think
>>> the following regular expression should match it (apologies if it was wrong,
>>> but I hope you got the point): ^.*v[1-9]+[.]d+[.]d+$
>>>
>>
>> Correction: ^.*(v[1-9]+[.]d+[.]d+)$
>>
>> Thanks,
>> Senaka.
>>
>>>
>>> Thanks,
>>> Senaka.
>>>
>>>>
>>>> Thanks,
>>>> Saminda
>>>>
>>>> _______________________________________________
>>>> Carbon-dev mailing list
>>>> Carbon-dev@wso2.org
>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>
>>>>
>>>
>>>
>>> --
>>> *Senaka Fernando*
>>> Product Manager - WSO2 Governance Registry;
>>> Associate Technical Lead; WSO2 Inc.; http://wso2.com*
>>> Member; Apache Software Foundation; http://apache.org
>>>
>>> E-mail: senaka AT wso2.com
>>> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
>>> Linked-In: http://linkedin.com/in/senakafernando
>>>
>>> *Lean . Enterprise . Middleware
>>>
>>>
>>
>>
>> --
>> *Senaka Fernando*
>> Product Manager - WSO2 Governance Registry;
>> Associate Technical Lead; WSO2 Inc.; http://wso2.com*
>> Member; Apache Software Foundation; http://apache.org
>>
>> E-mail: senaka AT wso2.com
>> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
>> Linked-In: http://linkedin.com/in/senakafernando
>>
>> *Lean . Enterprise . Middleware
>>
>>
>> _______________________________________________
>> Carbon-dev mailing list
>> Carbon-dev@wso2.org
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
> _______________________________________________
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>


-- 
*Senaka Fernando*
Product Manager - WSO2 Governance Registry;
Associate Technical Lead; WSO2 Inc.; http://wso2.com*
Member; Apache Software Foundation; http://apache.org

E-mail: senaka AT wso2.com
**P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
Linked-In: http://linkedin.com/in/senakafernando

*Lean . Enterprise . Middleware
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to