Hi Azeez, What's the difference between using *PrivilegedCarbonContext.getCurrentContext() and** PrivilegedCarbonContext.getThreadLocalCarbonContext()* ? .. like if I've a code segment (some utility method) which isn't aware that it's being called from the deployer or not, what should I use? ..
Cheers, Anjana. On Fri, Sep 21, 2012 at 8:42 PM, Afkham Azeez <[email protected]> wrote: > Folks, > The CarbonContext API cleanup has exposed some bugs due to invalid usage > of the old API. One of the things I uncovered was errors in deployers. > > If you deployers contain, PrivilegedCarbonContext.start/endTenantFlow() > statements, please remove them. > > Also, inside deployers, the recommended way to get the CC is using the > following method: > > *PrivilegedCarbonContext.getThreadLocalCarbonContext()* > > This is because the CarbonDeploymentSchedulerTask ensures that the proper > ThreadLocal CC is created to be used in the deployers. > > All deployers need to be reviewed and fixed. I have fixed the webapp > deployer in the course of analyzing the root cause of a failure reported in > another thread. > > Please note that this is an essential & straightforward fix which has to > be completed quickly. > > -- > *Afkham Azeez* > Director of Architecture; WSO2, Inc.; http://wso2.com > Member; Apache Software Foundation; http://www.apache.org/ > * <http://www.apache.org/>** > email: **[email protected]* <[email protected]>* cell: +94 77 3320919 > blog: **http://blog.afkham.org* <http://blog.afkham.org>* > twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> > * > linked-in: **http://lk.linkedin.com/in/afkhamazeez* > * > * > *Lean . Enterprise . Middleware* > > -- *Anjana Fernando* Associate Technical Lead WSO2 Inc. | http://wso2.com lean . enterprise . middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
