On Sat, Sep 22, 2012 at 12:41 PM, Supun Malinga <[email protected]> wrote:

> HI Azeez,
>
> BTW isn't deployers are per tenant basis?. Like for each tenant there is a
> separate deployer instance?.
>

yes

>
> thanks,
>
>
> On Sat, Sep 22, 2012 at 10:47 AM, Anjana Fernando <[email protected]> wrote:
>
>> Hi,
>>
>> Data Services deployer fixed.
>>
>> Cheers,
>> Anjana.
>>
>> On Sat, Sep 22, 2012 at 9:02 AM, Supun Malinga <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> Below is the list of deployers using start/endTenantFlow.
>>>
>>>  platform/branches/4.0.0/components$ fn *Deployer*.java | xargs grep -l
>>> "TenantFlow"
>>>
>>>
>>> ./data-services/org.wso2.carbon.dataservices.core/4.0.2/src/main/java/org/wso2/carbon/dataservices/core/DBDeployer.java
>>>
>>> ./data-services/org.wso2.carbon.dataservices.core/4.0.0/src/main/java/org/wso2/carbon/dataservices/core/DBDeployer.java
>>>
>>> ./data-services/org.wso2.carbon.dataservices.core/4.0.1/src/main/java/org/wso2/carbon/dataservices/core/DBDeployer.java
>>>
>>> ./jaggery/0.9.0.ALPHA2-wso2v1/jaggery-core/org.jaggeryjs.jaggery.app.mgt/src/main/java/org/jaggeryjs/jaggery/app/mgt/TomcatJaggeryWebappsDeployer.java
>>>
>>> ./jaggery/0.9.0.ALPHA2-wso2v2/jaggery-core/org.jaggeryjs.jaggery.app.mgt/src/main/java/org/jaggeryjs/jaggery/app/mgt/TomcatJaggeryWebappsDeployer.java
>>>
>>> ./jaggery/0.9.0-ALPHA1/jaggery-core/org.jaggeryjs.jaggery.app.mgt/0.9.0-ALPHA1/src/main/java/org/jaggeryjs/jaggery/app/mgt/TomcatJaggeryWebappsDeployer.java
>>>
>>> ./mashup/org.wso2.carbon.mashup.jsservices/4.0.2/src/main/java/org/wso2/carbon/mashup/jsservices/deployer/JSDeployer.java
>>>
>>> ./mashup/org.wso2.carbon.mashup.jsservices/4.0.0/src/main/java/org/wso2/carbon/mashup/jsservices/deployer/JSDeployer.java
>>>
>>> ./mashup/org.wso2.carbon.mashup.jsservices/4.0.1/src/main/java/org/wso2/carbon/mashup/jsservices/deployer/JSDeployer.java
>>>
>>> ./webapp-mgt/org.wso2.carbon.webapp.mgt/4.0.0/src/main/java/org/wso2/carbon/webapp/mgt/TomcatGenericWebappsDeployer.java
>>>
>>> ./webapp-mgt/org.wso2.carbon.webapp.mgt/4.0.1/src/main/java/org/wso2/carbon/webapp/mgt/TomcatGenericWebappsDeployer.java
>>>
>>> ./stratos/sample-installer/org.wso2.carbon.sample.installer/2.0.0/src/main/java/org/wso2/carbon/sample/installer/SampleDeployer.java
>>>
>>> ./stratos/sample-installer/org.wso2.carbon.sample.installer/2.0.2/src/main/java/org/wso2/carbon/sample/installer/SampleDeployer.java
>>>
>>> thanks,
>>>
>>> On Sat, Sep 22, 2012 at 8:17 AM, Anjana Fernando <[email protected]>wrote:
>>>
>>>> I see, the utility methods can be called from an arbitrary nested level
>>>> though, so parsing in the CarbonContext is not always possible .. for
>>>> example .. Deployer -> Initializing a Data Service -> Init. A Data Source
>>>> -> Lookup a Registry Resource -> Lookup Tenant Registry. It will be ugly in
>>>> that case to always parse a CarbonContext throughout all the
>>>> classes/methods being used. Anyways for data services use case it seems
>>>> I'll always get the requirement to get the tenant id etc.. in the
>>>> deployment, and not in any other places, so it wont be a problem. And yeah,
>>>> if I need it in any other message processing path in the future, I can use
>>>> the other approach.
>>>>
>>>> Cheers,
>>>> Anjana.
>>>>
>>>>
>>>> On Sat, Sep 22, 2012 at 12:24 AM, Afkham Azeez <[email protected]> wrote:
>>>>
>>>>> *PrivilegedCarbonContext.getThreadLocalCarbonContext() *performs
>>>>> better. This is because, PrivilegedCarbonContext.getContext() will first
>>>>> try to get the data from Axis2 MessageContext, failing which it will try
>>>>> ConfigurationContext & AxisConfiguration, and only finally try to get the
>>>>> data from the ThreadLocal variable. So, in cases like the deployers where
>>>>> you can be sure that the deployment scheduler thread would set the
>>>>> ThreadLocal data, you should directly call the getThreadLocalCarbonContext
>>>>> method.
>>>>>
>>>>> Generally, you should have an idea of what thread you are executing
>>>>> under. So in the case of util methods, it is better to resolve the
>>>>> CarbonContext outside that util method. In order to be able to properly
>>>>> retrieve a CC, anyway the relevant data should be available somewhere
>>>>> (ThreadLocal, AxisConfig, ConfigContext, MessageContext etc) so generally.
>>>>> If calling CarbonContext.getCurrentContext returns a CC with tenant ID = 
>>>>> -1
>>>>> or tenant domain = null, that means, some up stream code had not populated
>>>>> the data needed for the CC, so you have to first look into fixing that
>>>>> issue.
>>>>>
>>>>> Azeez
>>>>>
>>>>> On Fri, Sep 21, 2012 at 10:43 PM, Anjana Fernando <[email protected]>wrote:
>>>>>
>>>>>> *PrivilegedCarbonContext.getThreadLocalCarbonContext()*
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *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
>>>>
>>>
>>>
>>>
>>> --
>>> Supun Malinga,
>>>
>>> Software Engineer,
>>> WSO2 Inc.
>>> http://wso2.com
>>> http://wso2.org
>>> email - [email protected] <[email protected]>
>>> mobile - 071 56 91 321
>>>
>>>
>>
>>
>> --
>> *Anjana Fernando*
>> Associate Technical Lead
>> WSO2 Inc. | http://wso2.com
>> lean . enterprise . middleware
>>
>
>
>
> --
> Supun Malinga,
>
> Software Engineer,
> WSO2 Inc.
> http://wso2.com
> http://wso2.org
> email - [email protected] <[email protected]>
> mobile - 071 56 91 321
>
>


-- 
*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*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to