Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-16 Thread Sameera Jayasoma
I've committed this CarbonContexCreator class.  Miyuru and Sanjeewa test
your cases and let me know if there any change to be done.

Thanks,
Sameera.


On Tue, Jul 16, 2013 at 12:10 PM, Miyuru Wanninayaka wrote:

> We will move this hander kernel as this handler is required for all
> products in non-http transport scenarios too.
>
>
> On Tue, Jul 16, 2013 at 11:25 AM, Miyuru Wanninayaka wrote:
>
>> Hi all,
>>
>> I was able to get this working with axis2 handler and small change to
>> synapse-greg registry bridge.
>> Now both GReg integration and security scenarios working fine.
>>
>> Still we need to assess overhead of setting thread local in every message.
>>
>>
>> On Fri, Jul 12, 2013 at 11:40 AM, Amila Suriarachchi wrote:
>>
>>>
>>>
>>>
>>> On Fri, Jul 12, 2013 at 11:33 AM, Miyuru Wanninayaka wrote:
>>>
 Hi Amila,

 On Fri, Jul 12, 2013 at 11:27 AM, Amila Suriarachchi wrote:

>
>
>
> On Fri, Jul 12, 2013 at 11:17 AM, Miyuru Wanninayaka 
> wrote:
>
>> Hi Dushan,
>>
>> Dispatcher/Handler will only help in cases where message come to
>> synapse from outside.
>>
>> For other cases, we need to develop a extension point in synapse
>> which invokes after a thread spawn to set CC as thread local.
>>
>> Seems we can get AxisConfiguration in any place which synapse create
>> a new thread. So we can develop a handler API which has something like
>>
>> public void populateThreadLocal(AxisConfiguration) or something
>>
>> which figure out tenant information and  polulate CC.
>>
>> @Azeez, can we figure out tenant information by looking at
>> AxisConfiguration?
>> Using something like AxisConfiguration.getRepository()
>
>
> In here you need to think about how to get the tenant information from
> the request message. Always we need to get the tenant information from the
> request message and set to thread local. There are two ways
>
> 1. From the request URI
> 2. user name - user can have tenant qualified name
>

 both these are not available for pooling/non-http transports

>>>
>>> We don't support those transports for MT. Those transports only for ST.
>>> So we can assume always ST for those transports.
>>>
>>> thanks,
>>> Amila.
>>>


> thanks,
> Amila.
>
>>
>>
>> On Fri, Jul 12, 2013 at 10:19 AM, Dushan Abeyruwan 
>> wrote:
>>
>>> Hi Miyru,
>>>I think we can intercept the Carbon context by writing a dispatch
>>> in DispatchPhase this can be a component whose suppose to resides 
>>> outside
>>> synapse.
>>>
>>>
>>> Cheers
>>> Dushan
>>>
>>>
>>> On Fri, Jul 12, 2013 at 9:58 AM, Afkham Azeez wrote:
>>>



 On Fri, Jul 12, 2013 at 9:54 AM, Miyuru Wanninayaka <
 miy...@wso2.com> wrote:

>
>
> On Fri, Jul 12, 2013 at 9:36 AM, Afkham Azeez wrote:
>
>>
>>
>>
>> On Fri, Jul 12, 2013 at 7:28 AM, Miyuru Wanninayaka <
>> miy...@wso2.com> wrote:
>>
>>> Hi Azeez,
>>>
>>> Sorry, we were not properly following dev@ discussions recently
>>> as team was very busy with ESB 4.7 release.
>>>
>>> Yes we can set proper CC as thread local in request path via
>>> handler for NIO transports by looking at To address. But how this 
>>> can
>>> implement in generic manner for other transport ( JMS, VFS). 
>>> May be
>>> since other transports does not support MT anyway, we can always 
>>> set ST CC
>>> for non http transports?
>>>
>>> Also how we can handle thread switching in response path of NIO?
>>> Handler will not help in response path.
>>>
>>> Also there are some mediation threads spawns within synapse
>>> without going through axis2 flow such as
>>> * Synapse tasks
>>> * Message processors
>>> * Priority executors
>>> * Clone and iterate mediators
>>>
>>> How can we set CC in these cases?
>>
>>
>> Any bit of execution has to to be associated with some tenant. It
>> is true for everything listed above. We need to track things like 
>> how much
>> CPU time each tenant consumed and so on. So you need to identify the
>> relevant plug points, and inject the proper CC.
>>
>
> Only problem is above mentioned flows cannot intercept from
> outside of synapse. In such case do we have alternative than writing 
> carbon
> specific code inside synapse?
>


 No. This is why interfaces are needed. We have done this enough &
 more time for Axis2, without writing WSO2 specific code in Axis2.


>
>>

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-15 Thread Miyuru Wanninayaka
Hi all,

I was able to get this working with axis2 handler and small change to
synapse-greg registry bridge.
Now both GReg integration and security scenarios working fine.

Still we need to assess overhead of setting thread local in every message.

On Fri, Jul 12, 2013 at 11:40 AM, Amila Suriarachchi  wrote:

>
>
>
> On Fri, Jul 12, 2013 at 11:33 AM, Miyuru Wanninayaka wrote:
>
>> Hi Amila,
>>
>> On Fri, Jul 12, 2013 at 11:27 AM, Amila Suriarachchi wrote:
>>
>>>
>>>
>>>
>>> On Fri, Jul 12, 2013 at 11:17 AM, Miyuru Wanninayaka wrote:
>>>
 Hi Dushan,

 Dispatcher/Handler will only help in cases where message come to
 synapse from outside.

 For other cases, we need to develop a extension point in synapse which
 invokes after a thread spawn to set CC as thread local.

 Seems we can get AxisConfiguration in any place which synapse create a
 new thread. So we can develop a handler API which has something like

 public void populateThreadLocal(AxisConfiguration) or something

 which figure out tenant information and  polulate CC.

 @Azeez, can we figure out tenant information by looking at
 AxisConfiguration?
 Using something like AxisConfiguration.getRepository()
>>>
>>>
>>> In here you need to think about how to get the tenant information from
>>> the request message. Always we need to get the tenant information from the
>>> request message and set to thread local. There are two ways
>>>
>>> 1. From the request URI
>>> 2. user name - user can have tenant qualified name
>>>
>>
>> both these are not available for pooling/non-http transports
>>
>
> We don't support those transports for MT. Those transports only for ST. So
> we can assume always ST for those transports.
>
> thanks,
> Amila.
>
>>
>>
>>> thanks,
>>> Amila.
>>>


 On Fri, Jul 12, 2013 at 10:19 AM, Dushan Abeyruwan wrote:

> Hi Miyru,
>I think we can intercept the Carbon context by writing a dispatch
> in DispatchPhase this can be a component whose suppose to resides outside
> synapse.
>
>
> Cheers
> Dushan
>
>
> On Fri, Jul 12, 2013 at 9:58 AM, Afkham Azeez  wrote:
>
>>
>>
>>
>> On Fri, Jul 12, 2013 at 9:54 AM, Miyuru Wanninayaka 
>> wrote:
>>
>>>
>>>
>>> On Fri, Jul 12, 2013 at 9:36 AM, Afkham Azeez wrote:
>>>



 On Fri, Jul 12, 2013 at 7:28 AM, Miyuru Wanninayaka <
 miy...@wso2.com> wrote:

> Hi Azeez,
>
> Sorry, we were not properly following dev@ discussions recently
> as team was very busy with ESB 4.7 release.
>
> Yes we can set proper CC as thread local in request path via
> handler for NIO transports by looking at To address. But how this can
> implement in generic manner for other transport ( JMS, VFS). May 
> be
> since other transports does not support MT anyway, we can always set 
> ST CC
> for non http transports?
>
> Also how we can handle thread switching in response path of NIO?
> Handler will not help in response path.
>
> Also there are some mediation threads spawns within synapse
> without going through axis2 flow such as
> * Synapse tasks
> * Message processors
> * Priority executors
> * Clone and iterate mediators
>
> How can we set CC in these cases?


 Any bit of execution has to to be associated with some tenant. It
 is true for everything listed above. We need to track things like how 
 much
 CPU time each tenant consumed and so on. So you need to identify the
 relevant plug points, and inject the proper CC.

>>>
>>> Only problem is above mentioned flows cannot intercept from outside
>>> of synapse. In such case do we have alternative than writing carbon
>>> specific code inside synapse?
>>>
>>
>>
>> No. This is why interfaces are needed. We have done this enough &
>> more time for Axis2, without writing WSO2 specific code in Axis2.
>>
>>
>>>

>
>
> On Thu, Jul 11, 2013 at 9:50 PM, Afkham Azeez wrote:
>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka <
>> miy...@wso2.com> wrote:
>>
>>> ESB does not sets Carbon Context as thread local because
>>> PTT/NHTTP threads are totally under synapse. AFIK only servlet 
>>> transport
>>> sets CC as a thread local.
>>>
>>> In 4.1.0 branch this is working fine without setting CC as
>>> thread local. Did something changed in trunk?
>>
>>
>> Please keep yourself up to date on what is going on at the
>> platform level. Platform level enhancements have an effect on all 

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Amila Suriarachchi
On Fri, Jul 12, 2013 at 11:33 AM, Miyuru Wanninayaka wrote:

> Hi Amila,
>
> On Fri, Jul 12, 2013 at 11:27 AM, Amila Suriarachchi wrote:
>
>>
>>
>>
>> On Fri, Jul 12, 2013 at 11:17 AM, Miyuru Wanninayaka wrote:
>>
>>> Hi Dushan,
>>>
>>> Dispatcher/Handler will only help in cases where message come to synapse
>>> from outside.
>>>
>>> For other cases, we need to develop a extension point in synapse which
>>> invokes after a thread spawn to set CC as thread local.
>>>
>>> Seems we can get AxisConfiguration in any place which synapse create a
>>> new thread. So we can develop a handler API which has something like
>>>
>>> public void populateThreadLocal(AxisConfiguration) or something
>>>
>>> which figure out tenant information and  polulate CC.
>>>
>>> @Azeez, can we figure out tenant information by looking at
>>> AxisConfiguration?
>>> Using something like AxisConfiguration.getRepository()
>>
>>
>> In here you need to think about how to get the tenant information from
>> the request message. Always we need to get the tenant information from the
>> request message and set to thread local. There are two ways
>>
>> 1. From the request URI
>> 2. user name - user can have tenant qualified name
>>
>
> both these are not available for pooling/non-http transports
>

We don't support those transports for MT. Those transports only for ST. So
we can assume always ST for those transports.

thanks,
Amila.

>
>
>> thanks,
>> Amila.
>>
>>>
>>>
>>> On Fri, Jul 12, 2013 at 10:19 AM, Dushan Abeyruwan wrote:
>>>
 Hi Miyru,
I think we can intercept the Carbon context by writing a dispatch in
 DispatchPhase this can be a component whose suppose to resides outside
 synapse.


 Cheers
 Dushan


 On Fri, Jul 12, 2013 at 9:58 AM, Afkham Azeez  wrote:

>
>
>
> On Fri, Jul 12, 2013 at 9:54 AM, Miyuru Wanninayaka 
> wrote:
>
>>
>>
>> On Fri, Jul 12, 2013 at 9:36 AM, Afkham Azeez  wrote:
>>
>>>
>>>
>>>
>>> On Fri, Jul 12, 2013 at 7:28 AM, Miyuru Wanninayaka >> > wrote:
>>>
 Hi Azeez,

 Sorry, we were not properly following dev@ discussions recently as
 team was very busy with ESB 4.7 release.

 Yes we can set proper CC as thread local in request path via
 handler for NIO transports by looking at To address. But how this can
 implement in generic manner for other transport ( JMS, VFS). May be
 since other transports does not support MT anyway, we can always set 
 ST CC
 for non http transports?

 Also how we can handle thread switching in response path of NIO?
 Handler will not help in response path.

 Also there are some mediation threads spawns within synapse without
 going through axis2 flow such as
 * Synapse tasks
 * Message processors
 * Priority executors
 * Clone and iterate mediators

 How can we set CC in these cases?
>>>
>>>
>>> Any bit of execution has to to be associated with some tenant. It is
>>> true for everything listed above. We need to track things like how much 
>>> CPU
>>> time each tenant consumed and so on. So you need to identify the 
>>> relevant
>>> plug points, and inject the proper CC.
>>>
>>
>> Only problem is above mentioned flows cannot intercept from outside
>> of synapse. In such case do we have alternative than writing carbon
>> specific code inside synapse?
>>
>
>
> No. This is why interfaces are needed. We have done this enough & more
> time for Axis2, without writing WSO2 specific code in Axis2.
>
>
>>
>>>


 On Thu, Jul 11, 2013 at 9:50 PM, Afkham Azeez wrote:

>
>
>
> On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka <
> miy...@wso2.com> wrote:
>
>> ESB does not sets Carbon Context as thread local because
>> PTT/NHTTP threads are totally under synapse. AFIK only servlet 
>> transport
>> sets CC as a thread local.
>>
>> In 4.1.0 branch this is working fine without setting CC as thread
>> local. Did something changed in trunk?
>
>
> Please keep yourself up to date on what is going on at the
> platform level. Platform level enhancements have an effect on all 
> products.
> There have been several mail threads on this. you should be able to 
> define
> a handler which sets the proper CC into the Thread.
>
>>
>>
>> On Thu, Jul 11, 2013 at 7:49 PM, Amila Suriarachchi <
>> am...@wso2.com> wrote:
>>
>>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka <
>>> miy...@wso2.com> wrote:
>>>
 Hi Amila,
>>

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Kasun Indrasiri
Also we have to consider how we are going to keep the CC in the response
path. Are we going to store it in the callback store or can we populate it?
If we only need tenant domain to be preserved, I think we should be able to
do it.
However, we absolutely need to consider any performance overhead introduced
by this and the impact on the other transports.

We need to get in to the bottom of this and sort this out. Lets have a
meeting on Monday morning to discuss this.


On Fri, Jul 12, 2013 at 11:33 AM, Miyuru Wanninayaka wrote:

> Hi Amila,
>
> On Fri, Jul 12, 2013 at 11:27 AM, Amila Suriarachchi wrote:
>
>>
>>
>>
>> On Fri, Jul 12, 2013 at 11:17 AM, Miyuru Wanninayaka wrote:
>>
>>> Hi Dushan,
>>>
>>> Dispatcher/Handler will only help in cases where message come to synapse
>>> from outside.
>>>
>>> For other cases, we need to develop a extension point in synapse which
>>> invokes after a thread spawn to set CC as thread local.
>>>
>>> Seems we can get AxisConfiguration in any place which synapse create a
>>> new thread. So we can develop a handler API which has something like
>>>
>>> public void populateThreadLocal(AxisConfiguration) or something
>>>
>>> which figure out tenant information and  polulate CC.
>>>
>>> @Azeez, can we figure out tenant information by looking at
>>> AxisConfiguration?
>>> Using something like AxisConfiguration.getRepository()
>>
>>
>> In here you need to think about how to get the tenant information from
>> the request message. Always we need to get the tenant information from the
>> request message and set to thread local. There are two ways
>>
>> 1. From the request URI
>> 2. user name - user can have tenant qualified name
>>
>
> both these are not available for pooling/non-http transports
>
>
>> thanks,
>> Amila.
>>
>>>
>>>
>>> On Fri, Jul 12, 2013 at 10:19 AM, Dushan Abeyruwan wrote:
>>>
 Hi Miyru,
I think we can intercept the Carbon context by writing a dispatch in
 DispatchPhase this can be a component whose suppose to resides outside
 synapse.


 Cheers
 Dushan


 On Fri, Jul 12, 2013 at 9:58 AM, Afkham Azeez  wrote:

>
>
>
> On Fri, Jul 12, 2013 at 9:54 AM, Miyuru Wanninayaka 
> wrote:
>
>>
>>
>> On Fri, Jul 12, 2013 at 9:36 AM, Afkham Azeez  wrote:
>>
>>>
>>>
>>>
>>> On Fri, Jul 12, 2013 at 7:28 AM, Miyuru Wanninayaka >> > wrote:
>>>
 Hi Azeez,

 Sorry, we were not properly following dev@ discussions recently as
 team was very busy with ESB 4.7 release.

 Yes we can set proper CC as thread local in request path via
 handler for NIO transports by looking at To address. But how this can
 implement in generic manner for other transport ( JMS, VFS). May be
 since other transports does not support MT anyway, we can always set 
 ST CC
 for non http transports?

 Also how we can handle thread switching in response path of NIO?
 Handler will not help in response path.

 Also there are some mediation threads spawns within synapse without
 going through axis2 flow such as
 * Synapse tasks
 * Message processors
 * Priority executors
 * Clone and iterate mediators

 How can we set CC in these cases?
>>>
>>>
>>> Any bit of execution has to to be associated with some tenant. It is
>>> true for everything listed above. We need to track things like how much 
>>> CPU
>>> time each tenant consumed and so on. So you need to identify the 
>>> relevant
>>> plug points, and inject the proper CC.
>>>
>>
>> Only problem is above mentioned flows cannot intercept from outside
>> of synapse. In such case do we have alternative than writing carbon
>> specific code inside synapse?
>>
>
>
> No. This is why interfaces are needed. We have done this enough & more
> time for Axis2, without writing WSO2 specific code in Axis2.
>
>
>>
>>>


 On Thu, Jul 11, 2013 at 9:50 PM, Afkham Azeez wrote:

>
>
>
> On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka <
> miy...@wso2.com> wrote:
>
>> ESB does not sets Carbon Context as thread local because
>> PTT/NHTTP threads are totally under synapse. AFIK only servlet 
>> transport
>> sets CC as a thread local.
>>
>> In 4.1.0 branch this is working fine without setting CC as thread
>> local. Did something changed in trunk?
>
>
> Please keep yourself up to date on what is going on at the
> platform level. Platform level enhancements have an effect on all 
> products.
> There have been several mail threads on this. you should be able to 
> define
> a handler which sets the proper CC into t

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Miyuru Wanninayaka
Hi Amila,

On Fri, Jul 12, 2013 at 11:27 AM, Amila Suriarachchi  wrote:

>
>
>
> On Fri, Jul 12, 2013 at 11:17 AM, Miyuru Wanninayaka wrote:
>
>> Hi Dushan,
>>
>> Dispatcher/Handler will only help in cases where message come to synapse
>> from outside.
>>
>> For other cases, we need to develop a extension point in synapse which
>> invokes after a thread spawn to set CC as thread local.
>>
>> Seems we can get AxisConfiguration in any place which synapse create a
>> new thread. So we can develop a handler API which has something like
>>
>> public void populateThreadLocal(AxisConfiguration) or something
>>
>> which figure out tenant information and  polulate CC.
>>
>> @Azeez, can we figure out tenant information by looking at
>> AxisConfiguration?
>> Using something like AxisConfiguration.getRepository()
>
>
> In here you need to think about how to get the tenant information from the
> request message. Always we need to get the tenant information from the
> request message and set to thread local. There are two ways
>
> 1. From the request URI
> 2. user name - user can have tenant qualified name
>

both these are not available for pooling/non-http transports


> thanks,
> Amila.
>
>>
>>
>> On Fri, Jul 12, 2013 at 10:19 AM, Dushan Abeyruwan wrote:
>>
>>> Hi Miyru,
>>>I think we can intercept the Carbon context by writing a dispatch in
>>> DispatchPhase this can be a component whose suppose to resides outside
>>> synapse.
>>>
>>>
>>> Cheers
>>> Dushan
>>>
>>>
>>> On Fri, Jul 12, 2013 at 9:58 AM, Afkham Azeez  wrote:
>>>



 On Fri, Jul 12, 2013 at 9:54 AM, Miyuru Wanninayaka wrote:

>
>
> On Fri, Jul 12, 2013 at 9:36 AM, Afkham Azeez  wrote:
>
>>
>>
>>
>> On Fri, Jul 12, 2013 at 7:28 AM, Miyuru Wanninayaka 
>> wrote:
>>
>>> Hi Azeez,
>>>
>>> Sorry, we were not properly following dev@ discussions recently as
>>> team was very busy with ESB 4.7 release.
>>>
>>> Yes we can set proper CC as thread local in request path via handler
>>> for NIO transports by looking at To address. But how this can implement 
>>> in
>>> generic manner for other transport ( JMS, VFS). May be since other
>>> transports does not support MT anyway, we can always set ST CC for non 
>>> http
>>> transports?
>>>
>>> Also how we can handle thread switching in response path of NIO?
>>> Handler will not help in response path.
>>>
>>> Also there are some mediation threads spawns within synapse without
>>> going through axis2 flow such as
>>> * Synapse tasks
>>> * Message processors
>>> * Priority executors
>>> * Clone and iterate mediators
>>>
>>> How can we set CC in these cases?
>>
>>
>> Any bit of execution has to to be associated with some tenant. It is
>> true for everything listed above. We need to track things like how much 
>> CPU
>> time each tenant consumed and so on. So you need to identify the relevant
>> plug points, and inject the proper CC.
>>
>
> Only problem is above mentioned flows cannot intercept from outside of
> synapse. In such case do we have alternative than writing carbon specific
> code inside synapse?
>


 No. This is why interfaces are needed. We have done this enough & more
 time for Axis2, without writing WSO2 specific code in Axis2.


>
>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 9:50 PM, Afkham Azeez wrote:
>>>



 On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka <
 miy...@wso2.com> wrote:

> ESB does not sets Carbon Context as thread local because PTT/NHTTP
> threads are totally under synapse. AFIK only servlet transport sets 
> CC as a
> thread local.
>
> In 4.1.0 branch this is working fine without setting CC as thread
> local. Did something changed in trunk?


 Please keep yourself up to date on what is going on at the platform
 level. Platform level enhancements have an effect on all products. 
 There
 have been several mail threads on this. you should be able to define a
 handler which sets the proper CC into the Thread.

>
>
> On Thu, Jul 11, 2013 at 7:49 PM, Amila Suriarachchi <
> am...@wso2.com> wrote:
>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka <
>> miy...@wso2.com> wrote:
>>
>>> Hi Amila,
>>>
>>> Are you referring to CarbonContext thread local variable?
>>
>>
>> yes it gets the tenant domain like this
>>
>> public static String getTenantDomain() {
>> return getCarbonContext().getTenantDomain();
>> }
>>
>> thanks,
>> Amila.
>>
>>>
>>>
>

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Amila Suriarachchi
On Fri, Jul 12, 2013 at 11:17 AM, Miyuru Wanninayaka wrote:

> Hi Dushan,
>
> Dispatcher/Handler will only help in cases where message come to synapse
> from outside.
>
> For other cases, we need to develop a extension point in synapse which
> invokes after a thread spawn to set CC as thread local.
>
> Seems we can get AxisConfiguration in any place which synapse create a new
> thread. So we can develop a handler API which has something like
>
> public void populateThreadLocal(AxisConfiguration) or something
>
> which figure out tenant information and  polulate CC.
>
> @Azeez, can we figure out tenant information by looking at
> AxisConfiguration?
> Using something like AxisConfiguration.getRepository()


In here you need to think about how to get the tenant information from the
request message. Always we need to get the tenant information from the
request message and set to thread local. There are two ways

1. From the request URI
2. user name - user can have tenant qualified name

thanks,
Amila.

>
>
> On Fri, Jul 12, 2013 at 10:19 AM, Dushan Abeyruwan wrote:
>
>> Hi Miyru,
>>I think we can intercept the Carbon context by writing a dispatch in
>> DispatchPhase this can be a component whose suppose to resides outside
>> synapse.
>>
>>
>> Cheers
>> Dushan
>>
>>
>> On Fri, Jul 12, 2013 at 9:58 AM, Afkham Azeez  wrote:
>>
>>>
>>>
>>>
>>> On Fri, Jul 12, 2013 at 9:54 AM, Miyuru Wanninayaka wrote:
>>>


 On Fri, Jul 12, 2013 at 9:36 AM, Afkham Azeez  wrote:

>
>
>
> On Fri, Jul 12, 2013 at 7:28 AM, Miyuru Wanninayaka 
> wrote:
>
>> Hi Azeez,
>>
>> Sorry, we were not properly following dev@ discussions recently as
>> team was very busy with ESB 4.7 release.
>>
>> Yes we can set proper CC as thread local in request path via handler
>> for NIO transports by looking at To address. But how this can implement 
>> in
>> generic manner for other transport ( JMS, VFS). May be since other
>> transports does not support MT anyway, we can always set ST CC for non 
>> http
>> transports?
>>
>> Also how we can handle thread switching in response path of NIO?
>> Handler will not help in response path.
>>
>> Also there are some mediation threads spawns within synapse without
>> going through axis2 flow such as
>> * Synapse tasks
>> * Message processors
>> * Priority executors
>> * Clone and iterate mediators
>>
>> How can we set CC in these cases?
>
>
> Any bit of execution has to to be associated with some tenant. It is
> true for everything listed above. We need to track things like how much 
> CPU
> time each tenant consumed and so on. So you need to identify the relevant
> plug points, and inject the proper CC.
>

 Only problem is above mentioned flows cannot intercept from outside of
 synapse. In such case do we have alternative than writing carbon specific
 code inside synapse?

>>>
>>>
>>> No. This is why interfaces are needed. We have done this enough & more
>>> time for Axis2, without writing WSO2 specific code in Axis2.
>>>
>>>

>
>>
>>
>> On Thu, Jul 11, 2013 at 9:50 PM, Afkham Azeez  wrote:
>>
>>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka >> > wrote:
>>>
 ESB does not sets Carbon Context as thread local because PTT/NHTTP
 threads are totally under synapse. AFIK only servlet transport sets CC 
 as a
 thread local.

 In 4.1.0 branch this is working fine without setting CC as thread
 local. Did something changed in trunk?
>>>
>>>
>>> Please keep yourself up to date on what is going on at the platform
>>> level. Platform level enhancements have an effect on all products. There
>>> have been several mail threads on this. you should be able to define a
>>> handler which sets the proper CC into the Thread.
>>>


 On Thu, Jul 11, 2013 at 7:49 PM, Amila Suriarachchi >>> > wrote:

>
>
>
> On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka <
> miy...@wso2.com> wrote:
>
>> Hi Amila,
>>
>> Are you referring to CarbonContext thread local variable?
>
>
> yes it gets the tenant domain like this
>
> public static String getTenantDomain() {
> return getCarbonContext().getTenantDomain();
> }
>
> thanks,
> Amila.
>
>>
>>
>> On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi <
>> am...@wso2.com> wrote:
>>
>>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan <
>>> dus...@wso2.com> wrote:
>>>
 Hi
  Getting following error when executing proxy service ESB 4.8.0

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Miyuru Wanninayaka
Hi Dushan,

Dispatcher/Handler will only help in cases where message come to synapse
from outside.

For other cases, we need to develop a extension point in synapse which
invokes after a thread spawn to set CC as thread local.

Seems we can get AxisConfiguration in any place which synapse create a new
thread. So we can develop a handler API which has something like

public void populateThreadLocal(AxisConfiguration) or something

which figure out tenant information and  polulate CC.

@Azeez, can we figure out tenant information by looking at
AxisConfiguration?
Using something like AxisConfiguration.getRepository()

On Fri, Jul 12, 2013 at 10:19 AM, Dushan Abeyruwan  wrote:

> Hi Miyru,
>I think we can intercept the Carbon context by writing a dispatch in
> DispatchPhase this can be a component whose suppose to resides outside
> synapse.
>
>
> Cheers
> Dushan
>
>
> On Fri, Jul 12, 2013 at 9:58 AM, Afkham Azeez  wrote:
>
>>
>>
>>
>> On Fri, Jul 12, 2013 at 9:54 AM, Miyuru Wanninayaka wrote:
>>
>>>
>>>
>>> On Fri, Jul 12, 2013 at 9:36 AM, Afkham Azeez  wrote:
>>>



 On Fri, Jul 12, 2013 at 7:28 AM, Miyuru Wanninayaka wrote:

> Hi Azeez,
>
> Sorry, we were not properly following dev@ discussions recently as
> team was very busy with ESB 4.7 release.
>
> Yes we can set proper CC as thread local in request path via handler
> for NIO transports by looking at To address. But how this can implement in
> generic manner for other transport ( JMS, VFS). May be since other
> transports does not support MT anyway, we can always set ST CC for non 
> http
> transports?
>
> Also how we can handle thread switching in response path of NIO?
> Handler will not help in response path.
>
> Also there are some mediation threads spawns within synapse without
> going through axis2 flow such as
> * Synapse tasks
> * Message processors
> * Priority executors
> * Clone and iterate mediators
>
> How can we set CC in these cases?


 Any bit of execution has to to be associated with some tenant. It is
 true for everything listed above. We need to track things like how much CPU
 time each tenant consumed and so on. So you need to identify the relevant
 plug points, and inject the proper CC.

>>>
>>> Only problem is above mentioned flows cannot intercept from outside of
>>> synapse. In such case do we have alternative than writing carbon specific
>>> code inside synapse?
>>>
>>
>>
>> No. This is why interfaces are needed. We have done this enough & more
>> time for Axis2, without writing WSO2 specific code in Axis2.
>>
>>
>>>

>
>
> On Thu, Jul 11, 2013 at 9:50 PM, Afkham Azeez  wrote:
>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka 
>> wrote:
>>
>>> ESB does not sets Carbon Context as thread local because PTT/NHTTP
>>> threads are totally under synapse. AFIK only servlet transport sets CC 
>>> as a
>>> thread local.
>>>
>>> In 4.1.0 branch this is working fine without setting CC as thread
>>> local. Did something changed in trunk?
>>
>>
>> Please keep yourself up to date on what is going on at the platform
>> level. Platform level enhancements have an effect on all products. There
>> have been several mail threads on this. you should be able to define a
>> handler which sets the proper CC into the Thread.
>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 7:49 PM, Amila Suriarachchi 
>>> wrote:
>>>



 On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka <
 miy...@wso2.com> wrote:

> Hi Amila,
>
> Are you referring to CarbonContext thread local variable?


 yes it gets the tenant domain like this

 public static String getTenantDomain() {
 return getCarbonContext().getTenantDomain();
 }

 thanks,
 Amila.

>
>
> On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi <
> am...@wso2.com> wrote:
>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan <
>> dus...@wso2.com> wrote:
>>
>>> Hi
>>>  Getting following error when executing proxy service ESB 4.8.0
>>> built 2013-07-11
>>>
>>> [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis
>>> service for Proxy service : SearchTwitter
>>> [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
>>> SearchTwitter to the Axis2 configuration
>>> [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor
>>> Deploying Axis2 service: SearchTwitter {super-tenant}
>>> [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully
>>> created the Axis2 service for Proxy servi

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Dushan Abeyruwan
Hi Miyru,
   I think we can intercept the Carbon context by writing a dispatch in
DispatchPhase this can be a component whose suppose to resides outside
synapse.


Cheers
Dushan


On Fri, Jul 12, 2013 at 9:58 AM, Afkham Azeez  wrote:

>
>
>
> On Fri, Jul 12, 2013 at 9:54 AM, Miyuru Wanninayaka wrote:
>
>>
>>
>> On Fri, Jul 12, 2013 at 9:36 AM, Afkham Azeez  wrote:
>>
>>>
>>>
>>>
>>> On Fri, Jul 12, 2013 at 7:28 AM, Miyuru Wanninayaka wrote:
>>>
 Hi Azeez,

 Sorry, we were not properly following dev@ discussions recently as
 team was very busy with ESB 4.7 release.

 Yes we can set proper CC as thread local in request path via handler
 for NIO transports by looking at To address. But how this can implement in
 generic manner for other transport ( JMS, VFS). May be since other
 transports does not support MT anyway, we can always set ST CC for non http
 transports?

 Also how we can handle thread switching in response path of NIO?
 Handler will not help in response path.

 Also there are some mediation threads spawns within synapse without
 going through axis2 flow such as
 * Synapse tasks
 * Message processors
 * Priority executors
 * Clone and iterate mediators

 How can we set CC in these cases?
>>>
>>>
>>> Any bit of execution has to to be associated with some tenant. It is
>>> true for everything listed above. We need to track things like how much CPU
>>> time each tenant consumed and so on. So you need to identify the relevant
>>> plug points, and inject the proper CC.
>>>
>>
>> Only problem is above mentioned flows cannot intercept from outside of
>> synapse. In such case do we have alternative than writing carbon specific
>> code inside synapse?
>>
>
>
> No. This is why interfaces are needed. We have done this enough & more
> time for Axis2, without writing WSO2 specific code in Axis2.
>
>
>>
>>>


 On Thu, Jul 11, 2013 at 9:50 PM, Afkham Azeez  wrote:

>
>
>
> On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka 
> wrote:
>
>> ESB does not sets Carbon Context as thread local because PTT/NHTTP
>> threads are totally under synapse. AFIK only servlet transport sets CC 
>> as a
>> thread local.
>>
>> In 4.1.0 branch this is working fine without setting CC as thread
>> local. Did something changed in trunk?
>
>
> Please keep yourself up to date on what is going on at the platform
> level. Platform level enhancements have an effect on all products. There
> have been several mail threads on this. you should be able to define a
> handler which sets the proper CC into the Thread.
>
>>
>>
>> On Thu, Jul 11, 2013 at 7:49 PM, Amila Suriarachchi 
>> wrote:
>>
>>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka >> > wrote:
>>>
 Hi Amila,

 Are you referring to CarbonContext thread local variable?
>>>
>>>
>>> yes it gets the tenant domain like this
>>>
>>> public static String getTenantDomain() {
>>> return getCarbonContext().getTenantDomain();
>>> }
>>>
>>> thanks,
>>> Amila.
>>>


 On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi >>> > wrote:

>
>
>
> On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan  > wrote:
>
>> Hi
>>  Getting following error when executing proxy service ESB 4.8.0
>> built 2013-07-11
>>
>> [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis
>> service for Proxy service : SearchTwitter
>> [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
>> SearchTwitter to the Axis2 configuration
>> [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying
>> Axis2 service: SearchTwitter {super-tenant}
>> [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully
>> created the Axis2 service for Proxy service : SearchTwitter
>> [2013-07-11 16:37:29,694]  INFO - LogMediator To:
>> /services/SearchTwitter, WSAction: urn:getQuote, SOAPAction: 
>> urn:getQuote,
>> MessageID: urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3,
>> Direction: request*
>> *[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught
>> exception*
>> *java.lang.NullPointerException*
>> * at
>> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
>> *
>> * at
>> org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
>> *
>> at
>> org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
>>  at
>> org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtil

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Afkham Azeez
On Fri, Jul 12, 2013 at 9:54 AM, Miyuru Wanninayaka  wrote:

>
>
> On Fri, Jul 12, 2013 at 9:36 AM, Afkham Azeez  wrote:
>
>>
>>
>>
>> On Fri, Jul 12, 2013 at 7:28 AM, Miyuru Wanninayaka wrote:
>>
>>> Hi Azeez,
>>>
>>> Sorry, we were not properly following dev@ discussions recently as team
>>> was very busy with ESB 4.7 release.
>>>
>>> Yes we can set proper CC as thread local in request path via handler for
>>> NIO transports by looking at To address. But how this can implement in
>>> generic manner for other transport ( JMS, VFS). May be since other
>>> transports does not support MT anyway, we can always set ST CC for non http
>>> transports?
>>>
>>> Also how we can handle thread switching in response path of NIO? Handler
>>> will not help in response path.
>>>
>>> Also there are some mediation threads spawns within synapse without
>>> going through axis2 flow such as
>>> * Synapse tasks
>>> * Message processors
>>> * Priority executors
>>> * Clone and iterate mediators
>>>
>>> How can we set CC in these cases?
>>
>>
>> Any bit of execution has to to be associated with some tenant. It is true
>> for everything listed above. We need to track things like how much CPU time
>> each tenant consumed and so on. So you need to identify the relevant plug
>> points, and inject the proper CC.
>>
>
> Only problem is above mentioned flows cannot intercept from outside of
> synapse. In such case do we have alternative than writing carbon specific
> code inside synapse?
>


No. This is why interfaces are needed. We have done this enough & more time
for Axis2, without writing WSO2 specific code in Axis2.


>
>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 9:50 PM, Afkham Azeez  wrote:
>>>



 On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka wrote:

> ESB does not sets Carbon Context as thread local because PTT/NHTTP
> threads are totally under synapse. AFIK only servlet transport sets CC as 
> a
> thread local.
>
> In 4.1.0 branch this is working fine without setting CC as thread
> local. Did something changed in trunk?


 Please keep yourself up to date on what is going on at the platform
 level. Platform level enhancements have an effect on all products. There
 have been several mail threads on this. you should be able to define a
 handler which sets the proper CC into the Thread.

>
>
> On Thu, Jul 11, 2013 at 7:49 PM, Amila Suriarachchi wrote:
>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka 
>> wrote:
>>
>>> Hi Amila,
>>>
>>> Are you referring to CarbonContext thread local variable?
>>
>>
>> yes it gets the tenant domain like this
>>
>> public static String getTenantDomain() {
>> return getCarbonContext().getTenantDomain();
>> }
>>
>> thanks,
>> Amila.
>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi 
>>> wrote:
>>>



 On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan 
 wrote:

> Hi
>  Getting following error when executing proxy service ESB 4.8.0
> built 2013-07-11
>
> [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis
> service for Proxy service : SearchTwitter
> [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
> SearchTwitter to the Axis2 configuration
> [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying
> Axis2 service: SearchTwitter {super-tenant}
> [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully
> created the Axis2 service for Proxy service : SearchTwitter
> [2013-07-11 16:37:29,694]  INFO - LogMediator To:
> /services/SearchTwitter, WSAction: urn:getQuote, SOAPAction: 
> urn:getQuote,
> MessageID: urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3,
> Direction: request*
> *[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught
> exception*
> *java.lang.NullPointerException*
> * at
> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
> *
> * at
> org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
> *
> at
> org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
>  at
> org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtils.java:272)
> at
> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getCache(CacheBackedRegistry.java:62)
>  at
> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.resourceExists(CacheBackedRegistry.java:246)
> at
> org.wso2.carbon.registry.core.session.UserRegistry.resourceExists(UserRegistry.java:629)
>  at
> org.w

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Miyuru Wanninayaka
On Fri, Jul 12, 2013 at 9:36 AM, Afkham Azeez  wrote:

>
>
>
> On Fri, Jul 12, 2013 at 7:28 AM, Miyuru Wanninayaka wrote:
>
>> Hi Azeez,
>>
>> Sorry, we were not properly following dev@ discussions recently as team
>> was very busy with ESB 4.7 release.
>>
>> Yes we can set proper CC as thread local in request path via handler for
>> NIO transports by looking at To address. But how this can implement in
>> generic manner for other transport ( JMS, VFS). May be since other
>> transports does not support MT anyway, we can always set ST CC for non http
>> transports?
>>
>> Also how we can handle thread switching in response path of NIO? Handler
>> will not help in response path.
>>
>> Also there are some mediation threads spawns within synapse without going
>> through axis2 flow such as
>> * Synapse tasks
>> * Message processors
>> * Priority executors
>> * Clone and iterate mediators
>>
>> How can we set CC in these cases?
>
>
> Any bit of execution has to to be associated with some tenant. It is true
> for everything listed above. We need to track things like how much CPU time
> each tenant consumed and so on. So you need to identify the relevant plug
> points, and inject the proper CC.
>

Only problem is above mentioned flows cannot intercept from outside of
synapse. In such case do we have alternative than writing carbon specific
code inside synapse?

>
>
>>
>>
>> On Thu, Jul 11, 2013 at 9:50 PM, Afkham Azeez  wrote:
>>
>>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka wrote:
>>>
 ESB does not sets Carbon Context as thread local because PTT/NHTTP
 threads are totally under synapse. AFIK only servlet transport sets CC as a
 thread local.

 In 4.1.0 branch this is working fine without setting CC as thread
 local. Did something changed in trunk?
>>>
>>>
>>> Please keep yourself up to date on what is going on at the platform
>>> level. Platform level enhancements have an effect on all products. There
>>> have been several mail threads on this. you should be able to define a
>>> handler which sets the proper CC into the Thread.
>>>


 On Thu, Jul 11, 2013 at 7:49 PM, Amila Suriarachchi wrote:

>
>
>
> On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka 
> wrote:
>
>> Hi Amila,
>>
>> Are you referring to CarbonContext thread local variable?
>
>
> yes it gets the tenant domain like this
>
> public static String getTenantDomain() {
> return getCarbonContext().getTenantDomain();
> }
>
> thanks,
> Amila.
>
>>
>>
>> On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi 
>> wrote:
>>
>>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan 
>>> wrote:
>>>
 Hi
  Getting following error when executing proxy service ESB 4.8.0
 built 2013-07-11

 [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis
 service for Proxy service : SearchTwitter
 [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
 SearchTwitter to the Axis2 configuration
 [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying
 Axis2 service: SearchTwitter {super-tenant}
 [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully created
 the Axis2 service for Proxy service : SearchTwitter
 [2013-07-11 16:37:29,694]  INFO - LogMediator To:
 /services/SearchTwitter, WSAction: urn:getQuote, SOAPAction: 
 urn:getQuote,
 MessageID: urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3,
 Direction: request*
 *[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught
 exception*
 *java.lang.NullPointerException*
 * at
 java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
 *
 * at
 org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
 *
 at
 org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
  at
 org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtils.java:272)
 at
 org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getCache(CacheBackedRegistry.java:62)
  at
 org.wso2.carbon.registry.core.caching.CacheBackedRegistry.resourceExists(CacheBackedRegistry.java:246)
 at
 org.wso2.carbon.registry.core.session.UserRegistry.resourceExists(UserRegistry.java:629)
  at
 org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:527)
 at
 org.wso2.carbon.mediation.registry.WSO2Registry.lookup(WSO2Registry.java:131)
  at
 org.apache.synapse.registry.AbstractRegistry.getResource(AbstractRegistry.java:63)
 at
 org.apache.synapse.config.SynapseConfiguration

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Afkham Azeez
On Fri, Jul 12, 2013 at 7:28 AM, Miyuru Wanninayaka  wrote:

> Hi Azeez,
>
> Sorry, we were not properly following dev@ discussions recently as team
> was very busy with ESB 4.7 release.
>
> Yes we can set proper CC as thread local in request path via handler for
> NIO transports by looking at To address. But how this can implement in
> generic manner for other transport ( JMS, VFS). May be since other
> transports does not support MT anyway, we can always set ST CC for non http
> transports?
>
> Also how we can handle thread switching in response path of NIO? Handler
> will not help in response path.
>
> Also there are some mediation threads spawns within synapse without going
> through axis2 flow such as
> * Synapse tasks
> * Message processors
> * Priority executors
> * Clone and iterate mediators
>
> How can we set CC in these cases?


Any bit of execution has to to be associated with some tenant. It is true
for everything listed above. We need to track things like how much CPU time
each tenant consumed and so on. So you need to identify the relevant plug
points, and inject the proper CC.


>
>
> On Thu, Jul 11, 2013 at 9:50 PM, Afkham Azeez  wrote:
>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka wrote:
>>
>>> ESB does not sets Carbon Context as thread local because PTT/NHTTP
>>> threads are totally under synapse. AFIK only servlet transport sets CC as a
>>> thread local.
>>>
>>> In 4.1.0 branch this is working fine without setting CC as thread local.
>>> Did something changed in trunk?
>>
>>
>> Please keep yourself up to date on what is going on at the platform
>> level. Platform level enhancements have an effect on all products. There
>> have been several mail threads on this. you should be able to define a
>> handler which sets the proper CC into the Thread.
>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 7:49 PM, Amila Suriarachchi wrote:
>>>



 On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka wrote:

> Hi Amila,
>
> Are you referring to CarbonContext thread local variable?


 yes it gets the tenant domain like this

 public static String getTenantDomain() {
 return getCarbonContext().getTenantDomain();
 }

 thanks,
 Amila.

>
>
> On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi wrote:
>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan wrote:
>>
>>> Hi
>>>  Getting following error when executing proxy service ESB 4.8.0
>>> built 2013-07-11
>>>
>>> [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis service
>>> for Proxy service : SearchTwitter
>>> [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
>>> SearchTwitter to the Axis2 configuration
>>> [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying
>>> Axis2 service: SearchTwitter {super-tenant}
>>> [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully created
>>> the Axis2 service for Proxy service : SearchTwitter
>>> [2013-07-11 16:37:29,694]  INFO - LogMediator To:
>>> /services/SearchTwitter, WSAction: urn:getQuote, SOAPAction: 
>>> urn:getQuote,
>>> MessageID: urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3,
>>> Direction: request*
>>> *[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught
>>> exception*
>>> *java.lang.NullPointerException*
>>> * at
>>> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
>>> *
>>> * at
>>> org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
>>> *
>>> at
>>> org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
>>>  at
>>> org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtils.java:272)
>>> at
>>> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getCache(CacheBackedRegistry.java:62)
>>>  at
>>> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.resourceExists(CacheBackedRegistry.java:246)
>>> at
>>> org.wso2.carbon.registry.core.session.UserRegistry.resourceExists(UserRegistry.java:629)
>>>  at
>>> org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:527)
>>> at
>>> org.wso2.carbon.mediation.registry.WSO2Registry.lookup(WSO2Registry.java:131)
>>>  at
>>> org.apache.synapse.registry.AbstractRegistry.getResource(AbstractRegistry.java:63)
>>> at
>>> org.apache.synapse.config.SynapseConfiguration.getSequenceTemplate(SynapseConfiguration.java:395)
>>>  at
>>> org.apache.synapse.core.axis2.Axis2MessageContext.getSequenceTemplate(Axis2MessageContext.java:191)
>>> at
>>> org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:71)
>>>  at
>>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
>

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Miyuru Wanninayaka
Hi Azeez,

Sorry, we were not properly following dev@ discussions recently as team was
very busy with ESB 4.7 release.

Yes we can set proper CC as thread local in request path via handler for
NIO transports by looking at To address. But how this can implement in
generic manner for other transport ( JMS, VFS). May be since other
transports does not support MT anyway, we can always set ST CC for non http
transports?

Also how we can handle thread switching in response path of NIO? Handler
will not help in response path.

Also there are some mediation threads spawns within synapse without going
through axis2 flow such as
* Synapse tasks
* Message processors
* Priority executors
* Clone and iterate mediators

How can we set CC in these cases?

On Thu, Jul 11, 2013 at 9:50 PM, Afkham Azeez  wrote:

>
>
>
> On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka wrote:
>
>> ESB does not sets Carbon Context as thread local because PTT/NHTTP
>> threads are totally under synapse. AFIK only servlet transport sets CC as a
>> thread local.
>>
>> In 4.1.0 branch this is working fine without setting CC as thread local.
>> Did something changed in trunk?
>
>
> Please keep yourself up to date on what is going on at the platform level.
> Platform level enhancements have an effect on all products. There have been
> several mail threads on this. you should be able to define a handler which
> sets the proper CC into the Thread.
>
>>
>>
>> On Thu, Jul 11, 2013 at 7:49 PM, Amila Suriarachchi wrote:
>>
>>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka wrote:
>>>
 Hi Amila,

 Are you referring to CarbonContext thread local variable?
>>>
>>>
>>> yes it gets the tenant domain like this
>>>
>>> public static String getTenantDomain() {
>>> return getCarbonContext().getTenantDomain();
>>> }
>>>
>>> thanks,
>>> Amila.
>>>


 On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi wrote:

>
>
>
> On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan wrote:
>
>> Hi
>>  Getting following error when executing proxy service ESB 4.8.0 built
>> 2013-07-11
>>
>> [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis service
>> for Proxy service : SearchTwitter
>> [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
>> SearchTwitter to the Axis2 configuration
>> [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying
>> Axis2 service: SearchTwitter {super-tenant}
>> [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully created
>> the Axis2 service for Proxy service : SearchTwitter
>> [2013-07-11 16:37:29,694]  INFO - LogMediator To:
>> /services/SearchTwitter, WSAction: urn:getQuote, SOAPAction: 
>> urn:getQuote,
>> MessageID: urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3,
>> Direction: request*
>> *[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught
>> exception*
>> *java.lang.NullPointerException*
>> * at
>> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
>> *
>> * at
>> org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
>> *
>> at
>> org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
>>  at
>> org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtils.java:272)
>> at
>> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getCache(CacheBackedRegistry.java:62)
>>  at
>> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.resourceExists(CacheBackedRegistry.java:246)
>> at
>> org.wso2.carbon.registry.core.session.UserRegistry.resourceExists(UserRegistry.java:629)
>>  at
>> org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:527)
>> at
>> org.wso2.carbon.mediation.registry.WSO2Registry.lookup(WSO2Registry.java:131)
>>  at
>> org.apache.synapse.registry.AbstractRegistry.getResource(AbstractRegistry.java:63)
>> at
>> org.apache.synapse.config.SynapseConfiguration.getSequenceTemplate(SynapseConfiguration.java:395)
>>  at
>> org.apache.synapse.core.axis2.Axis2MessageContext.getSequenceTemplate(Axis2MessageContext.java:191)
>> at
>> org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:71)
>>  at
>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
>> at
>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
>>  at
>> org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:162)
>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>>  at
>> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
>> at
>> org.apache.synapse.transport.passth

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Afkham Azeez
On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka  wrote:

> ESB does not sets Carbon Context as thread local because PTT/NHTTP threads
> are totally under synapse. AFIK only servlet transport sets CC as a thread
> local.
>
> In 4.1.0 branch this is working fine without setting CC as thread local.
> Did something changed in trunk?


Please keep yourself up to date on what is going on at the platform level.
Platform level enhancements have an effect on all products. There have been
several mail threads on this. you should be able to define a handler which
sets the proper CC into the Thread.

>
>
> On Thu, Jul 11, 2013 at 7:49 PM, Amila Suriarachchi wrote:
>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka wrote:
>>
>>> Hi Amila,
>>>
>>> Are you referring to CarbonContext thread local variable?
>>
>>
>> yes it gets the tenant domain like this
>>
>> public static String getTenantDomain() {
>> return getCarbonContext().getTenantDomain();
>> }
>>
>> thanks,
>> Amila.
>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi wrote:
>>>



 On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan wrote:

> Hi
>  Getting following error when executing proxy service ESB 4.8.0 built
> 2013-07-11
>
> [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis service
> for Proxy service : SearchTwitter
> [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
> SearchTwitter to the Axis2 configuration
> [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying
> Axis2 service: SearchTwitter {super-tenant}
> [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully created
> the Axis2 service for Proxy service : SearchTwitter
> [2013-07-11 16:37:29,694]  INFO - LogMediator To:
> /services/SearchTwitter, WSAction: urn:getQuote, SOAPAction: urn:getQuote,
> MessageID: urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3, Direction:
> request*
> *[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught exception
> *
> *java.lang.NullPointerException*
> * at
> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
> *
> * at
> org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
> *
> at
> org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
>  at
> org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtils.java:272)
> at
> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getCache(CacheBackedRegistry.java:62)
>  at
> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.resourceExists(CacheBackedRegistry.java:246)
> at
> org.wso2.carbon.registry.core.session.UserRegistry.resourceExists(UserRegistry.java:629)
>  at
> org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:527)
> at
> org.wso2.carbon.mediation.registry.WSO2Registry.lookup(WSO2Registry.java:131)
>  at
> org.apache.synapse.registry.AbstractRegistry.getResource(AbstractRegistry.java:63)
> at
> org.apache.synapse.config.SynapseConfiguration.getSequenceTemplate(SynapseConfiguration.java:395)
>  at
> org.apache.synapse.core.axis2.Axis2MessageContext.getSequenceTemplate(Axis2MessageContext.java:191)
> at
> org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:71)
>  at
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
> at
> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
>  at
> org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:162)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>  at
> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
> at
> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184)
>  at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(Nat
>

 seems like tenant domain is null for the threads originating from
 passthrough transport threads. Can you please check the tenant domain of
 the pass through transport threads?

 thanks,
 Amila.

>
> --
> Dushan Abeyruwan
> Associate Tech Lead
> *Integration Technologies Team*
> *WSO2 Inc. http://wso2.com/*
> *Mobile:(+94)714408632*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 *Amila Suriarachchi*

 Software Architect
 WSO2 Inc. ; http://wso2.com
 lean . enterprise . middleware

 phone : +94 71 3082805

 ___
 Dev ma

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Afkham Azeez
Yeah, please fix up ESB to properly work with CarbonContext like other
products do. There have been a number of mail thread related to this. All
threads in Carbon have to be associated with a tenant.

Azeez


On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka  wrote:

> ESB does not sets Carbon Context as thread local because PTT/NHTTP threads
> are totally under synapse. AFIK only servlet transport sets CC as a thread
> local.
>
> In 4.1.0 branch this is working fine without setting CC as thread local.
> Did something changed in trunk?
>
>
> On Thu, Jul 11, 2013 at 7:49 PM, Amila Suriarachchi wrote:
>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka wrote:
>>
>>> Hi Amila,
>>>
>>> Are you referring to CarbonContext thread local variable?
>>
>>
>> yes it gets the tenant domain like this
>>
>> public static String getTenantDomain() {
>> return getCarbonContext().getTenantDomain();
>> }
>>
>> thanks,
>> Amila.
>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi wrote:
>>>



 On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan wrote:

> Hi
>  Getting following error when executing proxy service ESB 4.8.0 built
> 2013-07-11
>
> [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis service
> for Proxy service : SearchTwitter
> [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
> SearchTwitter to the Axis2 configuration
> [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying
> Axis2 service: SearchTwitter {super-tenant}
> [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully created
> the Axis2 service for Proxy service : SearchTwitter
> [2013-07-11 16:37:29,694]  INFO - LogMediator To:
> /services/SearchTwitter, WSAction: urn:getQuote, SOAPAction: urn:getQuote,
> MessageID: urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3, Direction:
> request*
> *[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught exception
> *
> *java.lang.NullPointerException*
> * at
> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
> *
> * at
> org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
> *
> at
> org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
>  at
> org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtils.java:272)
> at
> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getCache(CacheBackedRegistry.java:62)
>  at
> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.resourceExists(CacheBackedRegistry.java:246)
> at
> org.wso2.carbon.registry.core.session.UserRegistry.resourceExists(UserRegistry.java:629)
>  at
> org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:527)
> at
> org.wso2.carbon.mediation.registry.WSO2Registry.lookup(WSO2Registry.java:131)
>  at
> org.apache.synapse.registry.AbstractRegistry.getResource(AbstractRegistry.java:63)
> at
> org.apache.synapse.config.SynapseConfiguration.getSequenceTemplate(SynapseConfiguration.java:395)
>  at
> org.apache.synapse.core.axis2.Axis2MessageContext.getSequenceTemplate(Axis2MessageContext.java:191)
> at
> org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:71)
>  at
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
> at
> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
>  at
> org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:162)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>  at
> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
> at
> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184)
>  at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(Nat
>

 seems like tenant domain is null for the threads originating from
 passthrough transport threads. Can you please check the tenant domain of
 the pass through transport threads?

 thanks,
 Amila.

>
> --
> Dushan Abeyruwan
> Associate Tech Lead
> *Integration Technologies Team*
> *WSO2 Inc. http://wso2.com/*
> *Mobile:(+94)714408632*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 *Amila Suriarachchi*

 Software Architect
 WSO2 Inc. ; http://wso2.com
 lean . enterprise . middleware

 phone : +94 71 3082805

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bi

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Amila Suriarachchi
On Thu, Jul 11, 2013 at 7:59 PM, Miyuru Wanninayaka  wrote:

> ESB does not sets Carbon Context as thread local because PTT/NHTTP threads
> are totally under synapse. AFIK only servlet transport sets CC as a thread
> local.
>
> In 4.1.0 branch this is working fine without setting CC as thread local.
> Did something changed in trunk?


yes. New caching model mandate the setting thread local. Lets talk with
Azeez and figure out what to do.

thanks,
Amila.

>
>
> On Thu, Jul 11, 2013 at 7:49 PM, Amila Suriarachchi wrote:
>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka wrote:
>>
>>> Hi Amila,
>>>
>>> Are you referring to CarbonContext thread local variable?
>>
>>
>> yes it gets the tenant domain like this
>>
>> public static String getTenantDomain() {
>> return getCarbonContext().getTenantDomain();
>> }
>>
>> thanks,
>> Amila.
>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi wrote:
>>>



 On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan wrote:

> Hi
>  Getting following error when executing proxy service ESB 4.8.0 built
> 2013-07-11
>
> [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis service
> for Proxy service : SearchTwitter
> [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
> SearchTwitter to the Axis2 configuration
> [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying
> Axis2 service: SearchTwitter {super-tenant}
> [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully created
> the Axis2 service for Proxy service : SearchTwitter
> [2013-07-11 16:37:29,694]  INFO - LogMediator To:
> /services/SearchTwitter, WSAction: urn:getQuote, SOAPAction: urn:getQuote,
> MessageID: urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3, Direction:
> request*
> *[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught exception
> *
> *java.lang.NullPointerException*
> * at
> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
> *
> * at
> org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
> *
> at
> org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
>  at
> org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtils.java:272)
> at
> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getCache(CacheBackedRegistry.java:62)
>  at
> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.resourceExists(CacheBackedRegistry.java:246)
> at
> org.wso2.carbon.registry.core.session.UserRegistry.resourceExists(UserRegistry.java:629)
>  at
> org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:527)
> at
> org.wso2.carbon.mediation.registry.WSO2Registry.lookup(WSO2Registry.java:131)
>  at
> org.apache.synapse.registry.AbstractRegistry.getResource(AbstractRegistry.java:63)
> at
> org.apache.synapse.config.SynapseConfiguration.getSequenceTemplate(SynapseConfiguration.java:395)
>  at
> org.apache.synapse.core.axis2.Axis2MessageContext.getSequenceTemplate(Axis2MessageContext.java:191)
> at
> org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:71)
>  at
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
> at
> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
>  at
> org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:162)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>  at
> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
> at
> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184)
>  at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(Nat
>

 seems like tenant domain is null for the threads originating from
 passthrough transport threads. Can you please check the tenant domain of
 the pass through transport threads?

 thanks,
 Amila.

>
> --
> Dushan Abeyruwan
> Associate Tech Lead
> *Integration Technologies Team*
> *WSO2 Inc. http://wso2.com/*
> *Mobile:(+94)714408632*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 *Amila Suriarachchi*

 Software Architect
 WSO2 Inc. ; http://wso2.com
 lean . enterprise . middleware

 phone : +94 71 3082805

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> Miyuru Wanninayaka
>>> Technical 

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Miyuru Wanninayaka
ESB does not sets Carbon Context as thread local because PTT/NHTTP threads
are totally under synapse. AFIK only servlet transport sets CC as a thread
local.

In 4.1.0 branch this is working fine without setting CC as thread local.
Did something changed in trunk?

On Thu, Jul 11, 2013 at 7:49 PM, Amila Suriarachchi  wrote:

>
>
>
> On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka wrote:
>
>> Hi Amila,
>>
>> Are you referring to CarbonContext thread local variable?
>
>
> yes it gets the tenant domain like this
>
> public static String getTenantDomain() {
> return getCarbonContext().getTenantDomain();
> }
>
> thanks,
> Amila.
>
>>
>>
>> On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi wrote:
>>
>>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan wrote:
>>>
 Hi
  Getting following error when executing proxy service ESB 4.8.0 built
 2013-07-11

 [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis service
 for Proxy service : SearchTwitter
 [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
 SearchTwitter to the Axis2 configuration
 [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying Axis2
 service: SearchTwitter {super-tenant}
 [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully created the
 Axis2 service for Proxy service : SearchTwitter
 [2013-07-11 16:37:29,694]  INFO - LogMediator To:
 /services/SearchTwitter, WSAction: urn:getQuote, SOAPAction: urn:getQuote,
 MessageID: urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3, Direction:
 request*
 *[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught exception*
 *java.lang.NullPointerException*
 * at
 java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)*
 * at
 org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
 *
 at
 org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
  at
 org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtils.java:272)
 at
 org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getCache(CacheBackedRegistry.java:62)
  at
 org.wso2.carbon.registry.core.caching.CacheBackedRegistry.resourceExists(CacheBackedRegistry.java:246)
 at
 org.wso2.carbon.registry.core.session.UserRegistry.resourceExists(UserRegistry.java:629)
  at
 org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:527)
 at
 org.wso2.carbon.mediation.registry.WSO2Registry.lookup(WSO2Registry.java:131)
  at
 org.apache.synapse.registry.AbstractRegistry.getResource(AbstractRegistry.java:63)
 at
 org.apache.synapse.config.SynapseConfiguration.getSequenceTemplate(SynapseConfiguration.java:395)
  at
 org.apache.synapse.core.axis2.Axis2MessageContext.getSequenceTemplate(Axis2MessageContext.java:191)
 at
 org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:71)
  at
 org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
 at
 org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
  at
 org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:162)
 at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
  at
 org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
 at
 org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184)
  at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(Nat

>>>
>>> seems like tenant domain is null for the threads originating from
>>> passthrough transport threads. Can you please check the tenant domain of
>>> the pass through transport threads?
>>>
>>> thanks,
>>> Amila.
>>>

 --
 Dushan Abeyruwan
 Associate Tech Lead
 *Integration Technologies Team*
 *WSO2 Inc. http://wso2.com/*
 *Mobile:(+94)714408632*

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> *Amila Suriarachchi*
>>>
>>> Software Architect
>>> WSO2 Inc. ; http://wso2.com
>>> lean . enterprise . middleware
>>>
>>> phone : +94 71 3082805
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Miyuru Wanninayaka
>> Technical Lead
>> WSO2 Inc. : http://wso2.com
>>
>> Mobile : +94 77 209 9788
>> Blog : http://miyurudw.blogspot.com
>> Flickr : http://www.flickr.com/photos/miyuru_daminda
>
>
>
>
> --
> *Amila Suriarachchi*
>
> Software Architect
> WSO2 Inc. ; http://wso2.com
> lean . enterprise . middleware
>
> phone : +94 71 3082805
>



-- 
Miyuru Wanninayaka
Techni

Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Amila Suriarachchi
On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka  wrote:

> Hi Amila,
>
> Are you referring to CarbonContext thread local variable?


yes it gets the tenant domain like this

public static String getTenantDomain() {
return getCarbonContext().getTenantDomain();
}

thanks,
Amila.

>
>
> On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi wrote:
>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan wrote:
>>
>>> Hi
>>>  Getting following error when executing proxy service ESB 4.8.0 built
>>> 2013-07-11
>>>
>>> [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis service for
>>> Proxy service : SearchTwitter
>>> [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
>>> SearchTwitter to the Axis2 configuration
>>> [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying Axis2
>>> service: SearchTwitter {super-tenant}
>>> [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully created the
>>> Axis2 service for Proxy service : SearchTwitter
>>> [2013-07-11 16:37:29,694]  INFO - LogMediator To:
>>> /services/SearchTwitter, WSAction: urn:getQuote, SOAPAction: urn:getQuote,
>>> MessageID: urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3, Direction:
>>> request*
>>> *[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught exception*
>>> *java.lang.NullPointerException*
>>> * at
>>> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)*
>>> * at
>>> org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
>>> *
>>> at
>>> org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
>>>  at
>>> org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtils.java:272)
>>> at
>>> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getCache(CacheBackedRegistry.java:62)
>>>  at
>>> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.resourceExists(CacheBackedRegistry.java:246)
>>> at
>>> org.wso2.carbon.registry.core.session.UserRegistry.resourceExists(UserRegistry.java:629)
>>>  at
>>> org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:527)
>>> at
>>> org.wso2.carbon.mediation.registry.WSO2Registry.lookup(WSO2Registry.java:131)
>>>  at
>>> org.apache.synapse.registry.AbstractRegistry.getResource(AbstractRegistry.java:63)
>>> at
>>> org.apache.synapse.config.SynapseConfiguration.getSequenceTemplate(SynapseConfiguration.java:395)
>>>  at
>>> org.apache.synapse.core.axis2.Axis2MessageContext.getSequenceTemplate(Axis2MessageContext.java:191)
>>> at
>>> org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:71)
>>>  at
>>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
>>> at
>>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
>>>  at
>>> org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:162)
>>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>>>  at
>>> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
>>> at
>>> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184)
>>>  at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(Nat
>>>
>>
>> seems like tenant domain is null for the threads originating from
>> passthrough transport threads. Can you please check the tenant domain of
>> the pass through transport threads?
>>
>> thanks,
>> Amila.
>>
>>>
>>> --
>>> Dushan Abeyruwan
>>> Associate Tech Lead
>>> *Integration Technologies Team*
>>> *WSO2 Inc. http://wso2.com/*
>>> *Mobile:(+94)714408632*
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Amila Suriarachchi*
>>
>> Software Architect
>> WSO2 Inc. ; http://wso2.com
>> lean . enterprise . middleware
>>
>> phone : +94 71 3082805
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Miyuru Wanninayaka
> Technical Lead
> WSO2 Inc. : http://wso2.com
>
> Mobile : +94 77 209 9788
> Blog : http://miyurudw.blogspot.com
> Flickr : http://www.flickr.com/photos/miyuru_daminda




-- 
*Amila Suriarachchi*

Software Architect
WSO2 Inc. ; http://wso2.com
lean . enterprise . middleware

phone : +94 71 3082805
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Amila Suriarachchi
On Thu, Jul 11, 2013 at 7:31 PM, Miyuru Wanninayaka  wrote:

> Hi Amila,
>
> Are you referring to CarbonContext thread local variable?


yes. I think that is how it takes the tenant domain.

thanks,
Amila.

>
>
> On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi wrote:
>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan wrote:
>>
>>> Hi
>>>  Getting following error when executing proxy service ESB 4.8.0 built
>>> 2013-07-11
>>>
>>> [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis service for
>>> Proxy service : SearchTwitter
>>> [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
>>> SearchTwitter to the Axis2 configuration
>>> [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying Axis2
>>> service: SearchTwitter {super-tenant}
>>> [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully created the
>>> Axis2 service for Proxy service : SearchTwitter
>>> [2013-07-11 16:37:29,694]  INFO - LogMediator To:
>>> /services/SearchTwitter, WSAction: urn:getQuote, SOAPAction: urn:getQuote,
>>> MessageID: urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3, Direction:
>>> request*
>>> *[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught exception*
>>> *java.lang.NullPointerException*
>>> * at
>>> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)*
>>> * at
>>> org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
>>> *
>>> at
>>> org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
>>>  at
>>> org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtils.java:272)
>>> at
>>> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getCache(CacheBackedRegistry.java:62)
>>>  at
>>> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.resourceExists(CacheBackedRegistry.java:246)
>>> at
>>> org.wso2.carbon.registry.core.session.UserRegistry.resourceExists(UserRegistry.java:629)
>>>  at
>>> org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:527)
>>> at
>>> org.wso2.carbon.mediation.registry.WSO2Registry.lookup(WSO2Registry.java:131)
>>>  at
>>> org.apache.synapse.registry.AbstractRegistry.getResource(AbstractRegistry.java:63)
>>> at
>>> org.apache.synapse.config.SynapseConfiguration.getSequenceTemplate(SynapseConfiguration.java:395)
>>>  at
>>> org.apache.synapse.core.axis2.Axis2MessageContext.getSequenceTemplate(Axis2MessageContext.java:191)
>>> at
>>> org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:71)
>>>  at
>>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
>>> at
>>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
>>>  at
>>> org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:162)
>>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>>>  at
>>> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
>>> at
>>> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184)
>>>  at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(Nat
>>>
>>
>> seems like tenant domain is null for the threads originating from
>> passthrough transport threads. Can you please check the tenant domain of
>> the pass through transport threads?
>>
>> thanks,
>> Amila.
>>
>>>
>>> --
>>> Dushan Abeyruwan
>>> Associate Tech Lead
>>> *Integration Technologies Team*
>>> *WSO2 Inc. http://wso2.com/*
>>> *Mobile:(+94)714408632*
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Amila Suriarachchi*
>>
>> Software Architect
>> WSO2 Inc. ; http://wso2.com
>> lean . enterprise . middleware
>>
>> phone : +94 71 3082805
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Miyuru Wanninayaka
> Technical Lead
> WSO2 Inc. : http://wso2.com
>
> Mobile : +94 77 209 9788
> Blog : http://miyurudw.blogspot.com
> Flickr : http://www.flickr.com/photos/miyuru_daminda




-- 
*Amila Suriarachchi*

Software Architect
WSO2 Inc. ; http://wso2.com
lean . enterprise . middleware

phone : +94 71 3082805
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Miyuru Wanninayaka
Hi Amila,

Are you referring to CarbonContext thread local variable?

On Thu, Jul 11, 2013 at 6:27 PM, Amila Suriarachchi  wrote:

>
>
>
> On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan  wrote:
>
>> Hi
>>  Getting following error when executing proxy service ESB 4.8.0 built
>> 2013-07-11
>>
>> [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis service for
>> Proxy service : SearchTwitter
>> [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
>> SearchTwitter to the Axis2 configuration
>> [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying Axis2
>> service: SearchTwitter {super-tenant}
>> [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully created the
>> Axis2 service for Proxy service : SearchTwitter
>> [2013-07-11 16:37:29,694]  INFO - LogMediator To:
>> /services/SearchTwitter, WSAction: urn:getQuote, SOAPAction: urn:getQuote,
>> MessageID: urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3, Direction:
>> request*
>> *[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught exception*
>> *java.lang.NullPointerException*
>> * at
>> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)*
>> * at
>> org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
>> *
>> at
>> org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
>>  at
>> org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtils.java:272)
>> at
>> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getCache(CacheBackedRegistry.java:62)
>>  at
>> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.resourceExists(CacheBackedRegistry.java:246)
>> at
>> org.wso2.carbon.registry.core.session.UserRegistry.resourceExists(UserRegistry.java:629)
>>  at
>> org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:527)
>> at
>> org.wso2.carbon.mediation.registry.WSO2Registry.lookup(WSO2Registry.java:131)
>>  at
>> org.apache.synapse.registry.AbstractRegistry.getResource(AbstractRegistry.java:63)
>> at
>> org.apache.synapse.config.SynapseConfiguration.getSequenceTemplate(SynapseConfiguration.java:395)
>>  at
>> org.apache.synapse.core.axis2.Axis2MessageContext.getSequenceTemplate(Axis2MessageContext.java:191)
>> at
>> org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:71)
>>  at
>> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
>> at
>> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
>>  at
>> org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:162)
>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>>  at
>> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
>> at
>> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184)
>>  at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(Nat
>>
>
> seems like tenant domain is null for the threads originating from
> passthrough transport threads. Can you please check the tenant domain of
> the pass through transport threads?
>
> thanks,
> Amila.
>
>>
>> --
>> Dushan Abeyruwan
>> Associate Tech Lead
>> *Integration Technologies Team*
>> *WSO2 Inc. http://wso2.com/*
>> *Mobile:(+94)714408632*
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Amila Suriarachchi*
>
> Software Architect
> WSO2 Inc. ; http://wso2.com
> lean . enterprise . middleware
>
> phone : +94 71 3082805
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Miyuru Wanninayaka
Technical Lead
WSO2 Inc. : http://wso2.com

Mobile : +94 77 209 9788
Blog : http://miyurudw.blogspot.com
Flickr : http://www.flickr.com/photos/miyuru_daminda
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Amila Suriarachchi
On Thu, Jul 11, 2013 at 4:40 PM, Dushan Abeyruwan  wrote:

> Hi
>  Getting following error when executing proxy service ESB 4.8.0 built
> 2013-07-11
>
> [2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis service for
> Proxy service : SearchTwitter
> [2013-07-11 16:37:22,177]  INFO - ProxyService Adding service
> SearchTwitter to the Axis2 configuration
> [2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying Axis2
> service: SearchTwitter {super-tenant}
> [2013-07-11 16:37:22,208]  INFO - ProxyService Successfully created the
> Axis2 service for Proxy service : SearchTwitter
> [2013-07-11 16:37:29,694]  INFO - LogMediator To: /services/SearchTwitter,
> WSAction: urn:getQuote, SOAPAction: urn:getQuote, MessageID:
> urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3, Direction: request*
> *[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught exception*
> *java.lang.NullPointerException*
> * at
> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)*
> * at
> org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
> *
> at
> org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
>  at
> org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtils.java:272)
> at
> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getCache(CacheBackedRegistry.java:62)
>  at
> org.wso2.carbon.registry.core.caching.CacheBackedRegistry.resourceExists(CacheBackedRegistry.java:246)
> at
> org.wso2.carbon.registry.core.session.UserRegistry.resourceExists(UserRegistry.java:629)
>  at
> org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:527)
> at
> org.wso2.carbon.mediation.registry.WSO2Registry.lookup(WSO2Registry.java:131)
>  at
> org.apache.synapse.registry.AbstractRegistry.getResource(AbstractRegistry.java:63)
> at
> org.apache.synapse.config.SynapseConfiguration.getSequenceTemplate(SynapseConfiguration.java:395)
>  at
> org.apache.synapse.core.axis2.Axis2MessageContext.getSequenceTemplate(Axis2MessageContext.java:191)
> at
> org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:71)
>  at
> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
> at
> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
>  at
> org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:162)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
>  at
> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
> at
> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184)
>  at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(Nat
>

seems like tenant domain is null for the threads originating from
passthrough transport threads. Can you please check the tenant domain of
the pass through transport threads?

thanks,
Amila.

>
> --
> Dushan Abeyruwan
> Associate Tech Lead
> *Integration Technologies Team*
> *WSO2 Inc. http://wso2.com/*
> *Mobile:(+94)714408632*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Amila Suriarachchi*

Software Architect
WSO2 Inc. ; http://wso2.com
lean . enterprise . middleware

phone : +94 71 3082805
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] NEP at org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)

2013-07-11 Thread Dushan Abeyruwan
Hi
 Getting following error when executing proxy service ESB 4.8.0 built
2013-07-11

[2013-07-11 16:37:22,177]  INFO - ProxyService Building Axis service for
Proxy service : SearchTwitter
[2013-07-11 16:37:22,177]  INFO - ProxyService Adding service SearchTwitter
to the Axis2 configuration
[2013-07-11 16:37:22,182]  INFO - DeploymentInterceptor Deploying Axis2
service: SearchTwitter {super-tenant}
[2013-07-11 16:37:22,208]  INFO - ProxyService Successfully created the
Axis2 service for Proxy service : SearchTwitter
[2013-07-11 16:37:29,694]  INFO - LogMediator To: /services/SearchTwitter,
WSAction: urn:getQuote, SOAPAction: urn:getQuote, MessageID:
urn:uuid:6421430e-e95c-4aa2-a9ba-f*cd37f7753e3, Direction: request*
*[2013-07-11 16:37:29,695] ERROR - NativeWorkerPool Uncaught exception*
*java.lang.NullPointerException*
* at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)*
* at
org.wso2.carbon.caching.impl.CacheManagerFactoryImpl.getCacheManager(CacheManagerFactoryImpl.java:78)
*
at
org.wso2.carbon.registry.core.utils.RegistryUtils.getCacheManager(RegistryUtils.java:289)
 at
org.wso2.carbon.registry.core.utils.RegistryUtils.getResourceCache(RegistryUtils.java:272)
at
org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getCache(CacheBackedRegistry.java:62)
 at
org.wso2.carbon.registry.core.caching.CacheBackedRegistry.resourceExists(CacheBackedRegistry.java:246)
at
org.wso2.carbon.registry.core.session.UserRegistry.resourceExists(UserRegistry.java:629)
 at
org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:527)
at
org.wso2.carbon.mediation.registry.WSO2Registry.lookup(WSO2Registry.java:131)
 at
org.apache.synapse.registry.AbstractRegistry.getResource(AbstractRegistry.java:63)
at
org.apache.synapse.config.SynapseConfiguration.getSequenceTemplate(SynapseConfiguration.java:395)
 at
org.apache.synapse.core.axis2.Axis2MessageContext.getSequenceTemplate(Axis2MessageContext.java:191)
at
org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:71)
 at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:71)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
 at
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:162)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
 at
org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:404)
at
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184)
 at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(Nat

-- 
Dushan Abeyruwan
Associate Tech Lead
*Integration Technologies Team*
*WSO2 Inc. http://wso2.com/*
*Mobile:(+94)714408632*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev