Hi Sanjiva,

This method first check whether an instance of the CarbonContext is stored
in the MessageContext, if not checks in the ConfiguratoinContext. If both
of these checks fails, this method returns the thread local variable. This
has caused issues during this 4.2.0 release. Thats why we thought of doing
this even at critical time like this to get a stable platform.

This CarbonContext has gotten bit messy over the time. Thats the cause of
these problems. We should have had a proper control when it comes to
changing APIs like this. Now only the kernel team have commit rights to the
kernel(for now). We are trying to throttle changes to the kernel.

Thanks,
Sameera.











On Thu, Oct 3, 2013 at 8:13 AM, Sanjiva Weerawarana <[email protected]>wrote:

> Sameera isn't CarbonContext.getCurrentContext() supposed to return the
> context associated with the current thread???
>
>
> On Tue, Oct 1, 2013 at 11:45 AM, Sameera Jayasoma <[email protected]>wrote:
>
>> Hi Folks,
>>
>> Some of you may be wondering why we are doing this change now. The
>> simplest reason is, to ensure the consistency of its usage.
>>
>> Over the past few years somehow we've ended up adding more methods to
>> this API and also ended up putting two different set of APIs for setting
>> and getting the CarbonContext object.  Its not the time to check who has
>> done this, but its the time to properly refactor this API as well as its
>> usages. Following is the two sets of APIs. Carbon kernel and component
>> developers have used these methods interchangeably. This has caused some
>> inconsistency in the CarbonPlatform. We've faced many issues related to
>> this during the 4.2.0 release. Thats why we thought of fixing this once for
>> all.
>>
>>
>> CarbonContext.getCurrentContext()
>> CarbonContext.getCurrentContext(MessageContext msgCtx)
>> CarbonContext.getCurrentContext(HttpSession session)
>> CarbonContext.getCurrentContext(AxisConfiguration config)
>> CarbonContext.getCurrentContext(ConfigurationContext ctx)
>> CarbonContext.getCurrentContext(ThriftSession session)
>>
>> -----------------
>> *CarbonContext.getThreadLocalVariable()*
>>
>> The plan is the use the latter API from now onwards. We are deprecating
>> the former set of APIs. Now we need to ensure that each running Thread in
>> the system should have an associated CarbonContext object.
>>
>>
>> Thanks,
>> Sameera.
>>
>> --
>> Sameera Jayasoma,
>> Architect,
>>
>>  WSO2, Inc. (http://wso2.com)
>> email: [email protected]
>> blog: http://sameera.adahas.org
>> twitter: https://twitter.com/sameerajayasoma
>> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
>> Mobile: 0094776364456
>>
>> Lean . Enterprise . Middleware
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Sanjiva Weerawarana, Ph.D.
> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
> email: [email protected]; phone: +94 11 763 9614; cell: +94 77 787 6880 | +1
> 650 265 8311
> blog: http://sanjiva.weerawarana.org/
>
>
> Lean . Enterprise . Middleware
>



-- 
Sameera Jayasoma,
Architect,

WSO2, Inc. (http://wso2.com)
email: [email protected]
blog: http://sameera.adahas.org
twitter: https://twitter.com/sameerajayasoma
flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
Mobile: 0094776364456

Lean . Enterprise . Middleware
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to