Hi Amila, There are some aspects of the API that originally had a purpose, but gradually started getting used in different ways, and there also were some alternatives introduced and it seems that people misunderstood the intentions. We now have a much cleaner classpath, and we should deprecate these redundant methods and cleanup the API. Azeez and I discussed about it, but nobody actually took the initiative to go ahead and clean this up.
This can be considered a required aspect since Carbon 4.0.0 is a major release and its a good time to agree and finalize a decent API which will also become a part of our SPI for Tenants. So, I'm totally +1 if you are interested in taking the initiative to give this a start at least by reducing one method at a time. Thanks, Senaka. On Tue, Jun 5, 2012 at 5:41 PM, Amila Jayasekara <[email protected]> wrote: > Hi All, > > In CarbonContextHolder there are 2 methods. > > 1. public static CarbonContextHolder getCurrentCarbonContextHolder() > 2. public static CarbonContextHolder getThreadLocalCarbonContextHolder() > > The getCurrentCarbonContextHolder() method first check whether a > CarbonContextHolder exists in session if not it calls > getThreadLocalCarbonContextHolder() to create new object. I have seen > people getting confused over above 2 methods. Is it possible to make > getThreadLocalCarbonContextHolder() private and only expose > getCurrentCarbonContextHolder() ? Thus if someone use > getThreadLocalCarbonContextHolder() he/she needs to set tenant id, > tenant domain manually. > > Thanks > AmilaJ > > -- > Mobile : +94773330538 > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > -- *Senaka Fernando* Member - Integration Technologies Management Committee; 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
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
