Hi Need to remove the references to getCurrentContext() and the code block need to be changed 4.2.0 documentation.
Thank you. On Mon, Mar 2, 2015 at 7:56 AM, Nilmini Perera <nilm...@wso2.com> wrote: > Hi, > > Thanks for the mail Shashika. > > I remember removing the references to getCurrentContext() from the Carbon > 4.3.0 docs as it is no longer valid. Should we do the same for Carbon 4.2.0 > ? or is it just this particular code block that needs to be changed? > > Regards, > Nilmini > > On Sun, Mar 1, 2015 at 12:15 PM, Shashika Karunatilaka <shashi...@wso2.com > > wrote: > >> Hi, >> >> Start Tenant Flow Code sample should need to be changed in 4.2.0 >> documentation[1]. currently in the documentation its getting CarbonContext >> from the PrivilegedCarbonContext.getCurrentContext(). >> getCurrentContext() is deprecated in the 4.2.0, no longer available in >> 4.3.0. This is fixed in 4.3.0 documentation[2]. It should need to be >> changed to get from getThreadLocalCarbonContext(). >> >> try{ >> PrivilegedCarbonContext.startTenantFlow(); >> PrivilegedCarbonContext privilegedCarbonContext = >> PrivilegedCarbonContext*.getCurrentContext();* >> *change to* *->PrivilegedCarbonContext.getThreadLocalCarbonContext();* >> privilegedCarbonContext.setTenantId(tenantId); >> privilegedCarbonContext.setTenantDomain(tenantDomain); >> // set other stuff like registry etc. if needed >> >> doSomething(); >> } finally { >> PrivilegedCarbonContext.endTenantFlow(); >> } >> >> [1] https://docs.wso2.com/display/Carbon420/CarbonContext+API >> [2] https://docs.wso2.com/display/Carbon430/CarbonContext+API >> -- >> Shashika Prabath Karunatilaka, >> Software Engineer, >> WSO2, Inc: http://wso2.com/ >> mobile : +94 77 7487792 >> >> -- >> You received this message because you are subscribed to the Google Groups >> "WSO2 Documentation" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to documentation+unsubscr...@wso2.com. >> For more options, visit https://groups.google.com/a/wso2.com/d/optout. >> > > > > -- > Nilmini Perera > > Senior Technical Writer > WSO2 Inc. > > Mobile: 0094776722152 > > -- Shashika Prabath Karunatilaka, Software Engineer, WSO2, Inc: http://wso2.com/ mobile : +94 77 7487792
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev