Re: [Dev] [Architecture] [Vote] Release of WSO2 API Manager 3.2.0 RC4

2020-08-13 Thread Amila De Silva
Hi All,

Tested Artifact Synchroniser in Tenant and Super Tenant modes
- for Basic flows
- With multiple Labels assigned to APIs
- Startup Delay configured
- with No Shared DBs configured (in Super Tenant mode only)
- for failover scenarios
No issues found.

+1 to proceed with the release.

On Thu, Aug 13, 2020 at 7:58 AM Arshardh Ifthikar  wrote:

> Hi All,
>
> We are pleased to announce the fourth release candidate of WSO2 API
> Manager 3.2.0.
>
> This release fixes the following issues.
>
>- Fixes : product-apim
>
> <https://github.com/wso2/product-apim/issues?q=is%3Aissue+is%3Aclosed+closed%3A2020-03-20..2020-08-12>
>- Fixes : analytics-apim
><https://github.com/wso2/analytics-apim/milestone/28?closed=1>
>
> Source and distribution,
> Runtime : https://github.com/wso2/product-apim/releases/tag/v3.2.0-rc4
> Analytics :
> https://github.com/wso2/analytics-apim/releases/tag/v3.2.0-rc3
>
> Documentation : https://apim.docs.wso2.com/en/3.2.0/
> Migration docs :
> https://apim.docs.wso2.com/en/3.2.0/install-and-setup/upgrading-wso2-api-manager/upgrading-process/
>
> Please download, test the product and vote.
>
> [+] Stable - go ahead and release
> [-] Broken - do not release (explain why)
>
> Thanks,
> WSO2 API Manager Team
>
> --
> *Arshardh Ifthikar*
> Senior Software Engineer | WSO2 Inc.
>
> Email: arsha...@wso2.com
> Mobile: +94777218551
> Web: http://wso2.com
>
> <http://wso2.com/signature>
>


-- 
*Amila De Silva*
Software Architect | Associate Director, Engineering - WSO2 Inc.
(m) +94 775119302 | (e) ami...@wso2.com
<http://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] [Vote] Release of WSO2 API Manager 3.2.0 RC2

2020-08-08 Thread Amila De Silva
Tested Artifact Synchroniser for Super Tenant mode
- for Basic flows
- With multiple Labels assigned to APIs
- Startup Delay configured
- for failover scenarios (On a Setup with GWs without DB access and TMs in
Failover mode)
No issues found.

+1 to proceed with the release.

On Sat, Aug 8, 2020 at 12:25 PM Arshardh Ifthikar  wrote:

> Hi all,
>
> We are pleased to announce the second release candidate of WSO2 API
> Manager 3.2.0.
>
> This release fixes the following issues.
>
>- Fixes : product-apim
>
> <https://github.com/wso2/product-apim/issues?q=is%3Aissue+is%3Aclosed+closed%3A2020-03-20..2020-08-06>
>- Fixes : analytics-apim
><https://github.com/wso2/analytics-apim/milestone/28?closed=1>
>
> Source and distribution,
> Runtime : https://github.com/wso2/product-apim/releases/tag/v3.2.0-rc2
> Analytics :
> https://github.com/wso2/analytics-apim/releases/tag/v3.2.0-rc2
>
> Documentation : https://apim.docs.wso2.com/en/3.2.0/
> Migration docs :
> https://apim.docs.wso2.com/en/3.2.0/install-and-setup/upgrading-wso2-api-manager/upgrading-process/
>
> Please download, test the product and vote.
>
> [+] Stable - go ahead and release
> [-] Broken - do not release (explain why)
>
> Thanks,
> WSO2 API Manager Team
>
> --
> *Arshardh Ifthikar*
> Senior Software Engineer | WSO2 Inc.
>
> Email: arsha...@wso2.com
> Mobile: +94777218551
> Web: http://wso2.com
>
> <http://wso2.com/signature>
>


-- 
*Amila De Silva*
Software Architect | Associate Director, Engineering - WSO2 Inc.
(m) +94 775119302 | (e) ami...@wso2.com
<http://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 Committers += Raveen Rathnayake

2020-07-08 Thread Amila De Silva
Hi All,

It's my pleasure to announce Raveen Rathnayake as a WSO2 Committer. He has
been a valuable contributor and enthusiast to the WSO2 API Manager team.

In recognition of his contribution, dedication, and commitment he has been
voted as a WSO2 committer.

Congratulations Raveen and keep up the good work...!!!

Regards,
-- 
*Amila De Silva*
Software Architect | Associate Director, Engineering - WSO2 Inc.
(m) +94 775119302 | (e) ami...@wso2.com
<http://wso2.com/signature>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] [VOTE] Release WSO2 API Manager 2.0.0 RC5

2016-07-28 Thread Amila De Silva
Tested workflows. No issues found.

[+] Stable - go ahead and release

On Thu, Jul 28, 2016 at 2:02 AM, Abimaran Kugathasan <abima...@wso2.com>
wrote:

> *WSO2 API Manager 2.0.0-RC5 Released*
>
> This is the 5th Release Candidate of the WSO2 API Manager 2.0.0
>
> Source & binary distribution files of API Manager 2.0.0-RC5 :
>
>  Runtime : 
> *https://github.com/wso2/product-apim/releases/tag/v2.0.0-rc5
> <https://github.com/wso2/product-apim/releases/tag/v2.0.0-rc5>*
>  Analytics : 
> *https://github.com/wso2/analytics-apim/releases/tag/v2.0.0-rc5
> <https://github.com/wso2/analytics-apim/releases/tag/v2.0.0-rc5>*
>
> Please download, test the product and vote. Vote will be open for 72
> hours or as needed.
> Refer to github readme for guides.
>
> Please vote as follows.
> [+] Stable - go ahead and release
> [-]  Broken - do not release (please explain why)
>
> --
> Thanks
> Abimaran Kugathasan
> Senior Software Engineer - API Technologies
>
> Email : abima...@wso2.com
> Mobile : +94 773922820
>
> <http://stackoverflow.com/users/515034>
> <http://lk.linkedin.com/in/abimaran>
> <http://www.lkabimaran.blogspot.com/>  <https://github.com/abimarank>
> <https://twitter.com/abimaran>
>
>
> _______
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM200] [Cluster] PKIX path building failed :Exception throwing on all nodes of apim cluster

2016-07-27 Thread Amila De Silva
a:57)
> at
> org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever.retrieveKeyTemplateData(KeyTemplateRetriever.java:83)
> at
> org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever.loadKeyTemplatesFromWebService(KeyTemplateRetriever.java:111)
> at
> org.wso2.carbon.apimgt.gateway.throttling.util.KeyTemplateRetriever.run(KeyTemplateRetriever.java:54)
> at java.util.TimerThread.mainLoop(Timer.java:555)
> at java.util.TimerThread.run(Timer.java:505)
> Caused by: sun.security.validator.ValidatorException: PKIX path building
> failed: sun.security.provider.certpath.SunCertPathBuilderException: unable
> to find valid certification path to requested target
> at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
> at
> sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
> at sun.security.validator.Validator.validate(Validator.java:260)
> at
> sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
> at
> sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
> at
> sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
> at
> sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
> ... 23 more
> Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
> unable to find valid certification path to requested target
> at
> sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
> at
> sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
> at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
> at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
> ... 29 more
>
>
>
> [2] https://docs.wso2.com/display/CLUSTER44x/Clustering+API+Manager+1.10.0
>
>
>
>
>
>
> --
> Kavitha.S
> *Software Engineer -QA*
> Mobile : +94 (0) 771538811 <%2B94%20%280%29%20773%20451194>
> kavi...@wso2.com <thili...@wso2.com>
>



-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 API Manager 2.0.0 RC3

2016-07-21 Thread Amila De Silva
Tested integrating a Third Party Key Manager, for both Super Tenant and
Tenant modes. Tests were carried out by calling the Jaggery APIs. No issues
were found.

[+] Go ahead and release.

On Thu, Jul 21, 2016 at 12:21 AM, Abimaran Kugathasan <abima...@wso2.com>
wrote:

>
> *WSO2 API Manager 2.0.0-RC3 Released*
>
> This is the 3rd Release Candidate of the WSO2 API Manager 2.0.0
>
> Source & binary distribution files of API Manager 2.0.0-RC3 :
>
>  Runtime :
> https://github.com/wso2/product-apim/releases/tag/v2.0.0-rc3
>  Analytics :
> https://github.com/wso2/analytics-apim/releases/tag/v2.0.0-rc3
>
> Please download, test the product and vote. Vote will be open for 72
> hours or as needed.
> Refer to github readme for guides.
>
> Please vote as follows.
> [+] Stable - go ahead and release
> [-]  Broken - do not release (please explain why)
>
> --
> Thanks
> Abimaran Kugathasan
> Senior Software Engineer
>
> Email : abima...@wso2.com
> Mobile : +94 773922820
>
> <http://stackoverflow.com/users/515034>
> <http://lk.linkedin.com/in/abimaran>
> <http://www.lkabimaran.blogspot.com/>  <https://github.com/abimarank>
> <https://twitter.com/abimaran>
>
>
> _______
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Architecture] [VOTE] Release WSO2 API Manager 2.0.0 RC1

2016-07-18 Thread Amila De Silva
Hi Malith,

For 1.10.0 the reported results have been obtained on an older setup. Will
obtain those on the new setup and report the values.

On Mon, Jul 18, 2016 at 2:44 PM, Malith Jayasinghe <mali...@wso2.com> wrote:

> Hi Abimaran,
>
> I am looking at the performance report of RC1 pack that you have attached.
>
> I notice that for scenario 3 there is a degradation performance (TPS and
> latency) in 2.0.0 RC1 compared to 1.10.0?
> Do we know why this is happening?
>
> Also did we notice this behaviour in 2.0.0 beta 2 pack?.
>
> I  notice that you have done detailed analysis of the performance (i.e.
> latency percentiles etc) for scenario 1 and scenario 2 but no such analysis
> for scenario 3?
>
> Thanks
>
> Malith
>
> On Mon, Jul 18, 2016 at 12:06 PM, Nuwan Dias <nuw...@wso2.com> wrote:
>
>> We have encountered two issues [1] and [2] which need to be fixed. We
>> will cancel this vote and call for a RC2.
>>
>> [1] - https://wso2.org/jira/browse/APIMANAGER-5271
>> [2] - https://wso2.org/jira/browse/APIMANAGER-5270
>>
>> Thanks,
>> NuwanD.
>>
>> On Sat, Jul 16, 2016 at 11:24 PM, Tharindu Dharmarathna <
>> tharin...@wso2.com> wrote:
>>
>>> *Tested Scenarios*
>>>
>>> Throttling - 4 levels in tenant and super tenant.
>>>
>>> Black listing
>>>
>>> +1
>>>
>>> Go ahead and release.
>>>
>>> Thanks
>>>
>>> On Sat, Jul 16, 2016 at 11:11 AM, Abimaran Kugathasan <abima...@wso2.com
>>> > wrote:
>>>
>>>> Hi All,
>>>>
>>>> Please find the Reformance Report for above RC pack.
>>>>
>>>> On Sat, Jul 16, 2016 at 5:25 AM, Abimaran Kugathasan <abima...@wso2.com
>>>> > wrote:
>>>>
>>>>> Hi Devs,
>>>>>
>>>>> *WSO2 API Manager 2.0.0-RC1 Released*
>>>>>
>>>>> This is the 1st Release Candidate of the WSO2 API Manager 2.0.0
>>>>>
>>>>> Please download, test the product and vote. Vote will be open for 72
>>>>> hours or as needed.
>>>>> Refer to github readme for guides.
>>>>>
>>>>> The distribution is available to download at [1]
>>>>>
>>>>> [1] : https://github.com/wso2/product-apim/releases/tag/v2.0.0-rc1
>>>>>
>>>>> *WSO2 **API Manager Analytics 2.0.0 RC1** Released*
>>>>>
>>>>> Please download, test the product and vote. Vote will be open for 72
>>>>> hours or as needed.
>>>>> Refer to github readme for guides.
>>>>>
>>>>> The distribution is available to download  [2]
>>>>>
>>>>> Fixed Issue in [3], known issues [4]
>>>>>
>>>>> [2] :
>>>>> https://github.com/wso2/analytics-apim/releases/download/v2.0.0-rc1/wso2am-analytics-2.0.0.zip
>>>>> [3] : https://wso2.org/jira/issues/?filter=13138
>>>>> [4] : https://wso2.org/jira/issues/?filter=13139
>>>>> <https://www.google.com/url?q=https%3A%2F%2Fwso2.org%2Fjira%2Fissues%2F%3Ffilter%3D13139=D=1=AFQjCNFtMhxKzEHrn2xHK4fm8d7VBx9VvQ>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks
>>>>> Abimaran Kugathasan
>>>>> Senior Software Engineer
>>>>>
>>>>> Email : abima...@wso2.com
>>>>> Mobile : +94 773922820
>>>>>
>>>>> <http://stackoverflow.com/users/515034>
>>>>> <http://lk.linkedin.com/in/abimaran>
>>>>> <http://www.lkabimaran.blogspot.com/>  <https://github.com/abimarank>
>>>>> <https://twitter.com/abimaran>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Thanks
>>>> Abimaran Kugathasan
>>>> Senior Software Engineer
>>>>
>>>> Email : abima...@wso2.com
>>>> Mobile : +94 773922820
>>>>
>>>> <http://stackoverflow.com/users/515034>
>>>> <http://lk.linkedin.com/in/abimaran>
>>>> <http://www.lkabimaran.blogspot.com/>  <https://github.com/abimarank>
>>>> <https://twitter.com/abimaran>
>>>>
>>>>
>>>> ___
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> *Tharindu Dharmarathna*Software Engineer
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: *+94779109091 <%2B94779109091>*
>>>
>>> ___
>>> Architecture mailing list
>>> architect...@wso2.org
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>> Nuwan Dias
>>
>> Technical Lead - WSO2, Inc. http://wso2.com
>> email : nuw...@wso2.com
>> Phone : +94 777 775 729
>>
>> ___
>> Architecture mailing list
>> architect...@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> Malith Jayasinghe
>
>
> WSO2, Inc. (http://wso2.com)
> Email   : mali...@wso2.com
> Mobile : 0770704040
> Lean . Enterprise . Middleware
>
> ___
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Issue while using Conditional Group

2016-06-20 Thread Amila De Silva
Implemented this with the following PRs
1. https://github.com/wso2/carbon-apimgt/pull/2551
2. https://github.com/wso2/carbon-apimgt/pull/2532


On Fri, Jun 17, 2016 at 6:20 AM, Amila De Silva <ami...@wso2.com> wrote:

> Hi Uvindra, Harsha,
>
> I don't think it's possible to get CEP do this. If we'd been calling CEP
> and waiting on its decision to let the request through, it would have been
> possible. Then for each request, CEP would evaluate the query and tell
> which conditions are applicable for that incoming request, and if the
> throttling quota defined by that policy has exceeded.
>
> With the current approach, what CEP does is, determining which counters
> should be incremented based on the published message and sending a message
> when any of the conditions have been throttled out. Gateway only have a
> bunch of throttled out keys, so it should have  a means of finding which
> keys are to be checked with each request.
>
> Rather than evaluating all the conditions for each request, we can
> optimise it (like first checking if any throttled out records are present
> for that API and then only evaluate the conditions), but the check needed
> to be done at the GW seems to be inevitable.
>
> On Thu, Jun 16, 2016 at 10:46 PM, Harsha Kumara <hars...@wso2.com> wrote:
>
>> Hi Amila,
>>
>> Are we going to evaluate the condition from the GW side? We will need to
>> check the possibility of doing this in CEP.  Otherwise it will performance
>> may degrade drastically. Again I'm doubt whether we can do it from the CEP
>> side as we publish set of data and take decisions based on the data coming
>> on the stream. It's independent of the request. Unless we have specific key
>> combination or identification pattern we won't be able to do it in the CEP
>> side as well.
>>
>> We will need to have a way to identify which condition group triggered
>> based on the data coming. Asynchronous behavior of data processing make it
>> harder to identify it from the CEP and transfer it to the gateway.
>>
>> Thanks,
>> Harsha
>>
>> On Sun, Jun 12, 2016 at 9:13 PM, Uvindra Dias Jayasinha <uvin...@wso2.com
>> > wrote:
>>
>>> Hi Amila,
>>>
>>> I think it defeats the purpose if we need to evaluate conditions again
>>> on the GW side(GW starts to do part of the decision manager role), is it
>>> possible to fix this by asking CEP to provide the aggregate result of all
>>> the available conditions?
>>>
>>>
>>>
>>> On 11 June 2016 at 12:12, Amila De Silva <ami...@wso2.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> This is related to the discussion had with Harsha on a particular
>>>> behaviour observed when having Conditional Groups.
>>>>
>>>> Suppose we have a throttling policy like below;
>>>>
>>>> *default* - 1000 req/min
>>>>
>>>> *Condition* - 50 req/min if IP is 10.100.0.5
>>>>
>>>>
>>>> The expected behaviour is, if requests are coming from 10.100.0.5, only
>>>> to allow 50 req/min, but if coming from a different destination, allow 
>>>> 1000.
>>>>
>>>> But we observed that, when requests coming from 10.100.0.5 have been
>>>> throttled out after utilising it’s full quota (50 req/min) , GW won’t
>>>> accept any requests even from a different destination.
>>>>
>>>>
>>>> While investigating the issue found that it was due to the way we
>>>> enforce throttling at the GW.
>>>>
>>>> If we consider creating the above condition, then;
>>>>
>>>> 1. Two Condition elements gets created (one for the default and the
>>>> other for the actual condition) and get saved in the DB.
>>>>
>>>> 2. Two execution plans are created to handle the conditions and are
>>>> deployed in the CEP.
>>>>
>>>>
>>>> As APIs are invoked
>>>>
>>>> 1. CEP runs the queries and correctly evaluates which condition has
>>>> been fulfilled .Say that we are invoking with the specified IP, then CEP
>>>> will keep incrementing the counter related to IP based condition.
>>>>
>>>> 2. Once the limit has reached, CEP publishes the condition which has
>>>> been throttled out.
>>>>
>>>> 3. When GW start to enforce throttling, it simply gets all the
>>>> throttling conditions attached with the resource. So now the resource has
>>>> two conditions attac

Re: [Dev] [APIM] Issue while using Conditional Group

2016-06-16 Thread Amila De Silva
Hi Uvindra, Harsha,

I don't think it's possible to get CEP do this. If we'd been calling CEP
and waiting on its decision to let the request through, it would have been
possible. Then for each request, CEP would evaluate the query and tell
which conditions are applicable for that incoming request, and if the
throttling quota defined by that policy has exceeded.

With the current approach, what CEP does is, determining which counters
should be incremented based on the published message and sending a message
when any of the conditions have been throttled out. Gateway only have a
bunch of throttled out keys, so it should have  a means of finding which
keys are to be checked with each request.

Rather than evaluating all the conditions for each request, we can optimise
it (like first checking if any throttled out records are present for that
API and then only evaluate the conditions), but the check needed to be done
at the GW seems to be inevitable.

On Thu, Jun 16, 2016 at 10:46 PM, Harsha Kumara <hars...@wso2.com> wrote:

> Hi Amila,
>
> Are we going to evaluate the condition from the GW side? We will need to
> check the possibility of doing this in CEP.  Otherwise it will performance
> may degrade drastically. Again I'm doubt whether we can do it from the CEP
> side as we publish set of data and take decisions based on the data coming
> on the stream. It's independent of the request. Unless we have specific key
> combination or identification pattern we won't be able to do it in the CEP
> side as well.
>
> We will need to have a way to identify which condition group triggered
> based on the data coming. Asynchronous behavior of data processing make it
> harder to identify it from the CEP and transfer it to the gateway.
>
> Thanks,
> Harsha
>
> On Sun, Jun 12, 2016 at 9:13 PM, Uvindra Dias Jayasinha <uvin...@wso2.com>
> wrote:
>
>> Hi Amila,
>>
>> I think it defeats the purpose if we need to evaluate conditions again on
>> the GW side(GW starts to do part of the decision manager role), is it
>> possible to fix this by asking CEP to provide the aggregate result of all
>> the available conditions?
>>
>>
>>
>> On 11 June 2016 at 12:12, Amila De Silva <ami...@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> This is related to the discussion had with Harsha on a particular
>>> behaviour observed when having Conditional Groups.
>>>
>>> Suppose we have a throttling policy like below;
>>>
>>> *default* - 1000 req/min
>>>
>>> *Condition* - 50 req/min if IP is 10.100.0.5
>>>
>>>
>>> The expected behaviour is, if requests are coming from 10.100.0.5, only
>>> to allow 50 req/min, but if coming from a different destination, allow 1000.
>>>
>>> But we observed that, when requests coming from 10.100.0.5 have been
>>> throttled out after utilising it’s full quota (50 req/min) , GW won’t
>>> accept any requests even from a different destination.
>>>
>>>
>>> While investigating the issue found that it was due to the way we
>>> enforce throttling at the GW.
>>>
>>> If we consider creating the above condition, then;
>>>
>>> 1. Two Condition elements gets created (one for the default and the
>>> other for the actual condition) and get saved in the DB.
>>>
>>> 2. Two execution plans are created to handle the conditions and are
>>> deployed in the CEP.
>>>
>>>
>>> As APIs are invoked
>>>
>>> 1. CEP runs the queries and correctly evaluates which condition has been
>>> fulfilled .Say that we are invoking with the specified IP, then CEP will
>>> keep incrementing the counter related to IP based condition.
>>>
>>> 2. Once the limit has reached, CEP publishes the condition which has
>>> been throttled out.
>>>
>>> 3. When GW start to enforce throttling, it simply gets all the
>>> throttling conditions attached with the resource. So now the resource has
>>> two conditions attached - the default one and the ip based one.
>>>
>>> 4. GW doesn’t determine which condition should be checked (If a request
>>> is made from a different destination GW should look at the default
>>> condition, but with the current implementation it doesn’t) . It simply
>>> checks if any of the conditions attached with the resource have been
>>> throttled out.
>>>
>>>
>>> Due to this, if one of the conditions engaged with the request gets
>>> throttled out, no additional request can make through the GW, until time
>>> duration elapses.
>>&

[Dev] [APIM] Issue while using Conditional Group

2016-06-11 Thread Amila De Silva
Hi All,

This is related to the discussion had with Harsha on a particular behaviour
observed when having Conditional Groups.

Suppose we have a throttling policy like below;

*default* - 1000 req/min

*Condition* - 50 req/min if IP is 10.100.0.5


The expected behaviour is, if requests are coming from 10.100.0.5, only to
allow 50 req/min, but if coming from a different destination, allow 1000.

But we observed that, when requests coming from 10.100.0.5 have been
throttled out after utilising it’s full quota (50 req/min) , GW won’t
accept any requests even from a different destination.


While investigating the issue found that it was due to the way we enforce
throttling at the GW.

If we consider creating the above condition, then;

1. Two Condition elements gets created (one for the default and the other
for the actual condition) and get saved in the DB.

2. Two execution plans are created to handle the conditions and are
deployed in the CEP.


As APIs are invoked

1. CEP runs the queries and correctly evaluates which condition has been
fulfilled .Say that we are invoking with the specified IP, then CEP will
keep incrementing the counter related to IP based condition.

2. Once the limit has reached, CEP publishes the condition which has been
throttled out.

3. When GW start to enforce throttling, it simply gets all the throttling
conditions attached with the resource. So now the resource has two
conditions attached - the default one and the ip based one.

4. GW doesn’t determine which condition should be checked (If a request is
made from a different destination GW should look at the default condition,
but with the current implementation it doesn’t) . It simply checks if any
of the conditions attached with the resource have been throttled out.


Due to this, if one of the conditions engaged with the request gets
throttled out, no additional request can make through the GW, until time
duration elapses.


This is a bug and we have to fix this, but we also have to be aware of the
downsides of fixing this;

If we are to correctly fix this,

1. First at the GW, we have to determine which condition is applicable for
the incoming request.

2. To do this, some additional data has to be sent from KM side. Currently
only condition name is sent, but we'll need the entire definition of the
condition.

3. Since the current Admin Dashboard also allows, specifying JWT claims as
conditions, while checking certain conditions we’d have to go to the extent
of decoding the JWT and iterate through claims.

Due to these checks, when conditional groups are used, users would have to
expect a performance drop.

-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Modifications to the DCR endpoint

2016-06-09 Thread Amila De Silva
Hi,

IMO DCR implementation should not depend on/use AMDefaultKeyManagerImpl
because;
1. DCR offers a more basic functionality than AMDefaultKeyManagerImpl and
it should be KeyManager using DCR not the other way around.
2. Using methods in apimgt bundles will create a dependancy on those
components, so before using DCR, users would have to install apimgt
features.

So good if we can remove the call to retrieveApplication method.

On Thu, Jun 9, 2016 at 10:16 AM, Kaveesha Perera <kavee...@wso2.com> wrote:

> Hi,
>
> I worked on a issue in APIM of DCR that was described in [1].While working
> on it, observed that it has used APIM key manager interface based
> implementations for DCR related operations.After discussed with the team,I
> have  modified the DCR endpoint implementation to calll directly the
> identity components based implementation,  than accessing it via KeyManager
> implementation.
>
> The related PR can be found from here[2].
>
> If any feedback, let me know.
>
> [1] [Architecture] Behavior of OAuth 2.0 Dynamic Client Registration
> [2] https://github.com/wso2/carbon-apimgt/pull/2495
>
>
> Regards,
> --
> Kaveesha Perera
> Intern - Software Engineering
>
> mobile: 0716130471
>



-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Fwd: WSO2 API Manager 2.0.0 BETA Released!

2016-06-08 Thread Amila De Silva
*WSO2 API Manager 2.0.0 BETA Released!*


We are pleased to announce the BETA release of WSO2 API Manager 2.0.0.

WSO2 API Manager is a complete solution for designing and publishing APIs,
securing and routing API traffic in a scalable way, whilst nurturing a
developer community around the API ecosystem.

This release comes with both the runtime and analytics, providing
out-of-the-box support for API usage and performance analysis. You can
download these distributions below.

Runtime  - wso2am-2.0.0-BETA.zip

Analytics - wso2analytics-apim-1.0.0-beta.zip




*Improvements and Bug Fixes*

Improvements

   -

   [APIMANAGER-3816 ] - Admin
   Dashboard URL to be included in the list of services available on the
   carbon message console
   -

   [APIMANAGER-4475 ] - API
   authentication error response should bear the message type provided the
   Accept header of the request
   -

   [APIMANAGER-4595 ] -
   Message type of "invalid token" error message should change based on the
   Content-Type Header
   -

   [APIMANAGER-4600 ] -
   Provide a configuration to allow for disabling the Forum in the API Store UI
   -

   [APIMANAGER-4719 ] - Error
   message doesn't convey it's purpose in API Versioning
   -

   [APIMANAGER-4737 ] -
   Remove the ( ) brackets when a description is not given for an
   applicationlevel tier
   -

   [APIMANAGER-4740 ] -
   Remove Exception thrown when subscribing to blocked subscription
   -

   [APIMANAGER-4852 ] -
   system should allow to delete alerts that are shown on admin dashboard
   -

   [APIMANAGER-4893 ] -
   Revisit the UI of "Add Subscription Tier"
   -

   [ANLYAPIM-20 ] - New theme
   needed for API Analytics
   -

   [ANLYAPIM-20 ] - New theme
   needed for API Analytics

Bug Fixes

   -

   [APIMANAGER-2522 ] - Wrong
   rights for the Implement Stage for creator role
   -

   [APIMANAGER-2688 ] - Forum
   topic search issue
   -

   [APIMANAGER-2703 ] - Blank
   drop down menu and wrong caption in the absence of tier permission for the
   logged in user
   -

   [APIMANAGER-2922 ] - JWT
   TokenGeneration Certificate Header Parameter x5t encoding.
   -

   [APIMANAGER-4117 ] - exp
   claim in JWT does not comply with rfc7519
   -

   [APIMANAGER-4242 ] - API
   Custom Mediation Sequences Doesn't Foward the Call To Taget Endpoint When a
   Call Mediator is Used
   -

   [APIMANAGER-4325 ] -
   Carbon console shows inconsistent error log for subsequent invocations when
   access token is expired.
   -

   [APIMANAGER-4468 ] - ERROR
   - NativeWorkerPool Uncaught exception
   -

   [APIMANAGER-4534 ] -
   APIConsole is not showing response content type,even we set a value for
   'produces' attribute in APIPublisher
   -

   [APIMANAGER-4554 ] -
   grant_type=refresh_token fails on 1.10 with message Error decoding
   authorization header. Space delimited " " format
   violated.
   -

   [APIMANAGER-4583 ] -
   AddComment in Store is not working with MySQL
   -

   [APIMANAGER-4584 ] -
   Environment dropdown of API Console does not appear in IE11
   -

   [APIMANAGER-4590 ] -
   Invalid Access Token, if RemoveOAuthHeader is false
   -

   [APIMANAGER-4621 ] - API
   resource name contains "*" character and not validate that in the design
   phase (UI level)
   -

   [APIMANAGER-4625 ] - Links
   to documents and in Readme should be 2.0.0 (Latest documents)
   -

   [APIMANAGER-4630 ] -
   Rename Tier Availability in API Wizard manage page to Subscription Tiers
   -

   [APIMANAGER-4640 ] - Forum
   does not show all the 

Re: [Dev] Requesting the parameters for throttling policy configurations in api-manager.xml

2016-06-03 Thread Amila De Silva
Hi Ushani,

For the new throttling to work you first have to
set EnableAdvanceThrottling to true. When EnableHeaderConditions is set to
true, all the headers in the incoming message will be published to the CEP.
Similarly Setting EnableJWTClaimConditions and EnableQueryParamConditions
to true would publish JWT claims and the query parameters coming with the
request to the CEP. In the latest pack, spike arrest is only enabled
through the UI, so there's no config element for that.

On Fri, Jun 3, 2016 at 6:35 PM, Ushani Balasooriya <ush...@wso2.com> wrote:

> Hi APIM Team,
>
> It would be highly appreciated, if you can let us know the parameters that
> need to be enabled in api-manager.xml when working with throttling since
> the documents are not ready yet.
>
> E.g., Spike arrest policy parameter, Query param parameter.
>
>
> Thanks and regards,
> --
> *Ushani Balasooriya*
> Senior Software Engineer - QA;
> WSO2 Inc; http://www.wso2.com/.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "WSO2 Documentation Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to documentation+unsubscr...@wso2.com.
> For more options, visit https://groups.google.com/a/wso2.com/d/optout.
>



-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Is there a feature that bundles common-scxml?

2016-05-29 Thread Amila De Silva
Hi,

Need to know if there's a feature that bundles common-scxml.
In all the instances where this bundle has been used, it had been included
as a bundleDef in a product specific feature. But if there's a feature for
this bundle, we could have directly imported the feature rather than
including the bundle in non-related features.

-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [APIM] Loading different configurations with different profiles

2016-05-23 Thread Amila De Silva
Hi All,

Need to know if $subject is possible with kernel 4.4.6.

For API Manager 2.0.0 we are creating a new profile which will only have
CEP and MB features. This profile doesn't need to have all the transports
(PT) message builders/formatters and axis2 handlers needed by the standard
APIM components. But if we are going to use the same axis2.xml (which is
shipped with the product by default) with the new profile, we'd have to add
unnecessary features with the new profile, just to start up the server
without any problems. If it's possible to load a config file specific to a
profile, then we can make the profile more lean.

-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [AF] Fixing (APPFAC-3217) - Support APIM group subscription in App Factory

2016-01-13 Thread Amila De Silva
You have to set an empty value for the claim.

On Thu, Jan 14, 2016 at 12:09 PM, Amalka Subasinghe <ama...@wso2.com> wrote:

> Hi Amila
>
> I don't understand how appowner sees all the Apps which belongs to
> different groups on same APIM screen.
> I tested this in APIM setup, but when a one user has 2 groupIds, he/she
> could see the Default application only.
>
>
> On Thu, Jan 14, 2016 at 10:28 AM, Amila De Silva <ami...@wso2.com> wrote:
>
>> Hi Amalka,
>>
>> Apparently when the AppOwner logs in without a groupId, he/she sees all
>> the Apps (even the one's created with different groupIds) in the same
>> screen.
>> So the problem would only be there for AppDevelopers.
>>
>> Answering to your query; it depends on how you get the group Id. If we
>> assume that SSO is enabled at Store, when trying to login directly to
>> Store, users (only talking about App Owners here) will be re-directed to an
>> IDP, and whatever the groupId set from IDP will be used for fetching Apps.
>> If the IDP doesn't set a groupId, all the apps will be shown.
>>
>> On Thu, Jan 14, 2016 at 8:35 AM, Amalka Subasinghe <ama...@wso2.com>
>> wrote:
>>
>>>
>>> With this Amila's explanation; when a appowner login to the APIM via two
>>> different apps of AF, will see two different views in APIM.
>>> If the same appowner login to the APIM directly, what will he see in
>>> APIM?
>>>
>>> I believe when a user login to the APIM; (either via AF or directly), he
>>> should see the same view every time. (if that user belongs to two different
>>> groups he should see all subscriptions belongs to all groups).
>>>
>>>
>>> On Wed, Jan 13, 2016 at 11:05 PM, Amila De Silva <ami...@wso2.com>
>>> wrote:
>>>
>>>> Hi Danushka/Amalka,
>>>>
>>>> It's not that the scenario of user belonging to two or more groups is
>>>> not supported in the current version. It's only that the way it currently
>>>> happens slightly differs from how you need it.
>>>>
>>>> What we are basically trying to achieve is, displaying Apps,
>>>> subscriptions when user belongs to two or more groups. A single user can
>>>> have many group Ids, but in a single session user can only have one group
>>>> Id.
>>>> AFAIU, with the existing implementation following can be achieved;
>>>> 1. AppOwner creates 2 Apps in AppF , App1 (with groupId as
>>>> appowner1_app1)  and App2 (groupId being appowner1_app2).
>>>> 2. I assume Apps in APIM gets automatically created while doing 1.
>>>> 3. AppOwner selects App1 in AppF and tries to see the relevant App in
>>>> APIM.
>>>> 4. AppOwner is re-directed to API Store with groupId set as
>>>> appowner1_app1 (need to discuss how/where this is set)
>>>> 5. AppOwner is logged into the Store as a user with groupId
>>>> appowner1_app1, therefore only sees App1.
>>>> 6. AppOwner logs out from Store.
>>>> 7. AppOwner goes to AppF and selects App2, follows a link that
>>>> re-directs to APIMStore.
>>>> 8. AppOwner now goes to Store as a user in appowner1_app2 group, so
>>>> only sees App2.
>>>>
>>>> To view each App, user would need to make a trip back to the AppF. It
>>>> might be possible eliminate step 6, and if it's so, we might have to change
>>>> subscription.jag (and several other jags) to clear out the groupId set in
>>>> the session, and set the one coming with the request. There are few points
>>>> that needs to be discussed more with the above steps, but this would be the
>>>> way it would look like.
>>>>
>>>> It's true that the default group Id extractor gets the group Id from
>>>> http://wso2.org/claims/organization claim, but it doesn't have to be
>>>> like that in every case. In the very first time it was written thinking
>>>> that Group ID is coming with the SAML Response sent back from IDp.
>>>>
>>>> On Wed, Jan 13, 2016 at 6:37 PM, Danushka Fernando <danush...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi Nuwan
>>>>> The issue of adding extension to cloud is we have to add it to API
>>>>> cloud and it will affect all API cloud users who don't use APP cloud also.
>>>>> And since multiple groups per user seems to be a valid use case how
>>>>> complex will this be to implement?
>>>>>
>>>>> Thanks 

Re: [Dev] [AF] Fixing (APPFAC-3217) - Support APIM group subscription in App Factory

2016-01-13 Thread Amila De Silva
Hi Amalka,

Apparently when the AppOwner logs in without a groupId, he/she sees all the
Apps (even the one's created with different groupIds) in the same screen.
So the problem would only be there for AppDevelopers.

Answering to your query; it depends on how you get the group Id. If we
assume that SSO is enabled at Store, when trying to login directly to
Store, users (only talking about App Owners here) will be re-directed to an
IDP, and whatever the groupId set from IDP will be used for fetching Apps.
If the IDP doesn't set a groupId, all the apps will be shown.

On Thu, Jan 14, 2016 at 8:35 AM, Amalka Subasinghe <ama...@wso2.com> wrote:

>
> With this Amila's explanation; when a appowner login to the APIM via two
> different apps of AF, will see two different views in APIM.
> If the same appowner login to the APIM directly, what will he see in APIM?
>
> I believe when a user login to the APIM; (either via AF or directly), he
> should see the same view every time. (if that user belongs to two different
> groups he should see all subscriptions belongs to all groups).
>
>
> On Wed, Jan 13, 2016 at 11:05 PM, Amila De Silva <ami...@wso2.com> wrote:
>
>> Hi Danushka/Amalka,
>>
>> It's not that the scenario of user belonging to two or more groups is not
>> supported in the current version. It's only that the way it currently
>> happens slightly differs from how you need it.
>>
>> What we are basically trying to achieve is, displaying Apps,
>> subscriptions when user belongs to two or more groups. A single user can
>> have many group Ids, but in a single session user can only have one group
>> Id.
>> AFAIU, with the existing implementation following can be achieved;
>> 1. AppOwner creates 2 Apps in AppF , App1 (with groupId as
>> appowner1_app1)  and App2 (groupId being appowner1_app2).
>> 2. I assume Apps in APIM gets automatically created while doing 1.
>> 3. AppOwner selects App1 in AppF and tries to see the relevant App in
>> APIM.
>> 4. AppOwner is re-directed to API Store with groupId set as
>> appowner1_app1 (need to discuss how/where this is set)
>> 5. AppOwner is logged into the Store as a user with groupId
>> appowner1_app1, therefore only sees App1.
>> 6. AppOwner logs out from Store.
>> 7. AppOwner goes to AppF and selects App2, follows a link that re-directs
>> to APIMStore.
>> 8. AppOwner now goes to Store as a user in appowner1_app2 group, so only
>> sees App2.
>>
>> To view each App, user would need to make a trip back to the AppF. It
>> might be possible eliminate step 6, and if it's so, we might have to change
>> subscription.jag (and several other jags) to clear out the groupId set in
>> the session, and set the one coming with the request. There are few points
>> that needs to be discussed more with the above steps, but this would be the
>> way it would look like.
>>
>> It's true that the default group Id extractor gets the group Id from
>> http://wso2.org/claims/organization claim, but it doesn't have to be
>> like that in every case. In the very first time it was written thinking
>> that Group ID is coming with the SAML Response sent back from IDp.
>>
>> On Wed, Jan 13, 2016 at 6:37 PM, Danushka Fernando <danush...@wso2.com>
>> wrote:
>>
>>> Hi Nuwan
>>> The issue of adding extension to cloud is we have to add it to API cloud
>>> and it will affect all API cloud users who don't use APP cloud also.
>>> And since multiple groups per user seems to be a valid use case how
>>> complex will this be to implement?
>>>
>>> Thanks & Regards
>>> Danushka Fernando
>>> Senior Software Engineer
>>> WSO2 inc. http://wso2.com/
>>> Mobile : +94716332729
>>>
>>>
>>> On Jan 13, 2016 3:53 PM, "Lakshman Udayakantha" <lakshm...@wso2.com>
>>> wrote:
>>>
>>>> Hi Nuwan,
>>>>
>>>> Even though we have extracted multiple group ids using group id
>>>> extractor, DAO classes use one group id to extract the applications and
>>>> subscriptions. I think we have to implement to get all the applications and
>>>> subscriptions if user are in several groups.
>>>>
>>>> Thanks
>>>>
>>>> On Wed, Jan 13, 2016 at 2:18 PM, Nuwan Dias <nuw...@wso2.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Wed, Jan 13, 2016 at 12:32 PM, Amalka Subasinghe <ama...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Nuwan,
>>>>>>
>>>>>> We need

Re: [Dev] [AF] Fixing (APPFAC-3217) - Support APIM group subscription in App Factory

2016-01-13 Thread Amila De Silva
organization claim.
>>>> But this is a required use case for the AF/cloud, and we can't
>>>> customize the GroupingExtractor due to maintainability issues in cloud.
>>>>
>>>> Can this improvement provide by APIM?
>>>>
>>>
>>> It can be done. But we've already done product plans for releases
>>> covering the year. It might take time to get this into the product as a GA
>>> release. I guess the timely solution is to customize the GroupingExtractor.
>>>
>>> What maintainability concerns do you have? If a standard extension point
>>> in the product is a maintainability concern it makes no sense to have those
>>> extension points at all. So I would like to understand those concerns and
>>> improve if possible.
>>>
>>>>
>>>> Thanks
>>>> Amalka
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Jan 12, 2016 at 1:42 PM, Amalka Subasinghe <ama...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Currently only the app owner allows to subscribed to an API, generate
>>>>> keys and see subscribed APIs, where other users are not allowed as showed
>>>>> in the below table.
>>>>>
>>>>>
>>>>> Subscribe to API Generate Keys View subscribed APIs in AF side View
>>>>> Prod keys in AF side View Sandbox keys in AF side App owner Y Y Y Y Y
>>>>> Developer
>>>>>
>>>>>
>>>>>
>>>>> Y QA
>>>>>
>>>>>
>>>>>
>>>>> Y DevOps
>>>>>
>>>>>
>>>>> Y Y
>>>>> We want to improve the AF - APIM integration as follows. So we need
>>>>> implement $subject.
>>>>> 1. making both app owner and developer can subscribe to an API and
>>>>> generate keys
>>>>> 2. making all users to see subscribed API per application
>>>>>
>>>>>
>>>>> Subscribe to API Generate Keys View subscribed APIs in AF side View
>>>>> Prod keys in AF side View Sandbox keys in AF side App owner Y Y Y Y Y
>>>>> Developer Y Y Y
>>>>> Y QA
>>>>>
>>>>> Y
>>>>> Y DevOps
>>>>>
>>>>> Y Y Y
>>>>> *Things to do:*
>>>>>
>>>>> 1. All the users of a particular app we need to maintain as a group.
>>>>>
>>>>> In APIM side they uses http://wso2.org/claims/organization claim to
>>>>> group the users. We have to set this claim (eg: app key as the value of 
>>>>> the
>>>>> claim) when appowner or developer try to click on 'Go to API Manager'
>>>>> button.
>>>>> Currently we use a role app_appName to group the users of a particular
>>>>> application in AF. If we use this we have to implement a custom grouping
>>>>> extractor to get the users of a particular group.
>>>>>
>>>>>
>>>>> *Issues: *a. Since we don't set the claim for QA and DevOps users,
>>>>> they can't view subscribed APIs in AF side, and If we add the claim they
>>>>> also will be able to subscribe to APIs and generate keys. So we need to
>>>>> find a way to view subscribed api for a particular application by QA and
>>>>> Devops users.
>>>>> b. With this implementation Developer can see prod keys also.
>>>>>
>>>>>
>>>>> 2. Make Go to API Manager and Sync Keys buttons enabled only to
>>>>> appowner and developer.
>>>>> For this we can use resource permissions we already have.
>>>>>
>>>>>
>>>>> 3. Need to improve/test all the rest calls we do with APIM to work
>>>>> with groups and fix if there's any issue.
>>>>>
>>>>>- Login - When user clicks on 'Go to API Manager' button of a
>>>>>particular app, it should login to APIM and show the subscribed APIs,
>>>>>listed under selected application.
>>>>>- Create application
>>>>>- Remove application
>>>>>- Get published APIs by application
>>>>>- List subscription
>>>>>- Get applications
>>>>>
>>>>> [1] https://wso2.org/jira/browse/APPFAC-3217
>>>>>
>>>>> Thanks
>>>>> Amalka
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Amalka Subasinghe
>>>> Senior Software Engineer
>>>> WSO2 Inc.
>>>> Mobile: +94 77 9401267
>>>>
>>>
>>>
>>>
>>> --
>>> Nuwan Dias
>>>
>>> Technical Lead - WSO2, Inc. http://wso2.com
>>> email : nuw...@wso2.com
>>> Phone : +94 777 775 729
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Lakshman Udayakantha
>> WSO2 Inc. www.wso2.com
>> lean.enterprise.middleware
>> Mobile: *0714388124*
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Revoked Access Token and Revoked Refresh Token returned back in token revoke endpoint response

2015-11-23 Thread Amila De Silva
Hi Sanjeewa,

On Sunday, November 22, 2015, Sanjeewa Malalgoda  wrote:

> In 1.10 we have commemted out cache clear handler in revoke api but it was
> there in token API. So by default we will not use transport headers coming
> from revoke request but use in token api. But i dont see any other option
> if we need to clear cache in gateway.
> @amila have we done something to clear cache without cache clear handler?
>
Nope, the only additional cache related method we introduced was
getActiveTokensByConsumerKey which is used to clear Gateway Cache, when a
change happens on the subscription.

During one of the discussions we had when this requirement was brought up,
one option discussed was calling
APIAuthenticationService.invalidateCachedTokens from KeyManager. If
KeyManager has a listener which gets called while tokens get revoked, then
this operation can be called from that listener.

> if not we have 2 options
> 1. clear cache during request path of token revoke apis. Then we can clear
> cache without relying on what happen in key manager side.
> Disadvantage of this is we have to build message body in request path.
>
But still we won't be able to clear the cache when refresh token is used,
right?

> 2.Have extension point in key manager to register call back for token
> revoke events. Then we can implement code to call back to gateway.
>
> WDYT?
>
> Thanks
> sanjeewa.
>
> sent from my phone
> On Nov 23, 2015 12:38 AM, "Johann Nallathamby"  wrote:
>
>> APIM Team,
>>
>> Regarding [1], I know this was implemented as part of a requirement for
>> API Manager. Does API Manager rely on this still ? Can we get rid of
>> returning these tokens ? In the new versions of API Manager if you are
>> supporting external key managers according to standards how are you going
>> to interoperate if you relying on such custom headers ?
>>
>> [1] https://wso2.org/jira/browse/IDENTITY-4112
>>
>> --
>> Thanks & Regards,
>>
>> *Johann Dilantha Nallathamby*
>> Technical Lead & Product Lead of WSO2 Identity Server
>> Governance Technologies Team
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - *+9476950*
>> Blog - *http://nallaa.wordpress.com *
>>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Null pointer exception from api gateway component when logging as the tenant-admin

2015-10-14 Thread Amila De Silva
he.axis2.engine.AxisEngine.send(AxisEngine.java:442)
>> at
>> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
>> at
>> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
>> at
>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
>> at
>> org.wso2.carbon.authenticator.stub.AuthenticationAdminStub.login(AuthenticationAdminStub.java:659)
>> at
>> org.wso2.carbon.authenticator.proxy.AuthenticationAdminClient.login(AuthenticationAdminClient.java:64)
>> at
>> org.wso2.carbon.ui.DefaultCarbonAuthenticator.doAuthentication(DefaultCarbonAuthenticator.java:119)
>> at
>> org.wso2.carbon.ui.AbstractCarbonUIAuthenticator.handleSecurity(AbstractCarbonUIAuthenticator.java:218)
>> at
>> org.wso2.carbon.ui.BasicAuthUIAuthenticator.authenticate(BasicAuthUIAuthenticator.java:83)
>> at
>> org.wso2.carbon.ui.CarbonUILoginUtil.handleLogin(CarbonUILoginUtil.java:377)
>> at
>> org.wso2.carbon.ui.CarbonSecuredHttpContext.handleSecurity(CarbonSecuredHttpContext.java:244)
>> at
>> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:60)
>> at
>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
>> at
>> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>> at
>> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>> at
>> org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>> at
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
>> at
>> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
>> at
>> org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticationValve.invoke(WebappAuthenticationValve.java:44)
>> at
>> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
>> at
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
>> at
>> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
>> at
>> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
>> at
>> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
>> at
>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
>> at
>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>> at
>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>> at java.lang.Thread.run(Thread.java:745)
>>
>> Thanks,
>>
>> Harshan Liyanage
>> Software Engineer
>> Mobile: *+94724423048*
>> Email: hars...@wso2.com
>> <javascript:_e(%7B%7D,'cvml','hars...@wso2.com');>
>> Blog : http://harshanliyanage.blogspot.com/
>> *WSO2, Inc. :** wso2.com <http://wso2.com/>*
>> lean.enterprise.middleware.
>>
>
>
>
> --
> Regards,
> Uvindra
>
> Mobile: 33962
>


-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Throttling] Moving throttle.core out from Synapse

2015-09-29 Thread Amila De Silva
Fixed the issue and create a new PR [2].

The problem was, canAccess method in CallerContext has been incrementing
both global and local counts. Due to this, a single request gets counted
twice, and throttling quota gets depleted before reaching the maximum
number of allowed requests.

After fixing the issue, re-ran the integration tests and this
time Throttling related failures couldn't be seen but there were three test
failures. After doing a second run, got two of them passing, but still
there's one failure (which is pasted below) that occurs even on a vanilla
pack. (Results for the two runs can be found at [3] & [4]) .

Test class:
org.wso2.carbon.esb.endpoint.test.ESBJAVA3047Soap12EndpointTestCase
Test method: Sending a Message to a Soap12 endpoint and checks weather
'action' is present in Content-Type header
java.lang.AssertionError: Unable to find the action in Content-type head
for SOAP 1.2 message: header returned [ null] expected: but
was:
at org.testng.Assert.fail(Assert.java:89)
at org.testng.Assert.failNotEquals(Assert.java:489)
at org.testng.Assert.assertTrue(Assert.java:37)
at
org.wso2.carbon.esb.endpoint.test.ESBJAVA3047Soap12EndpointTestCase.testSoap12EndpointForAction(ESBJAVA3047Soap12EndpointTestCase.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)
at
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.runWorkers(TestRunner.java:1178)
at org.testng.TestRunner.privateRun(TestRunner.java:757)
at org.testng.TestRunner.run(TestRunner.java:608)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)
at org.testng.TestNG.run(TestNG.java:999)
at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:178)
at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at
org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Is it safe to ignore this failure?

[2] https://github.com/wso2/wso2-synapse/pull/369
[3]
https://drive.google.com/a/wso2.com/file/d/0BxlcfaVDH9iFNkMwSHlpbGwxSlE/view?usp=sharing
[4]
https://drive.google.com/a/wso2.com/file/d/0BxlcfaVDH9iFa2RtQUJaUTB5RlU/view?usp=sharing
On Saturday, September 26, 2015, Amila De Silva <ami...@wso2.com> wrote:

> Hi Chanaka,
> Will check this.
>
>
> On Saturday, September 26, 2015, Chanaka Fernando <chana...@wso2.com>
> wrote:
>
>> Hi AmilaD,
>>
>> After merging this change, we have seen that there are 3 integration test
>> failures in product-esb[1] . Please check these failures and resend the PR.
>> I'll revert the fix for the moment.
>>
>> [1] https://wso2.org/jenkins/job/product-esb/lastBuild/testReport/
>>
>> On Fri, Sep 25, 2015 at 3:13 PM, Chanaka Fernando <chana...@wso2.com>
>> wrote:
>>
>>> Hi Amila,
>>>
>>> PR[1] is merged.
>>>
>>> [1]
>>> https://github.com/wso2/wso2-synapse/commit/d5815b2afcf7f2d9c8e5e5858e8cc45427a07ce0
>>>
>>> On Fri, Sep 25, 2015 at 2:43 PM, Amila De Silva <ami...@wso2.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> Tested RoleBased T

Re: [Dev] [Throttling] Moving throttle.core out from Synapse

2015-09-25 Thread Amila De Silva
Hi Chanaka,
Will check this.


On Saturday, September 26, 2015, Chanaka Fernando <chana...@wso2.com> wrote:

> Hi AmilaD,
>
> After merging this change, we have seen that there are 3 integration test
> failures in product-esb[1] . Please check these failures and resend the PR.
> I'll revert the fix for the moment.
>
> [1] https://wso2.org/jenkins/job/product-esb/lastBuild/testReport/
>
> On Fri, Sep 25, 2015 at 3:13 PM, Chanaka Fernando <chana...@wso2.com
> <javascript:_e(%7B%7D,'cvml','chana...@wso2.com');>> wrote:
>
>> Hi Amila,
>>
>> PR[1] is merged.
>>
>> [1]
>> https://github.com/wso2/wso2-synapse/commit/d5815b2afcf7f2d9c8e5e5858e8cc45427a07ce0
>>
>> On Fri, Sep 25, 2015 at 2:43 PM, Amila De Silva <ami...@wso2.com
>> <javascript:_e(%7B%7D,'cvml','ami...@wso2.com');>> wrote:
>>
>>> Hi,
>>>
>>> Tested RoleBased Throttling on a two node APIM cluster after applying
>>> new changes. Counts are properly getting replicated across all the nodes.
>>>
>>> On Tue, Sep 15, 2015 at 5:05 PM, Amila De Silva <ami...@wso2.com
>>> <javascript:_e(%7B%7D,'cvml','ami...@wso2.com');>> wrote:
>>>
>>>> Hi,
>>>>
>>>> Created the PR[1], by merging latest throttling fixes with
>>>> synapse-commons. After doing the changes, was able to successfully build
>>>> wso2-synapse and carbon-mediation with unit tests. Ran all the integration
>>>> tests in product-esb, after building the product on top of latest synapse
>>>> and carbon-mediation changes.
>>>>
>>>> Please review and merge the PR.
>>>>
>>>> [1] https://github.com/wso2/wso2-synapse/pull/360
>>>>
>>>> On Mon, Sep 14, 2015 at 5:07 PM, Amila De Silva <ami...@wso2.com
>>>> <javascript:_e(%7B%7D,'cvml','ami...@wso2.com');>> wrote:
>>>>
>>>>> Hi Isuru,
>>>>>
>>>>> There aren't any changes to be merged on MEPClient and
>>>>> SynapseCallbackReceiver. Changes that need merging are done on classes
>>>>> residing under [1].
>>>>>
>>>>> Let me clarify a bit what these changes are;
>>>>>
>>>>> While fixing some throttling issues in AM 1.6.0, certain changes were
>>>>> done on the part that replicates throttling counters. Earlier these
>>>>> counters were replicated using a ClusterMessage, but after the fixes
>>>>> counters are replicated using  Hazelcast AtomicLongs. The fixes were
>>>>> done on org.wso2.carbon.throttle.core_4.2.0, which is maintained in
>>>>> svn and after fixes were done, throttle.core needs depending on
>>>>> com.hazelcast.wso2 component.
>>>>>
>>>>> When moving synapse code on to Git, throttle.core has been absorbed
>>>>> into synapse, and now it is kept under [1]. Parallel to the changes
>>>>> mentioned above, some other fixes have been done on the throttling &
>>>>> synapse (which now is on Git) and it's those changes that make synapse
>>>>> depend on throttle core. The change is MEPClient and
>>>>> SynapseCallbackReceiver using a reference of ConcurrentAccessController
>>>>> (you can find the specific code changes at [2])
>>>>>
>>>>>
>>>>> [1]
>>>>> https://github.com/wso2/wso2-synapse/tree/master/modules/commons/src/main/java/org/apache/synapse/commons/throttle
>>>>> [2]
>>>>> https://github.com/wso2/wso2-synapse/blob/master/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java#L497-L515
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Sep 14, 2015 at 3:54 PM, Isuru Udana <isu...@wso2.com
>>>>> <javascript:_e(%7B%7D,'cvml','isu...@wso2.com');>> wrote:
>>>>>
>>>>>> Hi AmilaD,
>>>>>>
>>>>>> Can you please point us the changes need to be merged in synapse (in
>>>>>> MEPClient and SynapseCallbackReceiver) ?
>>>>>>
>>>>>> On Mon, Sep 14, 2015 at 2:58 PM, Amila De Silva <ami...@wso2.com
>>>>>> <javascript:_e(%7B%7D,'cvml','ami...@wso2.com');>> wrote:
>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> While carrying out this task, came to a point where certain classes
>>>>>>> cannot be moved out of synapse.

Re: [Dev] [Throttling] Moving throttle.core out from Synapse

2015-09-25 Thread Amila De Silva
Hi,

Tested RoleBased Throttling on a two node APIM cluster after applying new
changes. Counts are properly getting replicated across all the nodes.

On Tue, Sep 15, 2015 at 5:05 PM, Amila De Silva <ami...@wso2.com> wrote:

> Hi,
>
> Created the PR[1], by merging latest throttling fixes with
> synapse-commons. After doing the changes, was able to successfully build
> wso2-synapse and carbon-mediation with unit tests. Ran all the integration
> tests in product-esb, after building the product on top of latest synapse
> and carbon-mediation changes.
>
> Please review and merge the PR.
>
> [1] https://github.com/wso2/wso2-synapse/pull/360
>
> On Mon, Sep 14, 2015 at 5:07 PM, Amila De Silva <ami...@wso2.com> wrote:
>
>> Hi Isuru,
>>
>> There aren't any changes to be merged on MEPClient and
>> SynapseCallbackReceiver. Changes that need merging are done on classes
>> residing under [1].
>>
>> Let me clarify a bit what these changes are;
>>
>> While fixing some throttling issues in AM 1.6.0, certain changes were
>> done on the part that replicates throttling counters. Earlier these
>> counters were replicated using a ClusterMessage, but after the fixes
>> counters are replicated using  Hazelcast AtomicLongs. The fixes were
>> done on org.wso2.carbon.throttle.core_4.2.0, which is maintained in svn
>> and after fixes were done, throttle.core needs depending on
>> com.hazelcast.wso2 component.
>>
>> When moving synapse code on to Git, throttle.core has been absorbed into
>> synapse, and now it is kept under [1]. Parallel to the changes mentioned
>> above, some other fixes have been done on the throttling & synapse (which
>> now is on Git) and it's those changes that make synapse depend on throttle
>> core. The change is MEPClient and SynapseCallbackReceiver using a reference
>> of ConcurrentAccessController (you can find the specific code changes at
>> [2])
>>
>>
>> [1]
>> https://github.com/wso2/wso2-synapse/tree/master/modules/commons/src/main/java/org/apache/synapse/commons/throttle
>> [2]
>> https://github.com/wso2/wso2-synapse/blob/master/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java#L497-L515
>>
>>
>>
>> On Mon, Sep 14, 2015 at 3:54 PM, Isuru Udana <isu...@wso2.com> wrote:
>>
>>> Hi AmilaD,
>>>
>>> Can you please point us the changes need to be merged in synapse (in
>>> MEPClient and SynapseCallbackReceiver) ?
>>>
>>> On Mon, Sep 14, 2015 at 2:58 PM, Amila De Silva <ami...@wso2.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> While carrying out this task, came to a point where certain classes
>>>> cannot be moved out of synapse.
>>>>
>>>> For some of the improvements done recently, ConcurrentAccessController
>>>> (which is one of the classes that originally resided in throttle core) has
>>>> been used from SynapseCallbackReceiver and Axis2FlexibleMEPClient. So now
>>>> either ConcurrentAccessController has to reside inside synapse, or else it
>>>> has to go into another different component on which synapse would have to
>>>> depend on. The whole point of moving throttling related code out of synapse
>>>> is to prevent synapse depending on any carbon components.
>>>>
>>>> Since synapse depending on Hazelcast is not something that can be
>>>> eliminated completely, is it fine to keep throttle.core inside synapse and
>>>> merge new changes? When merging throttling fixes, either we have to
>>>> introduce a service component to synapse, which would
>>>> consume hazelcast.instance.service or we have to provide a method to set
>>>> the HazelcastInstance that will be used for replicating throttling counts.
>>>>
>>>> On Fri, Sep 11, 2015 at 9:01 PM, Amila De Silva <ami...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi Chanaka,
>>>>>
>>>>> Since throttle core can be used on its own, thought of creating a
>>>>> separate feature out of that - so a new place to put throttle component. 
>>>>> If
>>>>> we put it under mediation-throttle, that would imply two components have 
>>>>> to
>>>>> be used together, isn't it?
>>>>>
>>>>> On Fri, Sep 11, 2015 at 6:45 PM, Chanaka Fernando <chana...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Amila,
>>>>>>
>>>>&g

Re: [Dev] APIM- Gateway environments

2015-09-22 Thread Amila De Silva
Hi Udara,

What is the client type you are using? Can you switch it to WSClient and
check.

On Wednesday, September 23, 2015, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Ajith,
>
> APIM2 is only acting as a gateway. The only difference to have two
> distributed gateways[1]is when APIs are created in API1, it should be
> available in APIM2 too.
>
> [1] https://docs.wso2.com/display/CLUSTER420/Clustering+API+Manager
>
> On Tue, Sep 22, 2015 at 1:15 PM, Ajith Vitharana <aji...@wso2.com
> <javascript:_e(%7B%7D,'cvml','aji...@wso2.com');>> wrote:
>
>> If you have created the API from APIM1 , then API meta data has stored in
>>  APIM1 databases (registry and AM db).  AFAIU you need to share the
>> databases (registry and AM db) with APIM2
>>
>> -Ajith
>>
>> On Tue, Sep 22, 2015 at 4:04 PM, Udara Liyanage <ud...@wso2.com
>> <javascript:_e(%7B%7D,'cvml','ud...@wso2.com');>> wrote:
>>
>>> Hi,
>>>
>>> [1] I am trying to do what described in [1]. I have two APIMs in two
>>> regions.
>>>
>>> In APIM1 , I added second APIM as an environment.
>>>
>>>  
>>> Gateway B
>>> https://apim2.com:9443/services/
>>> 
>>> admin
>>> admin
>>> http://apim2.com:8280,
>>> https://apim2.com:8243
>>> 
>>> 
>>>
>>> In APIM2 , I pointed APIM as the Key manager.
>>>
>>>  
>>> https://apim1:9443/services/
>>> admin
>>> admin
>>>
>>> Now when I create an API in APIM, artifacts are successfully published
>>> to APIM2 too as expected. I manually check the artifacts and both has the
>>> same API artifacts.
>>>
>>> Then I tried accessing the API from APIM1 which got succeeded.
>>> However when I try to access the API from APIM2, I get the following
>>> error message
>>>
>>> *No matching resource found in the API for the given
>>> requestAccess failure for API: /sample/v1,
>>> version: v1 with key: c0dca4351fa3f074cd52a6087409743. Check the API
>>> documentation and add a proper REST resource path to the invocation URL*
>>>
>>> *[1] *
>>> https://docs.wso2.com/display/AM170/Maintaining+Separate+Production+and+Sandbox+Gateways
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>
>>
>>
>> --
>> Ajith Vitharana.
>>
>> WSO2 Inc. - http://wso2.com
>> Email  : aji...@wso2.com
>> <javascript:_e(%7B%7D,'cvml','aji...@wso2.com');>
>> Blog: http://vitharana.org
>> Mobile : +1-812-360-5335
>>
>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>


-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Configuring APIM publisher node when there are more than one APIM gateway instances

2015-09-20 Thread Amila De Silva
Hi Malintha,

I can think of two options you can try;
1. Specify end points of both the gateways in api-manager.xml. Since there
are only two nodes, you'll be able to deploy artifacts on the passive node
without enabling dep-sync.
2. If node switching happens at the LB level, then you can specify a single
DNS name for the active node. When a failure is detected, LB will route
requests to the active instance, and the passive instance will receive
artifacts through dep-sync.

On Sunday, September 20, 2015, Malintha Adikari <malin...@wso2.com> wrote:

> Hi,
>
> There are two APIM gateway instances, one is in active and other one is in
> passive state (to achieve high availability). I have enabled dep-sync.
> Should I add all gateway endpoint addresses or is it enough adding only
> active instance endpoint address in to the publisher's api-manager.xml
> gateway section ?
>
> Regards,
> Malintha
>
> --
> *Malintha Adikari *
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> Mobile: +94 71 2312958
> Blog:http://malinthas.blogspot.com
> Page:   http://about.me/malintha
>


-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Throttling] Moving throttle.core out from Synapse

2015-09-15 Thread Amila De Silva
Hi,

Created the PR[1], by merging latest throttling fixes with synapse-commons.
After doing the changes, was able to successfully build wso2-synapse and
carbon-mediation with unit tests. Ran all the integration tests in
product-esb, after building the product on top of latest synapse and
carbon-mediation changes.

Please review and merge the PR.

[1] https://github.com/wso2/wso2-synapse/pull/360

On Mon, Sep 14, 2015 at 5:07 PM, Amila De Silva <ami...@wso2.com> wrote:

> Hi Isuru,
>
> There aren't any changes to be merged on MEPClient and
> SynapseCallbackReceiver. Changes that need merging are done on classes
> residing under [1].
>
> Let me clarify a bit what these changes are;
>
> While fixing some throttling issues in AM 1.6.0, certain changes were done
> on the part that replicates throttling counters. Earlier these counters
> were replicated using a ClusterMessage, but after the fixes counters are
> replicated using  Hazelcast AtomicLongs. The fixes were done on 
> org.wso2.carbon.throttle.core_4.2.0,
> which is maintained in svn and after fixes were done, throttle.core needs
> depending on com.hazelcast.wso2 component.
>
> When moving synapse code on to Git, throttle.core has been absorbed into
> synapse, and now it is kept under [1]. Parallel to the changes mentioned
> above, some other fixes have been done on the throttling & synapse (which
> now is on Git) and it's those changes that make synapse depend on throttle
> core. The change is MEPClient and SynapseCallbackReceiver using a reference
> of ConcurrentAccessController (you can find the specific code changes at
> [2])
>
>
> [1]
> https://github.com/wso2/wso2-synapse/tree/master/modules/commons/src/main/java/org/apache/synapse/commons/throttle
> [2]
> https://github.com/wso2/wso2-synapse/blob/master/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java#L497-L515
>
>
>
> On Mon, Sep 14, 2015 at 3:54 PM, Isuru Udana <isu...@wso2.com> wrote:
>
>> Hi AmilaD,
>>
>> Can you please point us the changes need to be merged in synapse (in
>> MEPClient and SynapseCallbackReceiver) ?
>>
>> On Mon, Sep 14, 2015 at 2:58 PM, Amila De Silva <ami...@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> While carrying out this task, came to a point where certain classes
>>> cannot be moved out of synapse.
>>>
>>> For some of the improvements done recently, ConcurrentAccessController
>>> (which is one of the classes that originally resided in throttle core) has
>>> been used from SynapseCallbackReceiver and Axis2FlexibleMEPClient. So now
>>> either ConcurrentAccessController has to reside inside synapse, or else it
>>> has to go into another different component on which synapse would have to
>>> depend on. The whole point of moving throttling related code out of synapse
>>> is to prevent synapse depending on any carbon components.
>>>
>>> Since synapse depending on Hazelcast is not something that can be
>>> eliminated completely, is it fine to keep throttle.core inside synapse and
>>> merge new changes? When merging throttling fixes, either we have to
>>> introduce a service component to synapse, which would
>>> consume hazelcast.instance.service or we have to provide a method to set
>>> the HazelcastInstance that will be used for replicating throttling counts.
>>>
>>> On Fri, Sep 11, 2015 at 9:01 PM, Amila De Silva <ami...@wso2.com> wrote:
>>>
>>>> Hi Chanaka,
>>>>
>>>> Since throttle core can be used on its own, thought of creating a
>>>> separate feature out of that - so a new place to put throttle component. If
>>>> we put it under mediation-throttle, that would imply two components have to
>>>> be used together, isn't it?
>>>>
>>>> On Fri, Sep 11, 2015 at 6:45 PM, Chanaka Fernando <chana...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi Amila,
>>>>>
>>>>> You can find [1] which already has the throttle policy editor related
>>>>> packages and named as mediation-throttle. You can move the throttle-core
>>>>> packages to this component.
>>>>>
>>>>> [1]
>>>>> https://github.com/wso2/carbon-mediation/tree/master/components/mediation-throttle
>>>>>
>>>>> On Fri, Sep 11, 2015 at 6:23 PM, Sanjeewa Malalgoda <sanje...@wso2.com
>>>>> > wrote:
>>>>>
>>>>>> +1.
>>>>>>
>>>>>>
>>>>>> On Fri, S

Re: [Dev] [Throttling] Moving throttle.core out from Synapse

2015-09-14 Thread Amila De Silva
Hi Isuru,

There aren't any changes to be merged on MEPClient and
SynapseCallbackReceiver. Changes that need merging are done on classes
residing under [1].

Let me clarify a bit what these changes are;

While fixing some throttling issues in AM 1.6.0, certain changes were done
on the part that replicates throttling counters. Earlier these counters
were replicated using a ClusterMessage, but after the fixes counters are
replicated using  Hazelcast AtomicLongs. The fixes were done on
org.wso2.carbon.throttle.core_4.2.0,
which is maintained in svn and after fixes were done, throttle.core needs
depending on com.hazelcast.wso2 component.

When moving synapse code on to Git, throttle.core has been absorbed into
synapse, and now it is kept under [1]. Parallel to the changes mentioned
above, some other fixes have been done on the throttling & synapse (which
now is on Git) and it's those changes that make synapse depend on throttle
core. The change is MEPClient and SynapseCallbackReceiver using a reference
of ConcurrentAccessController (you can find the specific code changes at
[2])


[1]
https://github.com/wso2/wso2-synapse/tree/master/modules/commons/src/main/java/org/apache/synapse/commons/throttle
[2]
https://github.com/wso2/wso2-synapse/blob/master/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java#L497-L515



On Mon, Sep 14, 2015 at 3:54 PM, Isuru Udana <isu...@wso2.com> wrote:

> Hi AmilaD,
>
> Can you please point us the changes need to be merged in synapse (in
> MEPClient and SynapseCallbackReceiver) ?
>
> On Mon, Sep 14, 2015 at 2:58 PM, Amila De Silva <ami...@wso2.com> wrote:
>
>> Hi All,
>>
>> While carrying out this task, came to a point where certain classes
>> cannot be moved out of synapse.
>>
>> For some of the improvements done recently, ConcurrentAccessController
>> (which is one of the classes that originally resided in throttle core) has
>> been used from SynapseCallbackReceiver and Axis2FlexibleMEPClient. So now
>> either ConcurrentAccessController has to reside inside synapse, or else it
>> has to go into another different component on which synapse would have to
>> depend on. The whole point of moving throttling related code out of synapse
>> is to prevent synapse depending on any carbon components.
>>
>> Since synapse depending on Hazelcast is not something that can be
>> eliminated completely, is it fine to keep throttle.core inside synapse and
>> merge new changes? When merging throttling fixes, either we have to
>> introduce a service component to synapse, which would
>> consume hazelcast.instance.service or we have to provide a method to set
>> the HazelcastInstance that will be used for replicating throttling counts.
>>
>> On Fri, Sep 11, 2015 at 9:01 PM, Amila De Silva <ami...@wso2.com> wrote:
>>
>>> Hi Chanaka,
>>>
>>> Since throttle core can be used on its own, thought of creating a
>>> separate feature out of that - so a new place to put throttle component. If
>>> we put it under mediation-throttle, that would imply two components have to
>>> be used together, isn't it?
>>>
>>> On Fri, Sep 11, 2015 at 6:45 PM, Chanaka Fernando <chana...@wso2.com>
>>> wrote:
>>>
>>>> Hi Amila,
>>>>
>>>> You can find [1] which already has the throttle policy editor related
>>>> packages and named as mediation-throttle. You can move the throttle-core
>>>> packages to this component.
>>>>
>>>> [1]
>>>> https://github.com/wso2/carbon-mediation/tree/master/components/mediation-throttle
>>>>
>>>> On Fri, Sep 11, 2015 at 6:23 PM, Sanjeewa Malalgoda <sanje...@wso2.com>
>>>> wrote:
>>>>
>>>>> +1.
>>>>>
>>>>>
>>>>> On Fri, Sep 11, 2015 at 5:20 PM, Amila De Silva <ami...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Will be moving throttle.core to a new component under
>>>>>> carbon-mediation. The new component name will be throttle-core and a new
>>>>>> feature with the same name will be created. Planning to do these changes 
>>>>>> on
>>>>>> carbon-mediation 4.4.11-SNAPSHOT and synapse 2.1.3-wso2v12-SNAPSHOT.
>>>>>>
>>>>>> On Mon, Sep 7, 2015 at 6:25 PM, Amila De Silva <ami...@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> One of the changes done while moving to Git was, moving source code
>>>>>>> which 

Re: [Dev] [Throttling] Moving throttle.core out from Synapse

2015-09-14 Thread Amila De Silva
Hi All,

While carrying out this task, came to a point where certain classes cannot
be moved out of synapse.

For some of the improvements done recently, ConcurrentAccessController
(which is one of the classes that originally resided in throttle core) has
been used from SynapseCallbackReceiver and Axis2FlexibleMEPClient. So now
either ConcurrentAccessController has to reside inside synapse, or else it
has to go into another different component on which synapse would have to
depend on. The whole point of moving throttling related code out of synapse
is to prevent synapse depending on any carbon components.

Since synapse depending on Hazelcast is not something that can be
eliminated completely, is it fine to keep throttle.core inside synapse and
merge new changes? When merging throttling fixes, either we have to
introduce a service component to synapse, which would
consume hazelcast.instance.service or we have to provide a method to set
the HazelcastInstance that will be used for replicating throttling counts.

On Fri, Sep 11, 2015 at 9:01 PM, Amila De Silva <ami...@wso2.com> wrote:

> Hi Chanaka,
>
> Since throttle core can be used on its own, thought of creating a separate
> feature out of that - so a new place to put throttle component. If we put
> it under mediation-throttle, that would imply two components have to be
> used together, isn't it?
>
> On Fri, Sep 11, 2015 at 6:45 PM, Chanaka Fernando <chana...@wso2.com>
> wrote:
>
>> Hi Amila,
>>
>> You can find [1] which already has the throttle policy editor related
>> packages and named as mediation-throttle. You can move the throttle-core
>> packages to this component.
>>
>> [1]
>> https://github.com/wso2/carbon-mediation/tree/master/components/mediation-throttle
>>
>> On Fri, Sep 11, 2015 at 6:23 PM, Sanjeewa Malalgoda <sanje...@wso2.com>
>> wrote:
>>
>>> +1.
>>>
>>>
>>> On Fri, Sep 11, 2015 at 5:20 PM, Amila De Silva <ami...@wso2.com> wrote:
>>>
>>>> Will be moving throttle.core to a new component under carbon-mediation.
>>>> The new component name will be throttle-core and a new feature with the
>>>> same name will be created. Planning to do these changes on
>>>> carbon-mediation 4.4.11-SNAPSHOT and synapse 2.1.3-wso2v12-SNAPSHOT.
>>>>
>>>> On Mon, Sep 7, 2015 at 6:25 PM, Amila De Silva <ami...@wso2.com> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> One of the changes done while moving to Git was, moving source code
>>>>> which was under org.wso2.carbon.throttle.core to wso2-synapse. Throttle
>>>>> core is used by both ESB (in Throttle mediator) and by API Manager (in
>>>>> APIThrottleHandler - to keep track of the number of API calls made over 
>>>>> the
>>>>> cluster). At the time throttle core was moved, it was depending on Axis2
>>>>> only, making it possible to move the source code to wso2-synapse - which 
>>>>> is
>>>>> not depending on any carbon components.
>>>>>
>>>>> While doing several improvements on throttling, Hazelcast AtomicLongs
>>>>> were used for keeping cluster-wide counts, which now creates a coupling
>>>>> between Hazelcast and Throttle Core. If these changes are to be merged 
>>>>> with
>>>>> synapse, we would have to add a dependency to Hazelcast.
>>>>>
>>>>> The other option is to move Throttle Core into carbon-mediation. Since
>>>>> this already depends on several carbon components adding Hazelcast as a
>>>>> dependancy won't be an issue.
>>>>>
>>>>> --
>>>>> *Amila De Silva*
>>>>>
>>>>> WSO2 Inc.
>>>>> mobile :(+94) 775119302
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> *Amila De Silva*
>>>>
>>>> WSO2 Inc.
>>>> mobile :(+94) 775119302
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> *Sanjeewa Malalgoda*
>>> WSO2 Inc.
>>> Mobile : +94713068779
>>>
>>> <http://sanjeewamalalgoda.blogspot.com/>blog
>>> :http://sanjeewamalalgoda.blogspot.com/
>>> <http://sanjeewamalalgoda.blogspot.com/>
>>>
>>>
>>>
>>
>>
>> --
>> --
>> Chanaka Fernando
>> Senior Technical Lead
>> WSO2, Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 773337238
>> Blog : http://soatutorials.blogspot.com
>> LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
>> Twitter:https://twitter.com/chanakaudaya
>>
>>
>>
>>
>>
>
>
> --
> *Amila De Silva*
>
> WSO2 Inc.
> mobile :(+94) 775119302
>
>


-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Throttling] Moving throttle.core out from Synapse

2015-09-11 Thread Amila De Silva
Will be moving throttle.core to a new component under carbon-mediation. The
new component name will be throttle-core and a new feature with the same
name will be created. Planning to do these changes on
carbon-mediation 4.4.11-SNAPSHOT and synapse 2.1.3-wso2v12-SNAPSHOT.

On Mon, Sep 7, 2015 at 6:25 PM, Amila De Silva <ami...@wso2.com> wrote:

> Hi All,
>
> One of the changes done while moving to Git was, moving source code which
> was under org.wso2.carbon.throttle.core to wso2-synapse. Throttle core is
> used by both ESB (in Throttle mediator) and by API Manager (in
> APIThrottleHandler - to keep track of the number of API calls made over the
> cluster). At the time throttle core was moved, it was depending on Axis2
> only, making it possible to move the source code to wso2-synapse - which is
> not depending on any carbon components.
>
> While doing several improvements on throttling, Hazelcast AtomicLongs were
> used for keeping cluster-wide counts, which now creates a coupling between
> Hazelcast and Throttle Core. If these changes are to be merged with
> synapse, we would have to add a dependency to Hazelcast.
>
> The other option is to move Throttle Core into carbon-mediation. Since
> this already depends on several carbon components adding Hazelcast as a
> dependancy won't be an issue.
>
> --
> *Amila De Silva*
>
> WSO2 Inc.
> mobile :(+94) 775119302
>
>


-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Throttling] Moving throttle.core out from Synapse

2015-09-11 Thread Amila De Silva
Hi Chanaka,

Since throttle core can be used on its own, thought of creating a separate
feature out of that - so a new place to put throttle component. If we put
it under mediation-throttle, that would imply two components have to be
used together, isn't it?

On Fri, Sep 11, 2015 at 6:45 PM, Chanaka Fernando <chana...@wso2.com> wrote:

> Hi Amila,
>
> You can find [1] which already has the throttle policy editor related
> packages and named as mediation-throttle. You can move the throttle-core
> packages to this component.
>
> [1]
> https://github.com/wso2/carbon-mediation/tree/master/components/mediation-throttle
>
> On Fri, Sep 11, 2015 at 6:23 PM, Sanjeewa Malalgoda <sanje...@wso2.com>
> wrote:
>
>> +1.
>>
>>
>> On Fri, Sep 11, 2015 at 5:20 PM, Amila De Silva <ami...@wso2.com> wrote:
>>
>>> Will be moving throttle.core to a new component under carbon-mediation.
>>> The new component name will be throttle-core and a new feature with the
>>> same name will be created. Planning to do these changes on
>>> carbon-mediation 4.4.11-SNAPSHOT and synapse 2.1.3-wso2v12-SNAPSHOT.
>>>
>>> On Mon, Sep 7, 2015 at 6:25 PM, Amila De Silva <ami...@wso2.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> One of the changes done while moving to Git was, moving source code
>>>> which was under org.wso2.carbon.throttle.core to wso2-synapse. Throttle
>>>> core is used by both ESB (in Throttle mediator) and by API Manager (in
>>>> APIThrottleHandler - to keep track of the number of API calls made over the
>>>> cluster). At the time throttle core was moved, it was depending on Axis2
>>>> only, making it possible to move the source code to wso2-synapse - which is
>>>> not depending on any carbon components.
>>>>
>>>> While doing several improvements on throttling, Hazelcast AtomicLongs
>>>> were used for keeping cluster-wide counts, which now creates a coupling
>>>> between Hazelcast and Throttle Core. If these changes are to be merged with
>>>> synapse, we would have to add a dependency to Hazelcast.
>>>>
>>>> The other option is to move Throttle Core into carbon-mediation. Since
>>>> this already depends on several carbon components adding Hazelcast as a
>>>> dependancy won't be an issue.
>>>>
>>>> --
>>>> *Amila De Silva*
>>>>
>>>> WSO2 Inc.
>>>> mobile :(+94) 775119302
>>>>
>>>>
>>>
>>>
>>> --
>>> *Amila De Silva*
>>>
>>> WSO2 Inc.
>>> mobile :(+94) 775119302
>>>
>>>
>>
>>
>> --
>>
>> *Sanjeewa Malalgoda*
>> WSO2 Inc.
>> Mobile : +94713068779
>>
>> <http://sanjeewamalalgoda.blogspot.com/>blog
>> :http://sanjeewamalalgoda.blogspot.com/
>> <http://sanjeewamalalgoda.blogspot.com/>
>>
>>
>>
>
>
> --
> --
> Chanaka Fernando
> Senior Technical Lead
> WSO2, Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 773337238
> Blog : http://soatutorials.blogspot.com
> LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
> Twitter:https://twitter.com/chanakaudaya
>
>
>
>
>


-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Throttling] Moving throttle.core out from Synapse

2015-09-07 Thread Amila De Silva
Hi All,

One of the changes done while moving to Git was, moving source code which
was under org.wso2.carbon.throttle.core to wso2-synapse. Throttle core is
used by both ESB (in Throttle mediator) and by API Manager (in
APIThrottleHandler - to keep track of the number of API calls made over the
cluster). At the time throttle core was moved, it was depending on Axis2
only, making it possible to move the source code to wso2-synapse - which is
not depending on any carbon components.

While doing several improvements on throttling, Hazelcast AtomicLongs were
used for keeping cluster-wide counts, which now creates a coupling between
Hazelcast and Throttle Core. If these changes are to be merged with
synapse, we would have to add a dependency to Hazelcast.

The other option is to move Throttle Core into carbon-mediation. Since this
already depends on several carbon components adding Hazelcast as a
dependancy won't be an issue.

-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to call "IdentityApplicationManagementService" admin service as a tenant user

2015-09-03 Thread Amila De Silva
Hi,

If this is about calling *ApplicationManagementAdmin**Service *using MutualSSL,
then still this would be only available to admin users, isn't it. A similar
approach was attempted while trying to create SP for AM_Application, at the
time of Generating a key. The problem was, even mutual SSL allows user to
authenticate, since this is an admin service, users are failed at the
authorising step unless they are admin users.

On Thu, Sep 3, 2015 at 12:20 AM, Sanjeewa Malalgoda <sanje...@wso2.com>
wrote:

> If you are trying to implement tenant SP creation for App manager then we
> can easily do it using mutual SSL with tenant user name.
> We have implemented something similar and we can share code with you soon.
>
> Thanks,
> sanjeewa.
>
> On Thu, Sep 3, 2015 at 12:13 AM, Lakshani Gamage <laksh...@wso2.com>
> wrote:
>
>> Hi all,
>>
>> I want to call "*IdentityApplicationManagementService*" admin service as
>> a tenant user.
>>
>> I gave super tenant credentials to that stub and called  "
>> *createApplication*" method by changing tenant flow. But still the SP is
>> created in ST space.
>>
>> If you have any idea, how to call this Service as a tenant user, Please
>> share it.
>>
>> Thanks,
>> Lakshani
>>
>>
>>
>> --
>> Lakshani Gamage
>>
>> *Software Engineer*
>> Mobile : +94 (0) 71 5478184 <%2B94%20%280%29%20773%20451194>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> *Sanjeewa Malalgoda*
> WSO2 Inc.
> Mobile : +94713068779
>
> <http://sanjeewamalalgoda.blogspot.com/>blog
> :http://sanjeewamalalgoda.blogspot.com/
> <http://sanjeewamalalgoda.blogspot.com/>
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM][Mediator] CNF while publishing APIs

2015-09-03 Thread Amila De Silva
/life-cycles/ajax/life-cycles.jag)
> at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
> at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
> at
> org.jaggeryjs.rhino.publisher.site.blocks.life_cycles.ajax.c0.call(/publisher/site/blocks/life-cycles/ajax/life-cycles.jag)
> at
> org.jaggeryjs.rhino.publisher.site.blocks.life_cycles.ajax.c0.exec(/publisher/site/blocks/life-cycles/ajax/life-cycles.jag)
> at
> org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
> at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
> at
> org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:587)
> at
> org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:507)
> at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
> at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
> at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:378)
> at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
> at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
> at
> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
> at
> org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
> at
> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
> at
> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
> at
> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
> at
> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
> at
> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.axis2.AxisFault: Error loading class :
> org.wso2.carbon.apimgt.usage.publisher.APIMgtResponseHandler - Class not
> found
> at
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
> at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
> at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:445)
> at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
> at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
> at
> org.wso2.carbon.rest.api.stub.RestApiAdminStub.addApiFromString(RestApiAdminStub.java:2579)
> at
> org.wso2.carbon.apimgt.impl.utils.RESTAPIAdminClient.addApi(RESTAPIAdminClient.java:58)
> ... 69 more
>
> Thanks in advance for your responses.
>
> --
> *Madusanka Premaratne* | Associate Software Engineer
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 835 70 73| Work: +94 112 145 345
> Email: madusan...@wso2.com | Web: www.wso2.com
>
> [image: Facebook] <https://www.facebook.com/maduzanka> [image: Twitter]
> <https://twitter.com/rmmpremaratne> [image: Google Plus]
> <https://plus.google.com/u/0/+MadusankaPremaratnemaduz/about/p/pub> [image:
> Linkedin] <http://lk.linkedin.com/in/madusanka/> [image: Instagram]
> <http://instagram.com/madusankapremaratne> [image: Skype]
> <http://@rmmpremaratne>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to call "IdentityApplicationManagementService" admin service as a tenant user

2015-09-03 Thread Amila De Silva
On Thu, Sep 3, 2015 at 11:35 PM, Sanjeewa Malalgoda <sanje...@wso2.com>
wrote:

> API Manager/ APP Manager applications are super tenant deployed
> multitenanted SaaS applications.
> So its common to have some operations perform as admin users. Actually in
> that cases application act as super users and handle tenants and other user
> flows.
>
Correct.

> So i dont see big issue with this. And We may not need call these admin
> services as tenant users(users will call APIs but actual operation and
> admin service call done by super tenant deployed app).
>

The problem is, ApplicationManagementAdminService creates SP in the logged
in user's space. So if the service is invoked using Admin Credentials, then
the SP will be created for Admin user. If the subscriber later happens to
log into management console and change the SP, then he/she won't be able to
see it.
>
>
> Thanks,
> sanjeewa.
>
> On Thu, Sep 3, 2015 at 10:56 PM, Amila De Silva <ami...@wso2.com> wrote:
>
>> Hi,
>>
>> If this is about calling *ApplicationManagementAdmin**Service *using 
>> MutualSSL,
>> then still this would be only available to admin users, isn't it. A similar
>> approach was attempted while trying to create SP for AM_Application, at the
>> time of Generating a key. The problem was, even mutual SSL allows user to
>> authenticate, since this is an admin service, users are failed at the
>> authorising step unless they are admin users.
>>
>> On Thu, Sep 3, 2015 at 12:20 AM, Sanjeewa Malalgoda <sanje...@wso2.com>
>> wrote:
>>
>>> If you are trying to implement tenant SP creation for App manager then
>>> we can easily do it using mutual SSL with tenant user name.
>>> We have implemented something similar and we can share code with you
>>> soon.
>>>
>>> Thanks,
>>> sanjeewa.
>>>
>>> On Thu, Sep 3, 2015 at 12:13 AM, Lakshani Gamage <laksh...@wso2.com>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I want to call "*IdentityApplicationManagementService*" admin service
>>>> as a tenant user.
>>>>
>>>> I gave super tenant credentials to that stub and called  "
>>>> *createApplication*" method by changing tenant flow. But still the SP
>>>> is created in ST space.
>>>>
>>>> If you have any idea, how to call this Service as a tenant user, Please
>>>> share it.
>>>>
>>>> Thanks,
>>>> Lakshani
>>>>
>>>>
>>>>
>>>> --
>>>> Lakshani Gamage
>>>>
>>>> *Software Engineer*
>>>> Mobile : +94 (0) 71 5478184 <%2B94%20%280%29%20773%20451194>
>>>>
>>>> ___
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> *Sanjeewa Malalgoda*
>>> WSO2 Inc.
>>> Mobile : +94713068779
>>>
>>> <http://sanjeewamalalgoda.blogspot.com/>blog
>>> :http://sanjeewamalalgoda.blogspot.com/
>>> <http://sanjeewamalalgoda.blogspot.com/>
>>>
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Amila De Silva*
>>
>> WSO2 Inc.
>> mobile :(+94) 775119302
>>
>>
>
>
> --
>
> *Sanjeewa Malalgoda*
> WSO2 Inc.
> Mobile : +94713068779
>
> <http://sanjeewamalalgoda.blogspot.com/>blog
> :http://sanjeewamalalgoda.blogspot.com/
> <http://sanjeewamalalgoda.blogspot.com/>
>
>
>


-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] SelfSignUpUtil class is not executing when we enabled workflow with BPS + API manager 1.9.0

2015-09-02 Thread Amila De Silva
Hi Roshan,

Do you get any exceptions when signing up?

On Wed, Sep 2, 2015 at 2:51 PM, Roshan Wijesena <ros...@wso2.com> wrote:

> Hi Guys,
>
> I have enabled user sign up work flow for tenant as explained here[1],
> However, When an user signed up I could not see the default
> internal/subscriber role assigned to that user properly. I tried to debug
> but SelfSignUpUtil class  does not get hit by debug.
>
> any reason for this?
>
> [1] https://docs.wso2.com/display/AM190/Configuring+Workflows+for+Tenants
>
> Regards
> Roshan
>
> --
> Roshan Wijesena.
> Senior Software Engineer-WSO2 Inc.
> Mobile: *+94719154640 <%2B94719154640>*
> Email: ros...@wso2.com
> *WSO2, Inc. :** wso2.com <http://wso2.com/>*
> lean.enterprise.middleware.
>



-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 API Manager 1.9.1 Released!!

2015-08-31 Thread Amila De Silva
to production. Our unique approach
ensures that all support leverages our open development methodology and is
provided by the very same engineers who build the technology.

For more details and to take advantage of this unique opportunity please
visit http://wso2.com/support.

To learn more about WSO2 API Manager and WSO2 support offerings please
visit http://wso2.com/products/api-manager.

*-- The WSO2 API Manager Team --*
-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [DEV] WSO2 API Manager 1.9.1 Beta Released!!

2015-08-18 Thread Amila De Silva
WSO2 API Manager team is pleased to announce the Beta release of WSO2 API
Manager 1.9.1.

This release doesn't contain new features or major architectural changes
from the last release  only includes bug fixes and minor improvements.
Users should be able to move onto the newer version from 1.9.0 without any
data Migration.

Following Bug Fixes and Improvements are included in this release.

Bug

   - Bug Fixes https://wso2.org/jira/browse/APIMANAGER-3980?filter=12355

Improvement

   - Improvements
   https://wso2.org/jira/browse/APIMANAGER-3945?filter=12356



Distribution is available for downloading at [1]. Documentation can be
found at [2]. We encourage you to report issues, suggestions and
improvements related to API Manager through public Jira [3]. When reporting
issues, please report under version 1.9.1 Beta
https://wso2.org/jira/browse/APIMANAGER/fixforversion/11825

[1]
https://github.com/wso2/product-apim/releases/download/v1.9.1-Beta/wso2am-1.9.1-SNAPSHOT.zip
[2] *https://docs.wso2.com/display/AM191/WSO2+API+Manager+Documentation
https://docs.wso2.com/display/AM191/WSO2+API+Manager+Documentation*
[3] https://wso2.org/jira/browse/APIMANAGER


Thanks,
API Manager Team

-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] ConcurrentModificationException at server startup (https://wso2.org/jira/browse/APIMANAGER-2241)

2015-08-06 Thread Amila De Silva
/deployment/server/synapse-configs/default/api,
extension : xml
[2015-08-06 18:33:15,663]  INFO - DeploymentEngine Added Deployed class :
class org.wso2.carbon.sequences.SequenceDeploymentInterceptor , directory :
/Users/Amila/Tasks/1.9.1/PR/wso2am-1.9.1-SNAPSHOT/././repository/deployment/server/synapse-configs/default/sequences,
extension : xml
[2015-08-06 18:33:15,671]  INFO - DeploymentEngine Added Deployed class :
class org.wso2.carbon.startup.StartupTaskDeployer , directory :
/Users/Amila/Tasks/1.9.1/PR/wso2am-1.9.1-SNAPSHOT/././repository/deployment/server/synapse-configs/default/tasks,
extension : xml

Full log can be found at [1].

While going through one of the Deployers that gets added after CC
initialisation (CappAxis2Deployer), it was observed that component.xml for
this has been commented out and later I learnt it has been done to fix an
issue. So this means that specifying Deployers in component.xml is not an
option in all the cases. So this makes 2nd option the fix to go with.

But later on realised that the entire scheduler operation is wrapped in a
try catch block, which catches and handles a Throwable. So even a CME
occurs, while server starts up, if it's not thrown repeatedly, that means,
the task has succeeded in a subsequent run - Which means that there's no
impact of a single CME. If that's the case, is it advisable to ignore this
error?

How should we proceed with this?

[1]
https://docs.google.com/a/wso2.com/document/d/19Z6Lb_RA_4ivIJwWxTFz8XSLIK77eNOnQ1J2QDiC5R8/edit?usp=sharing


On Thu, Jun 19, 2014 at 6:55 PM, Manoj Kumara ma...@wso2.com wrote:

 Hi,

 This issue was reported on APIM 1.7.0 and i sent the pull request [1]
 relevant to the latest fixes. This also contain some fixes on
 *startup/org.wso2.carbon.startup* module but I couldn't find the relevant
 git repository for this. Appreciate if someone can guide me on this.

 [1] https://github.com/wso2-dev/carbon-mediation/pull/20

 Thanks,
 Manoj


 *Manoj Kumara*
 Software Engineer
 WSO2 Inc. http://wso2.com/
 *lean.enterprise.middleware*
 Mobile: +94713448188


 On Sun, May 18, 2014 at 1:21 PM, Isuru Udana isu...@wso2.com wrote:




 On Sun, May 18, 2014 at 12:52 PM, Sanjeewa Malalgoda sanje...@wso2.com
 wrote:

 Hi,
 I have created mediation initializer server and aggregate features and
 added required things to chunk 11 components and feature poms.  I think we
 need to update ELB p2 pom as well.

 Done. Thanks for informing.


 Thanks,
 sanjeewa.


 On Sat, May 17, 2014 at 11:41 PM, Manoj Kumara ma...@wso2.com wrote:

 Hi Sanjeewa,

 The fix relevant to this was added to patch0007 
 org.wso2.carbon.application.deployer
 module with r200859 and to org.wso2.carbon.mediation.initializer/4.2.2 with
 r202047 as mentioned on the jira.
 I have committed to 4.2.2 version since it was in APIM 1.7.0 product.
 But seems this was released under chunk-07 [1]. seems like I missed that at
 that point.

 I have reverted this change under r203033 and created the new version
 4.2.3 for this under [2] please use this in the product. Sorry about the
 trouble.

 [1]
 https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/product-releases/chunk-07/components/pom.xml
 [2]
 https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/mediation-initializer/org.wso2.carbon.mediation.initializer/4.2.3/

 Thanks,
 Manoj


 *Manoj Kumara*
 Software Engineer
 WSO2 Inc. http://wso2.com/
 *lean.enterprise.middleware*
 Mobile: +94713448188


 On Sat, May 17, 2014 at 11:13 AM, Sanjeewa Malalgoda sanje...@wso2.com
  wrote:

 Hi Manoj,
 AFAIK you fixed this issue[1] in patch0007. But it seems this issue is
 still there in latest packs. Do you have any idea what went wrong? This is
 urgent issue that we should fix before release. So really appreciate if
  you can have a quick look at.

 [1]https://wso2.org/jira/browse/APIMANAGER-2241

 Thanks,
 sanjeewa

 --

 *Sanjeewa Malalgoda*
 WSO2 Inc.
 Mobile : +94713068779

 http://sanjeewamalalgoda.blogspot.com/blog
 :http://sanjeewamalalgoda.blogspot.com/
 http://sanjeewamalalgoda.blogspot.com/






 --

 *Sanjeewa Malalgoda*
 WSO2 Inc.
 Mobile : +94713068779

 http://sanjeewamalalgoda.blogspot.com/blog
 :http://sanjeewamalalgoda.blogspot.com/
 http://sanjeewamalalgoda.blogspot.com/





 --
 *Isuru Udana*
 Senior
 * Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: isu...@wso2.com cell: +94 77 3791887
 blog: http://mytecheye.blogspot.com/
 twitter: http://twitter.com/isudana



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




-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] APIM 1.9.0 RC pack

2015-06-17 Thread Amila De Silva
Hi,

API Manager 1.9.0 RC is available at [1]

[1] http://builder1.us1.wso2.org/~apim/17-06-2015/

-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] APIM 1.9.0 nightly build pack - 13-06-2015

2015-06-13 Thread Amila De Silva
Hi,

Commented on [1].

It's not mandatory to mark Tokens as EXPIRED while validating the token as
long as there is a proper way to determine token's state.

[1] https://wso2.org/jira/browse/APIMANAGER-3882

On Sat, Jun 13, 2015 at 8:52 PM, Evanthika Amarasiri evanth...@wso2.com
wrote:

 Hi all,

 Sewmini found another issue in this pack [1]. The expired token state is
 not getting updated properly in the DB. We might have to do another round
 of proper testing before we build the next pack.

 [1] - https://wso2.org/jira/browse/APIMANAGER-3882

 Regards,
 Evanthika

 On Sat, Jun 13, 2015 at 4:09 PM, Evanthika Amarasiri evanth...@wso2.com
 wrote:

 ​Thanks Lakmali,

 We will replace the files and continue testing.​

 Regards,
 Evanthika Amarasiri
 Senior Technical Lead  - Quality Assurance
 Mobile: +94773125935
 Blog: evanthika.blogspot.com

 wso2.com lean.enterprise.middleware

 On Sat, Jun 13, 2015 at 3:58 PM, Lakmali Baminiwatta lakm...@wso2.com
 wrote:

 Fix is attached to the jira [1].

 Thanks,
 Lakmali



 On 13 June 2015 at 13:25, Ushani Balasooriya ush...@wso2.com wrote:

 Hi,

 The issue [1] comes only when you type {} via keyboard. If you just
 paste it or input the previously given context which is already comes from
 cache, it won't come.

 [1] https://wso2.org/jira/browse/APIMANAGER-3866

 On Sat, Jun 13, 2015 at 1:23 PM, Lakmali Baminiwatta lakm...@wso2.com
 wrote:

 Hi,

 On 13 June 2015 at 12:50, Evanthika Amarasiri evanth...@wso2.com
 wrote:

 Three of us are still seeing the issue [1] with latest packs. Tried
 with private browsers (3 types of browsers).

 [1] - https://wso2.org/jira/browse/APIMANAGER-3866


 With the fix, it allows to define context with {xxx}, and does not
 allow {}. But since we first type {}, and then only type the text in
 between, still this validation triggers an error.
 We'll provide a proper fix ASAP.


 @Chamin,
  I don't think we have to popup an error message for this validation.
 Please check the existing UI field validations (Ex: special character
 validation of context field).

 Thanks,
 Lakmali


 Regards,
 Evanthika

 On Sat, Jun 13, 2015 at 3:03 AM, Roshan Wijesena ros...@wso2.com
 wrote:

 Hi,

 Please find $subject from [1]

 [1]http://builder1.us1.wso2.org/~apim/13-06-2015/

 Thanks,
 Roshan

 --
 Roshan Wijesena.
 Senior Software Engineer-WSO2 Inc.
 Mobile: *+94719154640 %2B94719154640*
 Email: ros...@wso2.com
 *WSO2, Inc. :** wso2.com http://wso2.com/*
 lean.enterprise.middleware.

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





 --
 Lakmali Baminiwatta
  Senior Software Engineer
 WSO2, Inc.: http://wso2.com
 lean.enterprise.middleware
 mobile:  +94 71 2335936
 blog : lakmali.com


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




 --
 *Ushani Balasooriya*
 Senior Software Engineer - QA;
 WSO2 Inc; http://www.wso2.com/.
 Mobile; +94772636796




 --
 Lakmali Baminiwatta
  Senior Software Engineer
 WSO2, Inc.: http://wso2.com
 lean.enterprise.middleware
 mobile:  +94 71 2335936
 blog : lakmali.com






-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM 190] Errors while generating application token

2015-06-10 Thread Amila De Silva
Hi Nuwan,

This is due to having an outdated identity.xml in IS. Get the
supported grant types from identity.xml in API Manager and copy it to the
identity.xml in IS.

On Thursday, June 11, 2015, Nuwan Silva nuw...@wso2.com wrote:

 Hi All,

 We have seen the following issue coming up when trying to generate the
 application token from a APIM setup with IS500 as the Key manager. this is
 reported under [1].

 APIM:
 TID: [0] [AM] [2015-06-10 20:55:18,889] ERROR
 {org.wso2.carbon.apimgt.impl.utils.APIUtil} -  Error occurred while
 executing SubscriberKeyMgtClient.
 {org.wso2.carbon.apimgt.impl.utils.APIUtil}
 java.lang.RuntimeException: Error occurred while calling token endpoint:
 HTTP error code : 400
 at
 org.wso2.carbon.apimgt.keymgt.AMDefaultKeyManagerImpl.getNewApplicationAccessToken(AMDefaultKeyManagerImpl.java:305)
 at
 org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.dogenerateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:168)
 at
 org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.generateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:116)
 at
 org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete(ApplicationRegistrationSimpleWorkflowExecutor.java:81)
 at
 org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.execute(ApplicationRegistrationSimpleWorkflowExecutor.java:58)
 at
 org.wso2.carbon.apimgt.impl.APIConsumerImpl.requestApprovalForApplicationRegistration(APIConsumerImpl.java:2139)
 at
 org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.requestApprovalForApplicationRegistration(UserAwareAPIConsumer.java:34)
 at
 org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_getApplicationKey(APIStoreHostObject.java:751)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
 at
 org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)


 IS:
 java.lang.NullPointerException
 at java.util.Hashtable.put(Hashtable.java:514)
 at
 org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration.getSupportedGrantTypes(OAuthServerConfiguration.java:382)
 at
 org.wso2.carbon.identity.oauth.OAuthAdminService.getAllowedGrantTypes(OAuthAdminService.java:486)
 at
 org.wso2.carbon.apimgt.keymgt.service.APIKeyMgtSubscriberService.createOAuthApplication(APIKeyMgtSubscriberService.java:171)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)

 [1] https://wso2.org/jira/browse/APIMANAGER-3839

 Regards,
 NuwanS.
 --


 *Nuwan Silva*
 *Senior Software Engineer - QA*
 Mobile: +9477 980 4543

 WSO2 Inc.
 lean . enterprise . middlewear.
 http://www.wso2.com



-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 API Manager 1.9.0 Beta3 Released!

2015-06-05 Thread Amila De Silva
   visibility can not be controlled by the roles which are defined in 2ndry
   userstore.
   - [APIMANAGER-3718 https://wso2.org/jira/browse/APIMANAGER-3718] -
   Tokens obtained using Authorization Code have 0 validity period
   - [APIMANAGER-3721 https://wso2.org/jira/browse/APIMANAGER-3721] -
   Short cut keys are not working in API Console Authorization : Bearer field
   - [APIMANAGER-3722 https://wso2.org/jira/browse/APIMANAGER-3722] -
   When you import a swagger doc, it changes the API name to the imported
   swagger doc
   - [APIMANAGER-3724 https://wso2.org/jira/browse/APIMANAGER-3724] -
   When click the Generate button and successfully submitted the request no
   message displaying , in Application Registration Workflow
   - [APIMANAGER-3725 https://wso2.org/jira/browse/APIMANAGER-3725] - For
   tenant users in secondary user store cannot subscribe to APIs.
   - [APIMANAGER-3727 https://wso2.org/jira/browse/APIMANAGER-3727] - API
   Console error when using a email user name to publish an API
   - [APIMANAGER-3729 https://wso2.org/jira/browse/APIMANAGER-3729] - API
   Console adds * to the request URL when * is used in the URL template
   - [APIMANAGER-3733 https://wso2.org/jira/browse/APIMANAGER-3733] -
   Token generation on an APP created without group throws a NPE after
   assigning group
   - [APIMANAGER-3734 https://wso2.org/jira/browse/APIMANAGER-3734] -
   Issues in Store API
   - [APIMANAGER-3735 https://wso2.org/jira/browse/APIMANAGER-3735] -
   Admin user credentials should be parameterised in sign-up-config.xml
   - [APIMANAGER-3736 https://wso2.org/jira/browse/APIMANAGER-3736] -
   Secondary user store tenant users (jdbc) cannot generate application keys
   after the error encountered when subscription.
   - [APIMANAGER-3741 https://wso2.org/jira/browse/APIMANAGER-3741] -
   APIs published to external WSO2 store shows version twice in the external
   publisher
   - [APIMANAGER-3744 https://wso2.org/jira/browse/APIMANAGER-3744] -
   Unclassified Authentication Error given when the Key doesn't have a
   subscription
   - [APIMANAGER-3747 https://wso2.org/jira/browse/APIMANAGER-3747] - Get
   the Contents of a File Document via store api is broken
   - [APIMANAGER-3748 https://wso2.org/jira/browse/APIMANAGER-3748] -
   Publisher becomes unusable in my cluster setup complaining that an API is
   missing in the database
   - [APIMANAGER-3749 https://wso2.org/jira/browse/APIMANAGER-3749] -
   (Migration 1.8.0 to 1.9.0 postgre) Start-up error while migrate
   - [APIMANAGER-3751 https://wso2.org/jira/browse/APIMANAGER-3751] -
   java.sql.SQLIntegrityConstraintViolationException: ORA-1: unique
   constraint observed when adding APIs with 15 tenants concurrently
   - [APIMANAGER-3752 https://wso2.org/jira/browse/APIMANAGER-3752] -
   Cannot generate token for scopes via Store API

Improvement

   - [APIMANAGER-3488 https://wso2.org/jira/browse/APIMANAGER-3488] -
   Access-control-allow-headers wildcard
   - [APIMANAGER-3539 https://wso2.org/jira/browse/APIMANAGER-3539] -
   Need to add Tiers/Tags details to getAllPaginatedPublishedAPIs() payload
   - [APIMANAGER-3603 https://wso2.org/jira/browse/APIMANAGER-3603] - API
   store applications key generation curl requests should be displayed
   separately
   - [APIMANAGER-3682 https://wso2.org/jira/browse/APIMANAGER-3682] - Add
   breadcrumbs or back button in “edit content view” In API Documentation

New Feature

   - [APIMANAGER-3456 https://wso2.org/jira/browse/APIMANAGER-3456] -
   User password change feature for API Store
   - [APIMANAGER-3498 https://wso2.org/jira/browse/APIMANAGER-3498] -
   Create a corresponding SP when creating OAuth Application from Store UI

Task

   - [APIMANAGER-3697 https://wso2.org/jira/browse/APIMANAGER-3697] -
   Build p2-repo with released identity components
   - [APIMANAGER-3740 https://wso2.org/jira/browse/APIMANAGER-3740] -
   Provide a method in KeyManager interface to obtain Active tokens by
   Consumer Key


Distribution is available for downloading at [1]. Documentation can be
found at [2]. We encourage you to report issues, suggestions and
improvements related to API Manager through public Jira [3]. When reporting
issues, please report under version 1.9.0 Beta 3
https://wso2.org/jira/browse/APIMANAGER/fixforversion/11795

[1]
https://github.com/wso2/product-apim/releases/download/v1.9.0-Beta-3/wso2am-1.9.0.zip
[2] https://docs.wso2.com/display/AM190/WSO2+API+Manager+Documentation
[3] https://wso2.org/jira/browse/APIMANAGER

Thanks,
API Manager Team

https://wso2.org/jira/browse/APIMANAGER--
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [APIM] Need to release 4.2.0 based BAM mediator from Git

2015-05-26 Thread Amila De Silva
Hi,

To resolve the issue mentioned in [1], org.wso2.carbon.mediator.bam.config
needs to be patched. Since this component resides only on svn, it needs to
get released from repo [2].

[1] https://wso2.org/jira/browse/APIMANAGER-3611
[2] https://github.com/wso2/carbon-mediation
-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Need to release 4.2.0 based BAM mediator from Git

2015-05-26 Thread Amila De Silva
Hi Kasun,
Yes, we need to include a fix, but the component being fixed is coming from
svn (4.2.0 based one). Since components are not getting released from
svn anymore, we have to release the fixed component from Git. The plan was
to create a separate branch on carbon-mediation to keep the fixed component
and related features.

On Tuesday, May 26, 2015, Kasun Indrasiri ka...@wso2.com wrote:

 Can you elaborate please.. Do you want to include a fix to
 carbon-mediation?

 On Tue, May 26, 2015 at 6:07 PM, Amila De Silva ami...@wso2.com
 javascript:_e(%7B%7D,'cvml','ami...@wso2.com'); wrote:

 Hi,

 To resolve the issue mentioned in
 [1], org.wso2.carbon.mediator.bam.config needs to be patched. Since this
 component resides only on svn, it needs to get released from repo [2].

 [1] https://wso2.org/jira/browse/APIMANAGER-3611
 [2] https://github.com/wso2/carbon-mediation
 --
 *Amila De Silva*

 WSO2 Inc.
 mobile :(+94) 775119302


 ___
 Dev mailing list
 Dev@wso2.org javascript:_e(%7B%7D,'cvml','Dev@wso2.org');
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Kasun Indrasiri
 Software Architect
 WSO2, Inc.; http://wso2.com
 lean.enterprise.middleware

 cell: +94 77 556 5206
 Blog : http://kasunpanorama.blogspot.com/



-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [APIM] Sending specific error codes for invocation failures

2015-05-19 Thread Amila De Silva
Hi All,

This is related to resolving bug [1].

With the previous API Manager releases, when APIs are accessed using
invalid tokens, specific errors for such failures were sent. For example,
if the API was accessed using an expired token, response with 900903 as the
error code was sent, and if the failure is due to an Invalid token the
response code 900901 was sent.

In previous releases it was possible to get the token state, since we had
direct access to the DB where tokens are stored. But when providing the
ability to plug in Third party Authorization Servers, we only have access
to information exposed by the Authorization Server. According to [2], an
Authorization Server may only state the token as invalid, not exposing
specific reasons about the failure. In such cases, API Manager cannot
provide exact details on why the failure has occurred.

In a security point of view, general practice is to provide least
information about a failure, when invalid credentials are used.

To make the behaviour consistent, irrespective of whether the
 Auhtorization Server is a third party one or the default one, with 1.9.0
we’ll be sending a generic failure when the token is  invalid.

With this change the same error code (900901) will be sent, when the token
is expired or inactive.

Impact:
If there are Client Apps, that take different paths to refresh the token
depending on the error code, those have to act upon the general error code
(900901) from this release onwards. This has to be done as a part of the
migration.

Please share your thoughts on this.

[1] https://wso2.org/jira/browse/APIMANAGER-3578

[2] https://tools.ietf.org/html/draft-ietf-oauth-introspection-08

[3] https://docs.wso2.com/display/AM190/Error+Handling

-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Clarification on Key validator and Key manager server profiles.

2015-05-07 Thread Amila De Silva
Hi Sewmini,

KeyManager configuration will be mainly used when integrating with a Third
Party Authorization Server. Configuration specific to the external
Authorization Server can be provided under KeyManager section. This is
explained in doc link available at [1].

When clustering, you should only change the KeyValidator section.

Gateway should know the location of the KeyValidator, so KeyValidator
section of Gateway should be configured pointing to KeyValidator component.
Store will be talking to KeyVaidator when creating OAuth clients. Therefore
, Store should also know the location of KeyValidator.

[1]
https://docs.google.com/document/d/14y-1QmYsf2sm5n_5nFh8R4fePSxlcdMLO_J4FxTmWyc/edit

On Thu, May 7, 2015 at 3:58 PM, Sewmini Jayaweera sewm...@wso2.com wrote:

 Hi All,

 As per the offline discussion, Key validator server profile is acting as
 Key manager when there is no third party Auth server is used.

 In the API Manager 1.9.0 pack AM_HOME/repository/conf/api-manager.xml
  Key validator is enabled and Key manager is being commented out by
 default.

 1. Is there a reason why Key Manager configuration is there?
 2. If so when should we enable Key manager instead of Key validator?
 3. When we are clustering instead of changing Key manager configurations
 should we change key validation configurations and what are the
 configurations?

 Thanks  Regards,
 Sewmini

 Sewmini Jayaweera
 *Software Engineer - QA Team*
 Mobile: +94 (0) 773 381 250
 sewm...@wso2.com




-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [APIM] Modifying Key Caches on API Manager

2015-05-06 Thread Amila De Silva
Hi All,

When caching is enabled on Gateway, KeyValidationInfoDTO object is kept in
the cache against a cache key having the following structure;

cacheKey = accessToken + : + apiContext + / + apiVersion + resourceUri
+ : + httpVerb + : + authLevel;

This structure makes cache retrievals efficient, but poses several problems
when removing entries.

For example, when removing an API subscribed under an Application, we have
to delete cache entries associated with that API. But since the cache key
is a composition of several parts, finding cache entries related to a given
API is not a straightforward task.

With the existing implementation, following steps are performed when
removing entries linked with a particular API,
a. Finding all Applications the API is subscribed to
b. Getting all active tokens issued for those Applications.
c. Creating all possible cache keys that could be present in the key cache.
d. Calling cache.remove on all the keys created

Since we have access to the database in which tokens are stored, we have
the ability of finding all the tokens associated with an API. But when
having a third party Key Manager, this option won't work. Therefore a
different mechanism is needed to find Cache entries associated with an API.

Proposed solution is to introduce a second cache, which acts as an index
for the main (existing) cache. Structure of the existing cache and the
cache Key will remain the same.

*Structure of the new cache *

The combination of apicontext, version will be used as the cache key and
the entry will be an APIEntry. Structure of the APIEntry will be like this.

[image: Inline image 4]

When needed to delete cache entries for an API, first the Index cache will
be looked up using API context + version as the key. This will return all
the ApplicationEntries which are present in the main cache and also to
which the API has subscribed to. ApplicationEntry will have a list of cache
keys, which are present in the main cache, and which contains a token
obtained under the enclosing Application.

We have to add entries to the Indexing cache at the same time we add a new
entry to main cache.

Will explain how different invalidation tasks are performed by only using
these two caches in a mail to follow.

Would highly appreciate your thoughts on this approach.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Modifying Key Caches on API Manager

2015-05-06 Thread Amila De Silva
Hi Nuwan,

APIEntry was brought to the top most level, with the intention of making
the cache clearing optimal when API/Subscription update happens.
However if we are to clear the cache more efficiently while revoke and
refresh happens, then we have to think of a different structure. Then
ApplicationEntry would have to be brought to the top most level, and
ApplicationEntry would have a list of TokenEntries instead of APIEntries. A
TokenEntry being the object at the leaf level would have all the cache
keys, starting with a specific access token.

[image: Inline image 1]

I think with one type of Index we can only make one type of removal more
efficient. Either we have to choose which operation we need to make more
efficient, or else we have introduce two index caches.

AmilaD

On Wed, May 6, 2015 at 3:10 PM, Nuwan Dias nuw...@wso2.com wrote:

 This approach will work for clearing caches when an API update or an
 Application/Subscription update happens. Which are quite rare occurrences
 of a production system. IMO what happens more frequently in a running
 system is the refresh and revoke of actual end user tokens (based on the
 behaviour of the applications). I still don't see how we can easily clear a
 cache entry on that kind of a scenario through this approach. Does that
 process become easier in some way as well?

 Thanks,
 NuwanD.

 On Wed, May 6, 2015 at 7:20 PM, Sanjeewa Malalgoda sanje...@wso2.com
 wrote:

 Yes i think this should work and it will make our life easy :)

 Lets isolate user flows associated with cache. Please add if i missed
 anything.

 01. Invoke API and then we need to add validation information to cache.
 02. Delete Application -  delete all tokens associated with application
 03. Remove subscription -  remove cache entries associated with
 unsubscribed API.
 04. Remove API - remove cache entries associated with API.
 05. Regenerate access token - remove cache entry for previous token.
 06. Revoke access token - then remove all cache entries assicated with
 revoked token.
 07. Revoke access tokens by application , user - remove cache entries.

 Also as discussed need to check the effect of having 2 cache with 2
 different validity periods. And what happen if one cache expired while
 other is still pointing to it.
  Lets carefully evaluate these flows and fix this.

 Thanks,
 sanjeewa.

 On Wed, May 6, 2015 at 11:44 AM, Uvindra Dias Jayasinha uvin...@wso2.com
  wrote:

 +1, Looks good to me.

 On 6 May 2015 at 11:34, Amila De Silva ami...@wso2.com wrote:

 Hi All,

 When caching is enabled on Gateway, KeyValidationInfoDTO object is kept
 in the cache against a cache key having the following structure;

 cacheKey = accessToken + : + apiContext + / + apiVersion +
 resourceUri + : + httpVerb + : + authLevel;

 This structure makes cache retrievals efficient, but poses several
 problems when removing entries.

 For example, when removing an API subscribed under an Application, we
 have to delete cache entries associated with that API. But since the cache
 key is a composition of several parts, finding cache entries related to a
 given API is not a straightforward task.

 With the existing implementation, following steps are performed when
 removing entries linked with a particular API,
 a. Finding all Applications the API is subscribed to
 b. Getting all active tokens issued for those Applications.
 c. Creating all possible cache keys that could be present in the key
 cache.
 d. Calling cache.remove on all the keys created

 Since we have access to the database in which tokens are stored, we
 have the ability of finding all the tokens associated with an API. But when
 having a third party Key Manager, this option won't work. Therefore a
 different mechanism is needed to find Cache entries associated with an API.

 Proposed solution is to introduce a second cache, which acts as an
 index for the main (existing) cache. Structure of the existing cache and
 the cache Key will remain the same.

 *Structure of the new cache *

 The combination of apicontext, version will be used as the cache key
 and the entry will be an APIEntry. Structure of the APIEntry will be like
 this.

 [image: Inline image 4]

 When needed to delete cache entries for an API, first the Index cache
 will be looked up using API context + version as the key. This will return
 all the ApplicationEntries which are present in the main cache and also to
 which the API has subscribed to. ApplicationEntry will have a list of cache
 keys, which are present in the main cache, and which contains a token
 obtained under the enclosing Application.

 We have to add entries to the Indexing cache at the same time we add a
 new entry to main cache.

 Will explain how different invalidation tasks are performed by only
 using these two caches in a mail to follow.

 Would highly appreciate your thoughts on this approach.




 --
 Regards,
 Uvindra

 Mobile: 33962




 --

 *Sanjeewa Malalgoda*
 WSO2 Inc.
 Mobile : +94713068779

Re: [Dev] Need a clarification on APIM resource Auth Type functionality.

2015-03-30 Thread Amila De Silva
Hi Sewmini,

On Tue, Mar 31, 2015 at 10:39 AM, Sewmini Jayaweera sewm...@wso2.com
wrote:

 Hi,

 When adding an API in the manage stage user has an option to set an auth
 type for each resource [1].

 Below I have mentioned the auth types available and the functionality of
 auth types as i understood;

1. *Application* - once resource is given application auth type only
the access token of the application owner can be used to access the
particular resource.

 Once a resource is given Application auth type, it can only be accessed by
an Application Access Token. If the Application Creator gets a token
through the store UI, then the token becomes an Application Access Token.
But if the same user gets it by calling token API, token is considered as a
User Token.


1. *Application user* - Any registered user other *than application
owner* can generate access token using consumer key and secret of the
application and particular user's user credentials and can invoke resource
using the access token.
2. *None * - No access tokens are required in order to access
resources having non auth type.

 Can someone please tell me whether above mentioned functionality is
 correct, if so in a scenario where resource is given 'application user'
 auth type why can't application owner act as an application user ?

 [1]
 https://docs.wso2.com/download/attachments/41747085/API-resources.png?version=1modificationDate=1410272431000api=v2

 ThankS  Regards,
 Sewmini


 Sewmini Jayaweera
 *Software Engineer - QA Team*
 Mobile: +94 (0) 773 381 250
 sewm...@wso2.com




-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Clarification about APIM Tier : throttle:MaximumCount

2015-03-18 Thread Amila De Silva
Hi Saneth,

In a clustered environment, the cutoff might not exactly happen on 51st
request. Certain amount of requests may slip through. The amount of
additional requests passing through depends on several parameters like the
number of GW nodes running on the setup, replication frequency set and the
amount of requests hitting the GWs.

On a standalone environment, the cutoff should happen on 51st request.

On Wed, Mar 18, 2015 at 6:50 PM, Saneth Dharmakeerthi sane...@wso2.com
wrote:

 Hi APIM Team,

 I need to clarify some information about *throttle:MaximumCount*

 If Tier  throttle:MaximumCount is set to 20 and UnitTime is  set to 6
 (assume we apply bellow throttle value to all API-level, Application-level
 and Resource-level )
 ex:
throttle:MaximumCount50/throttle:MaximumCount
throttle:UnitTime6/throttle:UnitTime

1. whether the api invocation cut off exactly from 51th request
within 6 milliseconds ?
2. If not, is there any percentage or amount that it can accept
 additional requests?

 Also if there is a document that has detail information about this, please
 share with me.

 Thanks and Best Regards,

 Saneth Dharmakeerthi
 Senior Software Engineer
 WSO2, Inc.
 Mobile: +94772325511




-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Using OAuth2TokenValidationService to validate keys in API Invocations

2015-02-05 Thread Amila De Silva
Hi All,
Instead of switching to OAuth2TokenValidationService, we'll be sticking
with APIKeyValidationService.

On Mon, Sep 15, 2014 at 5:07 PM, Amila De Silva ami...@wso2.com wrote:

 Hi,

 As a part of decoupling Authorization Server from API Manager, the
 capability should be provided to customise token validation step. Since the
 OAuth2TokenValidationService, defined in org.wso2.carbon.identity.oauth2
 component already supports executing additional validation steps, this
 service will be used for validating tokens for API invocations in future.

 Before using this service certain changes needs to be done;

 1. The existing service for Key Validation returns certain details as
 subscriber, Application Tier, subscribed Tier, API Owner which are used to
 Throttle API calls and to publish statistics. If we are to pass these
 details when using OAuth2TokenValidationService, the response DTO
 (OAuth2TokenValidationResponseDTO) should be modified to pass custom
 attributes.

 2. OAuth2TokenValidationService have two operations - validate and
 findOAuthConsumerIfTokenIsValid. The latter, retrieves a token stored in
 IDN_OAUTH2_ACCESS_TOKEN table and verifies if it’s obtained for a
 registered client App. Validate operation calls this method before sending
 the response. This behaviour too needs to be changed because, when using an
 external Authorization Server, the token will not be stored in our side.

 --
 *Amila De Silva*

 WSO2 Inc.
 mobile :(+94) 775119302




-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][APIM] CallerContext being null when retrieved from a ConcurrentHashMap

2014-11-21 Thread Amila De Silva
Hi Sanjeewa,
I think increasing internal parameters would help when API calls are
happening from lot of different tokens. In the test, I only invoked one API
using one token which means that only one segment of the CHM, will be
always accessed and  all the threads will try to lock the same segment all
the time. So I don't think, increasing concurrency Level would help at this
point.

While reading about this issue, came across several articles mentioning
that map.get() could return a null, if it's overlapped with a remove or an
update operation. I tried reducing the number of places where values are
written to map and now  throttling out happens more consistently. But still
there a lot of threads seeing null, when getting CallerContext from the map.

On Fri, Nov 21, 2014 at 11:40 AM, Sanjeewa Malalgoda sanje...@wso2.com
wrote:



 On Fri, Nov 21, 2014 at 10:23 AM, Amila De Silva ami...@wso2.com wrote:

 Hi,

 I encountered the following problem while working on [1]

 As to provide some context on the problem. This problem is related to
 throttling API calls  Gateway. In Gateway, throttle counts for API
 invocations are maintained by creating a CallerContext
 https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/throttling/org.wso2.carbon.throttle.core/4.2.0/src/main/java/org/wso2/carbon/throttle/core/CallerContext.java
 object for each unique accesstoken+apicontext+version combination. Such
 created CallerContexts are kept in a Concurrent HashMap to allow multiple
 threads read and update throttle counts.

  When a request passes through the Throttle Handler, it'll first get the
 correct CallerContext from the map and then increment it's count. If the
 key returns a null value,then a new CallerContext will be created and
 stored in the HashMap against the same key. It was written in this way
 assuming that null is only returned in the first invocation (return of null
 value is used to initialise the CallerContext).

 The problem is, under a considerable load, HashMap.get() returns a null
 despite the object being present. Since a new CallerContext is created and
 stored  upon seeing a null value,  the original object gets overwritten
 messing up throttling limits for the particular API.

 To prevent CallerContext being overwritten, HashMap.putIfAbsent() was
 used instead of put(). But still the problem with HashMap.get() being null
 couldn't be solved. Earlier there was one place where entries are removed
 from the map , but this is still present even after removing all the
 deletions.

 IMO caller context should be overwritten for each and every call we made.
 Otherwise counters will not update properly and will end up with messed up
 throttle counters, time values etc. WDYT?
 And i read that default concurrency level(shards) for concurrent hashmap
 is 16 and sometimes number of synapse worker threads(number of writer
 threads in this case to hash map) can be more than that. It seems this is
 interesting issue and need to read bit. May be we can change internalizing
 parameters (initialCapacity, loadFactor, concurrencyLevel) and run some
 other tests.

 Thanks,
 sanjeewa.

 One possible way to overcome this is to synchronize all the puts and gets
 using the same key (which might degrade performance).

 Has anyone come across a similar issue?

 [1] https://wso2.org/jira/browse/APIMANAGER-3075
 --
 *Amila De Silva*

 WSO2 Inc.
 mobile :(+94) 775119302




 --

 *Sanjeewa Malalgoda*
 WSO2 Inc.
 Mobile : +94713068779

  http://sanjeewamalalgoda.blogspot.com/blog
 :http://sanjeewamalalgoda.blogspot.com/
 http://sanjeewamalalgoda.blogspot.com/





-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [DEV][APIM] CallerContext being null when retrieved from a ConcurrentHashMap

2014-11-20 Thread Amila De Silva
Hi,

I encountered the following problem while working on [1]

As to provide some context on the problem. This problem is related to
throttling API calls  Gateway. In Gateway, throttle counts for API
invocations are maintained by creating a CallerContext
https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/throttling/org.wso2.carbon.throttle.core/4.2.0/src/main/java/org/wso2/carbon/throttle/core/CallerContext.java
object for each unique accesstoken+apicontext+version combination. Such
created CallerContexts are kept in a Concurrent HashMap to allow multiple
threads read and update throttle counts.

 When a request passes through the Throttle Handler, it'll first get the
correct CallerContext from the map and then increment it's count. If the
key returns a null value,then a new CallerContext will be created and
stored in the HashMap against the same key. It was written in this way
assuming that null is only returned in the first invocation (return of null
value is used to initialise the CallerContext).

The problem is, under a considerable load, HashMap.get() returns a null
despite the object being present. Since a new CallerContext is created and
stored  upon seeing a null value,  the original object gets overwritten
messing up throttling limits for the particular API.

To prevent CallerContext being overwritten, HashMap.putIfAbsent() was used
instead of put(). But still the problem with HashMap.get() being null
couldn't be solved. Earlier there was one place where entries are removed
from the map , but this is still present even after removing all the
deletions.

One possible way to overcome this is to synchronize all the puts and gets
using the same key (which might degrade performance).

Has anyone come across a similar issue?

[1] https://wso2.org/jira/browse/APIMANAGER-3075
-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] APIM requirment

2014-11-17 Thread Amila De Silva
Hi Susinda,

Seems the only option available is what you are doing now - check the role
using a custom WorkflowExecutor. You can keep the role name as a field in
your custom executor. If you provide the role name as a property in your
workflow config, WorkflowFactory will read that value and populate the
field at the time of instantiating the class.

On Tue, Nov 18, 2014 at 1:38 AM, Susinda Perera susi...@wso2.com wrote:

 Aslo this ldap group should be configurable.


 On Tue, Nov 18, 2014 at 1:36 AM, Susinda Perera susi...@wso2.com wrote:

 Hi All

 We there a requirement on keeping all apis public(anyone can see) but
 when you going to subscribe, it needs to be checked against a particular
 ldap group to check weather that subscriber belongs to that group. If so
 subscription is approved else not.

 What are the different approaches we can employ to achieve this?.
 Currently we are trying on custom subscription executor. Is there any other
 means to handle this? Appreciate your thoughts.

 Thanks


 --
 *Susinda Perera*
 Software Engineer
 Mobile:(+94)716049075

 WSO2 Inc. http://wso2.com/
 Tel : 94 11 214 5345 Fax :94 11 2145300




 --
 *Susinda Perera*
 Software Engineer
 Mobile:(+94)716049075

 WSO2 Inc. http://wso2.com/
 Tel : 94 11 214 5345 Fax :94 11 2145300




-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Authorization Server Decoupling - Changes on Gateway

2014-09-25 Thread Amila De Silva
On Wed, Sep 24, 2014 at 10:48 PM, Sumedha Rubasinghe sume...@wso2.com
wrote:



 On Wed, Sep 24, 2014 at 4:25 PM, Amila De Silva ami...@wso2.com wrote:

 Hi,

 Following are changes done up to now on the Gateway, as a part of
 decoupling AS from API Manager.

 1. Using OAuth2TokenValidationService to validate Access Tokens

 a. APIMgtTokenValidator is the default implementation provided for
 OAuth2TokenValidator, which only overrides the validateScope and
 validateAccessToken methods. All the sub steps related to token validation
 will have to be performed in validateAccessToken method.

 b. To make a clear distinction between the different steps involved in
 token validation, a second Handler  - KeyValidationHandler has been
 introduced. This is an interface having methods
 validateToken(),validateSubscription,validateScopes(),
 generateConsumerToken(). This will be the interface developers have to
 extend when plugging an external Authorization Server. APIMgtTokenValidator
 will execute all the methods defined in KeyValidationHandler inside its
 validateAccessToken method.

 2.  Modifying OAuth2TokenValidationResponseDTO to pass an Array of Name
 Value pairs

 Gateway relies on several parameters like Application Name, Application
 Tier, API Tier to throttle API Calls and publish statistics.
 APIKeyValidationInfoDTO which is being used now, has separate fields to
 represent these parameters.When switching to  OAuth2TokenValidationService,
 we’ll have to use  OAuth2TokenValidationResponseDTO and then these
 parameters will be passed as an array of custom name value pairs.


 This would break backward compatibility, If there are clients who are
 using our token endpoint  to get tokens validated.

You mean the clients calling OAuth2TokenValidationService service (the one
exposed by IS)?


 3. Adding Util methods to convert APIKeyValidationInfoDTO

 For their internal operations Gateway and KeyManager uses
 APIKeyValidationInfoDTO objects.

 It is these types of objects being kept in KeyManager and Gateway caches,
 it is the same type being passed across different methods when validating
 keys and JWTs and this used to be the type returned when calling
 validateKey method in APIKeyValidationService. But when switching to
 OAuth2TokenValidationService, since the response it returns is a
 OAuth2TokenValidationResponseDTO ,several util methods were added to
 convert APIKeyValidationInfoDTO to OAuth2TokenValidationResponseDTO and
 vice versa.

 Will provide some sequence diagrams illustrating the flow for a key
 validation call.
 --
 *Amila De Silva*

 WSO2 Inc.
 mobile :(+94) 775119302




 --
 /sumedha
 m: +94 773017743
 b :  bit.ly/sumedha




-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Authorization Server Decoupling - Changes on Gateway

2014-09-25 Thread Amila De Silva
We don't expose a validation API in Gateway.External clients will not call
directly to the token validation service exposed by the Key Manager. Only
the Gateway will consume this service. Since this service is only invoked
during an API invocation, and GW and Key Manager should be of the same
version, I don't thing there can be a compatibility issue.

On Thu, Sep 25, 2014 at 12:15 AM, Sumedha Rubasinghe sume...@wso2.com
wrote:

 No. The one exposed by API Gateway.

 On Thu, Sep 25, 2014 at 1:59 AM, Amila De Silva ami...@wso2.com wrote:



 On Wed, Sep 24, 2014 at 10:48 PM, Sumedha Rubasinghe sume...@wso2.com
 wrote:



 On Wed, Sep 24, 2014 at 4:25 PM, Amila De Silva ami...@wso2.com wrote:

 Hi,

 Following are changes done up to now on the Gateway, as a part of
 decoupling AS from API Manager.

 1. Using OAuth2TokenValidationService to validate Access Tokens

 a. APIMgtTokenValidator is the default implementation provided for
 OAuth2TokenValidator, which only overrides the validateScope and
 validateAccessToken methods. All the sub steps related to token validation
 will have to be performed in validateAccessToken method.

 b. To make a clear distinction between the different steps involved in
 token validation, a second Handler  - KeyValidationHandler has been
 introduced. This is an interface having methods
 validateToken(),validateSubscription,validateScopes(),
 generateConsumerToken(). This will be the interface developers have to
 extend when plugging an external Authorization Server. APIMgtTokenValidator
 will execute all the methods defined in KeyValidationHandler inside its
 validateAccessToken method.

 2.  Modifying OAuth2TokenValidationResponseDTO to pass an Array of Name
 Value pairs

 Gateway relies on several parameters like Application Name, Application
 Tier, API Tier to throttle API Calls and publish statistics.
 APIKeyValidationInfoDTO which is being used now, has separate fields to
 represent these parameters.When switching to  OAuth2TokenValidationService,
 we’ll have to use  OAuth2TokenValidationResponseDTO and then these
 parameters will be passed as an array of custom name value pairs.


 This would break backward compatibility, If there are clients who are
 using our token endpoint  to get tokens validated.

 You mean the clients calling OAuth2TokenValidationService service (the
 one exposed by IS)?


 3. Adding Util methods to convert APIKeyValidationInfoDTO

 For their internal operations Gateway and KeyManager uses
 APIKeyValidationInfoDTO objects.

 It is these types of objects being kept in KeyManager and Gateway
 caches, it is the same type being passed across different methods when
 validating keys and JWTs and this used to be the type returned when calling
 validateKey method in APIKeyValidationService. But when switching to
 OAuth2TokenValidationService, since the response it returns is a
 OAuth2TokenValidationResponseDTO ,several util methods were added to
 convert APIKeyValidationInfoDTO to OAuth2TokenValidationResponseDTO and
 vice versa.

 Will provide some sequence diagrams illustrating the flow for a key
 validation call.
 --
 *Amila De Silva*

 WSO2 Inc.
 mobile :(+94) 775119302




 --
 /sumedha
 m: +94 773017743
 b :  bit.ly/sumedha




 --
 *Amila De Silva*

 WSO2 Inc.
 mobile :(+94) 775119302




 --
 /sumedha
 m: +94 773017743
 b :  bit.ly/sumedha




-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [APIM] Authorization Server Decoupling - Changes on Gateway

2014-09-24 Thread Amila De Silva
Hi,

Following are changes done up to now on the Gateway, as a part of
decoupling AS from API Manager.

1. Using OAuth2TokenValidationService to validate Access Tokens

a. APIMgtTokenValidator is the default implementation provided for
OAuth2TokenValidator, which only overrides the validateScope and
validateAccessToken methods. All the sub steps related to token validation
will have to be performed in validateAccessToken method.

b. To make a clear distinction between the different steps involved in
token validation, a second Handler  - KeyValidationHandler has been
introduced. This is an interface having methods
validateToken(),validateSubscription,validateScopes(),
generateConsumerToken(). This will be the interface developers have to
extend when plugging an external Authorization Server. APIMgtTokenValidator
will execute all the methods defined in KeyValidationHandler inside its
validateAccessToken method.

2.  Modifying OAuth2TokenValidationResponseDTO to pass an Array of Name
Value pairs

Gateway relies on several parameters like Application Name, Application
Tier, API Tier to throttle API Calls and publish statistics.
APIKeyValidationInfoDTO which is being used now, has separate fields to
represent these parameters.When switching to  OAuth2TokenValidationService,
we’ll have to use  OAuth2TokenValidationResponseDTO and then these
parameters will be passed as an array of custom name value pairs.

3. Adding Util methods to convert APIKeyValidationInfoDTO

For their internal operations Gateway and KeyManager uses
APIKeyValidationInfoDTO objects.

It is these types of objects being kept in KeyManager and Gateway caches,
it is the same type being passed across different methods when validating
keys and JWTs and this used to be the type returned when calling
validateKey method in APIKeyValidationService. But when switching to
OAuth2TokenValidationService, since the response it returns is a
OAuth2TokenValidationResponseDTO ,several util methods were added to
convert APIKeyValidationInfoDTO to OAuth2TokenValidationResponseDTO and
vice versa.

Will provide some sequence diagrams illustrating the flow for a key
validation call.
-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [APIM] Using OAuth2TokenValidationService to validate keys in API Invocations

2014-09-15 Thread Amila De Silva
Hi,

As a part of decoupling Authorization Server from API Manager, the
capability should be provided to customise token validation step. Since the
OAuth2TokenValidationService, defined in org.wso2.carbon.identity.oauth2
component already supports executing additional validation steps, this
service will be used for validating tokens for API invocations in future.

Before using this service certain changes needs to be done;

1. The existing service for Key Validation returns certain details as
subscriber, Application Tier, subscribed Tier, API Owner which are used to
Throttle API calls and to publish statistics. If we are to pass these
details when using OAuth2TokenValidationService, the response DTO
(OAuth2TokenValidationResponseDTO) should be modified to pass custom
attributes.

2. OAuth2TokenValidationService have two operations - validate and
findOAuthConsumerIfTokenIsValid. The latter, retrieves a token stored in
IDN_OAUTH2_ACCESS_TOKEN table and verifies if it’s obtained for a
registered client App. Validate operation calls this method before sending
the response. This behaviour too needs to be changed because, when using an
external Authorization Server, the token will not be stored in our side.

-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] {chunk 13 packs}-14-09-2014/

2014-09-14 Thread Amila De Silva
Hi,
Added the config element mentioned in [1] to specify a custom JWTGenerator.
However, the default implementation will be picked if this change is absent.


[1] https://wso2.org/jira/browse/APIMANAGER-2711

On Mon, Sep 15, 2014 at 9:18 AM, Pavithra Madurangi pavit...@wso2.com
wrote:

 Hi Ratha,

 In the latest build, observed that configuration for self sign up to the
 store is missing from api-manager.xml (below config). Any particular reason
 for that?

 !--
 Use this configuration to control the self-sign-up capability in
 API store.
 --
 SelfSignUp
 !--
 Enable or disable the self-sign-up feature.
 --
 Enabledtrue/Enabled

 !--
 Self signed up users should be associated with a suitable
 subscriber
 role for them to be able to access the API store portal. This
 required
 parameter specifies which role should be used for that
 purpose. The role
 specified here must have the
 '/permission/admin/manage/api/subscribe'
 permission.
 --
 SubscriberRoleNamesubscriber/SubscriberRoleName
 /SelfSignUp

 On Mon, Sep 15, 2014 at 7:05 AM, Evanthika Amarasiri evanth...@wso2.com
 wrote:

 Meaning, have you introduced new configurations since the  last release?
 We are planning to replace the packs and copy the conf folder in the setup
 we have done. But last time we noticed you have introduced two new
 parameters to registry.xml  api manager.xmls.
 Hence the question.


 On Monday, September 15, 2014, Vijayaratha Vijayasingam rat...@wso2.com
 wrote:

 What type of config change you mean?

 BTW, p2 repo is here[1] (not in the same folder since i got some svn
 conflicts).
 @Pavithra, i will check the p2 issue you reported..

 [1]
 https://svn.wso2.org/repos/wso2/scratch/chunk13-release/14_09_2014_p2/

 Thanks

 On 14 September 2014 22:37, Evanthika Amarasiri evanth...@wso2.com
 wrote:

 Hi Ratha,

 Have you guys done any configuration changes since the day you released
 4th September packs?

 Regards,
 Evanthika

 On Sun, Sep 14, 2014 at 10:21 PM, Vijayaratha Vijayasingam 
 rat...@wso2.com wrote:

 Please find here;
 https://svn.wso2.org/repos/wso2/scratch/chunk13-release/14-09-2014/

 Will commit p2 repo soon..

 Thanks..

 --
 -Ratha





 --
 -Ratha



 --
 Regards,
 Evanthika Amarasiri
 Senior Technical Lead - Quality Assurance
 Mobile: +94773125935

 wso2.com lean.enterprise.middleware


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




 --
 *Pavithra Madurangi*
 Associate Technical Lead - QA.
 WSO2 Inc.: http://wso2.com/
 Mobile: +94777207357 / +94773814110

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




-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] api manager clustering

2014-07-29 Thread Amila De Silva
(StartLevelManager.java:243)
 at
 org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
 at
 org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
 at
 org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
 at
 org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)



 what should i do for this...???

 please check attachment files for full log trace of all four server
 components...

 Regards,

 Akila





 *From:* Udara Liyanage [mailto:ud...@wso2.com]
 *Sent:* Monday, July 21, 2014 12:06 PM
 *To:* Akila Nimantha [IT/EKO/LOITS]
 *Cc:* dev@wso2.org
 *Subject:* Re: [Dev] api manager clustering



 Hi Akila,



 AFAIK it is not mandatory to start the well- know member first. So the
 starting order might not be an issue.



 On Mon, Jul 21, 2014 at 9:53 AM, Akila Nimantha [IT/EKO/LOITS] 
 aki...@lolctech.com wrote:

  Hi all,


 I tried configure api manger clustering using document,
 https://docs.wso2.com/display/CLUSTER420/Clustering+API+Manager . also I
 used freshly downloaded api manager 1.7.0 version. “I tried to setup
 Minimum cluster with an external store”  without load balancer pattern.  My
 problem is, After don setup configurations which server I should start
 first or is there a order for start servers. ?? Regards, Akila.


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





 --


 Udara Liyanage

 Software Engineer

 WSO2, Inc.: http://wso2.com

 lean. enterprise. middleware

 web: http://udaraliyanage.wordpress.com

 phone: +94 71 443 6897

 This message (including any attachments) is intended only for the use of
 the individual or entity to which it is addressed and may contain
 information that is non-public, proprietary, privileged, confidential, and
 exempt from disclosure under applicable law or may constitute as attorney
 work product. If you are not the intended recipient, you are hereby
 notified that any use, dissemination, distribution, or copying of this
 communication is strictly prohibited. If you have received this
 communication in error, notify us immediately by telephone and (i) destroy
 this message if a facsimile or (ii) delete this message immediately if this
 is an electronic communication. Thank you.

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




-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM] Gateway-manager profile is not included in the registry.xml's index configurations

2014-06-14 Thread Amila De Silva
Hi Nirmal,
Currently, Indexer is only run in the profiles , where we have to change or
view the registry artifact. In Gateway Manager, we don't have the need of
displaying APIs or editing them. In Gateway we might need to change the
synapse xml related to that, but the registry artifact. It's for this
reason, only  default, api-store and api-publisher are given under the
indexer.


On Sun, Jun 15, 2014 at 8:06 AM, Nirmal Fernando nir...@wso2.com wrote:

 Hi All,

 $Subject. Due to this, we can't see APIs under Metadata - List - APIs of
 API Manager Gateway-manager profile.

 eg:

 indexer
 class=org.wso2.carbon.governance.registry.extensions.indexers.RXTIndexer
 mediaTypeRegEx=application/vnd.(.)+\+xml profiles
 =default,api-store,api-publisher/

 Fix:
 indexer
 class=org.wso2.carbon.governance.registry.extensions.indexers.RXTIndexer
 mediaTypeRegEx=application/vnd.(.)+\+xml profiles
 =default,api-store,api-publisher,gateway-manager/



 --

 Thanks  regards,
 Nirmal

 Senior Software Engineer- Platform Technologies Team, WSO2 Inc.
 Mobile: +94715779733
 Blog: http://nirmalfdo.blogspot.com/





-- 
*Amila De Silva*

WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] java.io.NotSerializableException: org.wso2.carbon.identity.application.common.model.IdentityProvider when adding a tenant in AM cluster

2014-05-08 Thread Amila De Silva
)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 at
 org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:100
 4)
 at
 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.jav
 a:589)
 at
 org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
 at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
 at java.lang.Thread.run(Thread.java:722)

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




-- 
*Amila De Silva*

*Software Engineer*
WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [BPS]Error while invoking a callback service from a BPEL

2014-03-17 Thread Amila De Silva
(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

-- 
*Amila De Silva*

*Software Engineer*
WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Moving Workflow configurations to Registry

2014-03-10 Thread Amila De Silva
Hi,

Currently the configuration for Workflow Executors are kept in the
api-manager.xml due to which all the tenants living in a APIM Deployment
have to use the same executors defined by the Super Tenant Admin. To allow
Tenants configure their own executors, Workflow Configurations will be
moved to the Registry.

Following places will be changed when accommodating this;

1. With the existing implementation, Workflow Executor Factory reads the
config and maintains  a map for different executors needed by each Workflow
Type. This factory will be changed to hold Workflows defined by each
different tenant.

2. At present, the configuration is read only at the start up.  When moving
those to the registry, users will be able to change them at any moment and
the data structure created out of the configs will have to be updated
reflecting the changes. This will be done using a Registry Handler.

3. To reduce frequent accesses of the registry resource, the data structure
created out by parsing the config will be cached. The new registry handler
which gets called upon updating the config will be responsible for
invalidating the cache.

Comments are welcome.

-- 
*Amila De Silva*

*Software Engineer*
WSO2 Inc.
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM 1.5.0 ] APIs are not visible on the store and registry for 15 minutes. Only shown in the recently added and when you click on the tags

2013-10-09 Thread Amila De Silva
Hi Ushani,
Among which nodes did you try syncing up the tiers.xml? I tried the same
between Publisher and Store nodes, and a change made by one node gets
immediately reflected on the other when registry caching is disabled. Can
you please attach the registry.xml?

AmilaD


On Wed, Oct 9, 2013 at 8:50 PM, Ushani Balasooriya ush...@wso2.com wrote:

 15 minutes latency to populate changes is discovered when editing
 tiers.xml as well. As a solution changed the registry caching to disabled
 in registry.xml. But still the same issue is discovered. Is this 15 minutes
 configurable? If so where?


 On Wed, Oct 9, 2013 at 6:38 PM, Nuwan Silva nuw...@wso2.com wrote:

 Same behaviour noticed in Greg testing as well.


 On Wed, Oct 9, 2013 at 5:57 PM, Ushani Balasooriya ush...@wso2.comwrote:


 Following behavior can be seen in the store in set up done by the 8th
 Oct Pack:

 For  Super tenant mode :

 1. Created few APIs and published them. After like 15 minutes APIs were
 visible on the store at once with tags and also in the recently added
 section.
 2. But suddenly APIs went missing from the store, but available only in
 the recently added section and the tags of it. Intermittently it starts
 showing one API.
 3. It takes time to update the registry as well.
 4. Once the APIs started listing down in the registry only they will be
 available in the store recently added section, tags and in search results.
 but still it will not be available in the store main listing as given in
 the attachment.


 Issue which was reported [1] against a previous old pack is reopened.
 Pls have a look.

 [1] https://wso2.org/jira/browse/APIMANAGER-1725

 Regards,
 --
 *Ushani Balasooriya*
 Software Engineer - QA;
 WSO2 Inc; http://www.wso2.com/.
 Mobile; +94772636796


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




 --
 *
 *
 *Nuwan Silva
 *
 *Senior Software Engineer - QA*
 Mobile: +94779804543

 WSO2 Inc.
 lean . enterprise . middlewear.
 http://www.wso2.com




 --
 *Ushani Balasooriya*
 Software Engineer - QA;
 WSO2 Inc; http://www.wso2.com/.
 Mobile; +94772636796


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




-- 
*Amila De Silva*
*
*
*Software Engineer*
WSO2 Inc.*
*
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM 1.5.0 ] APIs are not visible on the store and registry for 15 minutes. Only shown in the recently added and when you click on the tags

2013-10-09 Thread Amila De Silva
Please change the following block and see. You might need to change this
one all the relevant nodes (i.e. GW,Store, Publisher)
currentDBConfigwso2registry/currentDBConfig
readOnlyfalse/readOnly
*enableCachefalse/enableCache*
registryRoot//registryRoot


On Wed, Oct 9, 2013 at 10:46 PM, Chamara Ariyarathne chama...@wso2.comwrote:

 Here is the store's registry.xml


 On Wed, Oct 9, 2013 at 10:35 PM, Amila De Silva ami...@wso2.com wrote:

 Hi Ushani,
 Among which nodes did you try syncing up the tiers.xml? I tried the same
 between Publisher and Store nodes, and a change made by one node gets
 immediately reflected on the other when registry caching is disabled. Can
 you please attach the registry.xml?

 AmilaD


 On Wed, Oct 9, 2013 at 8:50 PM, Ushani Balasooriya ush...@wso2.comwrote:

 15 minutes latency to populate changes is discovered when editing
 tiers.xml as well. As a solution changed the registry caching to disabled
 in registry.xml. But still the same issue is discovered. Is this 15 minutes
 configurable? If so where?


 On Wed, Oct 9, 2013 at 6:38 PM, Nuwan Silva nuw...@wso2.com wrote:

 Same behaviour noticed in Greg testing as well.


 On Wed, Oct 9, 2013 at 5:57 PM, Ushani Balasooriya ush...@wso2.comwrote:


 Following behavior can be seen in the store in set up done by the 8th
 Oct Pack:

 For  Super tenant mode :

 1. Created few APIs and published them. After like 15 minutes APIs
 were visible on the store at once with tags and also in the recently added
 section.
 2. But suddenly APIs went missing from the store, but available only
 in the recently added section and the tags of it. Intermittently it starts
 showing one API.
 3. It takes time to update the registry as well.
 4. Once the APIs started listing down in the registry only they will
 be available in the store recently added section, tags and in search
 results. but still it will not be available in the store main listing as
 given in the attachment.


 Issue which was reported [1] against a previous old pack is reopened.
 Pls have a look.

 [1] https://wso2.org/jira/browse/APIMANAGER-1725

 Regards,
 --
 *Ushani Balasooriya*
 Software Engineer - QA;
 WSO2 Inc; http://www.wso2.com/.
 Mobile; +94772636796


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




 --
 *
 *
 *Nuwan Silva
 *
 *Senior Software Engineer - QA*
 Mobile: +94779804543

 WSO2 Inc.
 lean . enterprise . middlewear.
 http://www.wso2.com




 --
 *Ushani Balasooriya*
 Software Engineer - QA;
 WSO2 Inc; http://www.wso2.com/.
 Mobile; +94772636796


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




 --
 *Amila De Silva*
 *
 *
 *Software Engineer*
  WSO2 Inc.*
 *
 mobile :(+94) 775119302


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




 --
 *Chamara Ariyarathne*
 Senior Software Engineer - QA;
 WSO2 Inc; http://www.wso2.com/.
 Mobile; *+94772786766*




-- 
*Amila De Silva*
*
*
*Software Engineer*
WSO2 Inc.*
*
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] SSO issue for tenant users

2013-10-08 Thread Amila De Silva
Hi,
Can't we take out the registry loading out of the sso hostobject and do it
from the acs.jag ? The thing is when populating the store/publisher for a
tenant we somehow have to load the tenant registry and doing it in the sso
hostobject would only incur an additional cost. When loading tenant
registries in store/publisher, we keep track of which registries have been
already loaded so when a different user from the same tenant logs in, we
can avoid loading it for a second time.

AmilaD


On Tue, Oct 8, 2013 at 7:35 PM, Sumedha Rubasinghe sume...@wso2.com wrote:

 How this is working for two web apps (store , publisher) in API Manager?


 On Tue, Oct 8, 2013 at 5:57 PM, Ranga Siriwardena ra...@wso2.com wrote:

 Hi devs,

 We are using sso hostobject  for appfactory sso purpose. We encountered
 $Subject when login as a tenant user. Following are the issues encountered.

 - tenant registry is not loaded during the signature validation phase
 - decode method is not compatible  with encode mechanism

 We were able to get rid of this issue by loading tenant registry inside
 hostobject (here we load tenant registry before signature validation) and
 fixing decode method. Hope this issue will effect anyone who use sso
 hostobject hence we need to commit this fix to current branch. Could some
 one from IS team please review and commit this fix in[1].  Please let us
 know if there is better ways to get rid of these issues as well.

 [1] https://wso2.org/jira/browse/IDENTITY-1858

 Thank You.
 Ranga.
 --
 Ranga Siriwardena
 Software Engineer
 WSO2 Inc.




 --
 /sumedha
 m: +94 773017743
 b :  bit.ly/sumedha

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




-- 
*Amila De Silva*
*
*
*Software Engineer*
WSO2 Inc.*
*
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Getting a Constraint Violation Exception when invoking an API in the gateway worker

2013-09-08 Thread Amila De Silva
On Sun, Sep 8, 2013 at 7:44 PM, Senaka Fernando sen...@wso2.com wrote:

 Hi Amila,

 Configuration looks good. Got a few questions regarding the worker's setup.

 1. Did you first create the tenant on the manager and then setup the
 worker?

Tenant was created after setting up both the worker and manager. However
the tenant was created in the key manager, which also have the same
mounting configs.

 2. Did you take a copy of the manager's DB and setup the worker (for the
 local H2 database)?

A fresh APIM pack was used for creating the worker. The first few times
this error was encountered, the local H2 db was deleted and re-created.

 3. Was the config/governance registry Database previously or parallely
 used for some other deployment?

These databases are exclusively used this particular setup.




 Also, please look into what Sumedha is mentioning.

 Thanks,
 Senaka.


 On Sun, Sep 8, 2013 at 10:11 AM, Amila De Silva ami...@wso2.com wrote:

 Hi Senaka,
 Mounts were created for both Config and Governance spaces. I have
 attached the configurations files of the failing node.

 AmilaD


 On Sat, Sep 7, 2013 at 10:07 PM, Senaka Fernando sen...@wso2.com wrote:

 Hi Amila,

 This is most probably a result of improper mounting configurations. Can
 you please explain how the mounts were setup and how the registry databases
 were configured?

 Thanks,
 Senaka.


 On Sat, Sep 7, 2013 at 12:40 AM, Amila De Silva ami...@wso2.com wrote:

 Hi,
 I'm getting the following exception when invoking an API in a
 distributed APIM setup. In the deployment, we have two gateway nodes, one
 serving as a manager and the other as the worker. Published APIs are first
 deployed on the manager node and then propagated to the worker node
  through the svn deployment synchronizer.
 This was only observed when invoking an API created by a tenant.

 [2013-09-06 18:41:29,653] ERROR - JDBCResourceDAO Failed to add
 resource to path /. Referential integrity constraint violation:
 REG_RESOURCE_FK_BY_PATH_ID: PUBLIC.REG_RESOURCE FOREIGN KEY(REG_PATH_ID,
 REG_TENANT_ID) REFERENCES PUBLIC.REG_PATH(REG_PATH_ID, REG_TENANT_ID); SQL
 statement:
 INSERT INTO REG_RESOURCE (REG_PATH_ID, REG_NAME, REG_MEDIA_TYPE,
 REG_CREATOR, REG_CREATED_TIME, REG_LAST_UPDATOR, REG_LAST_UPDATED_TIME,
 REG_DESCRIPTION, REG_TENANT_ID, REG_UUID) VALUES (?, ?, ?, ?, ?, ?, ?, ?,
 ?, ?) [23002-140]
 org.h2.jdbc.JdbcSQLException: Referential integrity constraint
 violation: REG_RESOURCE_FK_BY_PATH_ID: PUBLIC.REG_RESOURCE FOREIGN
 KEY(REG_PATH_ID, REG_TENANT_ID) REFERENCES PUBLIC.REG_PATH(REG_PATH_ID,
 REG_TENANT_ID); SQL statement:
 INSERT INTO REG_RESOURCE (REG_PATH_ID, REG_NAME, REG_MEDIA_TYPE,
 REG_CREATOR, REG_CREATED_TIME, REG_LAST_UPDATOR, REG_LAST_UPDATED_TIME,
 REG_DESCRIPTION, REG_TENANT_ID, REG_UUID) VALUES (?, ?, ?, ?, ?, ?, ?, ?,
 ?, ?) [23002-140]
  at
 org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
 at org.h2.message.DbException.get(DbException.java:167)
  at org.h2.message.DbException.get(DbException.java:144)
 at
 org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:329)
  at
 org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:271)
 at org.h2.table.Table.fireConstraints(Table.java:801)
  at org.h2.table.Table.fireAfterRow(Table.java:818)
 at org.h2.command.dml.Insert.insertRows(Insert.java:122)
  at org.h2.command.dml.Insert.update(Insert.java:82)
 at org.h2.command.CommandContainer.update(CommandContainer.java:70)
  at org.h2.command.Command.executeUpdate(Command.java:199)
 at
 org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:141)
  at
 org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:127)
 at
 org.wso2.carbon.registry.core.jdbc.dao.JDBCResourceDAO.addResourceWithoutContentId(JDBCResourceDAO.java:1391)
  at
 org.wso2.carbon.registry.core.jdbc.dao.JDBCResourceDAO.addRoot(JDBCResourceDAO.java:445)
 at
 org.wso2.carbon.registry.core.session.UserRegistry.addRootCollection(UserRegistry.java:365)
  at
 org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:299)
 at
 org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:226)
  at
 org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:205)
 at
 org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getUserRegistry(EmbeddedRegistryService.java:427)
  at
 org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getSystemRegistry(EmbeddedRegistryService.java:292)
 at
 org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getConfigSystemRegistry(EmbeddedRegistryService.java:485)
  at
 org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.createTenantConfigurationContext(TenantAxisUtils.java:295)
 at
 org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.getTenantConfigurationContext(TenantAxisUtils.java:135)
  at
 org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.processRequest

Re: [Dev] Is the next API Manager release going to make use of the Carbon multi-profile support?

2013-09-06 Thread Amila De Silva
Hi Azeez,
Yes. We are already testing a distributed setup using the created profiles.

AmilaD


On Fri, Sep 6, 2013 at 3:09 PM, Afkham Azeez az...@wso2.com wrote:

 $subject, just for my information

 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*

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




-- 
*Amila De Silva*
*
*
*Software Engineer*
WSO2 Inc.*
*
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Getting a Constraint Violation Exception when invoking an API in the gateway worker

2013-09-06 Thread Amila De Silva
)
at
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


-- 
*Amila De Silva*
*
*
*Software Engineer*
WSO2 Inc.*
*
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Compilation failure in org.wso2.carbon.identity.authorization.ui - 4.2.0 branch

2013-08-20 Thread Amila De Silva
/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[230,4]
cannot find symbol
[ERROR] symbol  : class Resource
[ERROR] location: class
org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
[ERROR]
/home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[230,23]
cannot find symbol
[ERROR] symbol  : class Resource
[ERROR] location: class
org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
[ERROR]
/home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[236,7]
cannot find symbol
[ERROR] symbol  : class Resource
[ERROR] location: class
org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
[ERROR]
/home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[236,43]
cannot find symbol
[ERROR] symbol  : class Resource
[ERROR] location: class
org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
[ERROR]
/home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[239,44]
cannot find symbol
[ERROR] symbol  : class Resource
[ERROR] location: class
org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
[ERROR] - [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command
[ERROR]   mvn goals -rf :org.wso2.carbon.identity.authorization.ui


-- 
*Amila De Silva*
*
*
WSO2 Inc.*
*
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Compilation failure in org.wso2.carbon.identity.authorization.ui - 4.2.0 branch

2013-08-20 Thread Amila De Silva
Hi,
That has been the problem. Updating the stubs resolved the issue.

AmilaD



On Tue, Aug 20, 2013 at 3:10 PM, Venura Kahawala ven...@wso2.com wrote:

 Hi,

 Did you try updating and building org.wso2.carbon.identity.authorization.core
 and org.wso2.carbon.identity.authorization.stub?

 If not please do so.

 Regards,
 Venura


 On Tue, Aug 20, 2013 at 2:51 PM, Amila De Silva ami...@wso2.com wrote:

 Hi,

 I'm getting the following failure when
 building org.wso2.carbon.identity.authorization.ui. Tried updating
 the org.wso2.carbon.identity.core and re triggered the build. But still the
 failure is there.

 [INFO] BUILD FAILURE
 [INFO]
 
 [INFO] Total time: 29.951s
 [INFO] Finished at: Tue Aug 20 14:48:50 IST 2013
 [INFO] Final Memory: 219M/836M
 [INFO]
 
 [ERROR] Failed to execute goal
 org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
 (default-compile) on project org.wso2.carbon.identity.authorization.ui:
 Compilation failure: Compilation failure:
 [ERROR]
 /home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[31,58]
 cannot find symbol
 [ERROR] symbol  : class Resource
 [ERROR] location: package
 org.wso2.carbon.identity.authorization.core.dto.xsd
 [ERROR]
 /home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[144,7]
 cannot find symbol
 [ERROR] symbol  : class Resource
 [ERROR] location: class
 org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
 [ERROR]
 /home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[144,46]
 cannot find symbol
 [ERROR] symbol  : class Resource
 [ERROR] location: class
 org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
 [ERROR]
 /home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[147,3]
 cannot find symbol
 [ERROR] symbol  : class Resource
 [ERROR] location: class
 org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
 [ERROR]
 /home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[147,22]
 cannot find symbol
 [ERROR] symbol  : class Resource
 [ERROR] location: class
 org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
 [ERROR]
 /home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[152,47]
 cannot find symbol
 [ERROR] symbol  : class Resource
 [ERROR] location: class
 org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
 [ERROR]
 /home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[212,7]
 cannot find symbol
 [ERROR] symbol  : class Resource
 [ERROR] location: class
 org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
 [ERROR]
 /home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[212,50]
 cannot find symbol
 [ERROR] symbol  : class Resource
 [ERROR] location: class
 org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
 [ERROR]
 /home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[213,7]
 cannot find symbol
 [ERROR] symbol  : class Resource
 [ERROR] location: class
 org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
 [ERROR]
 /home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[213,46]
 cannot find symbol
 [ERROR] symbol  : class Resource
 [ERROR] location: class
 org.wso2.carbon.identity.authorization.ui.tag.ModuleManagerTag
 [ERROR]
 /home/amila/checkout/4.2.0/platform/4.2.0/components/identity/org.wso2.carbon.identity.authorization.ui/4.2.0/src/main/java/org/wso2/carbon/identity/authorization/ui/tag/ModuleManagerTag.java:[215,7]
 cannot find symbol
 [ERROR] symbol  : class Resource
 [ERROR] location: class
 org.wso2

Re: [Dev] Fwd: Feature Categorization for APIM

2013-08-07 Thread Amila De Silva
Hi,

Since the existing feature breakdown doesn't help much when installing high
level components in APIManager, thought of restructuring the categories.
Only the following categories will be defined.

1. Store
2. Publisher
3. KeyManager
4. Gateway Worker
5. Gateway Manager

Each feature category will contain all the dependent features needed to
install that category completely.
For example Publisher category will include
Publisher/
org.wso2.carbon.apimgt.publisher.feature
org.wso2.carbon.governance.lifecycle.management.feature
org.wso2.carbon.registry.core.feature.
.
Similarly Store category will have;
Store/
org.wso2.carbon.core.server
org.wso2.carbon.registry.core.feature


This approach will duplicate some features across different categories, but
installing a high level component will be made easy by this.

AmilaD


On Tue, Aug 6, 2013 at 11:33 AM, Sanjeewa Malalgoda sanje...@wso2.comwrote:



 On Mon, Aug 5, 2013 at 3:31 PM, Lalaji Sureshika lal...@wso2.com wrote:

 Hi Amila,


 On Mon, Aug 5, 2013 at 12:34 AM, Kasun Gajasinghe kas...@wso2.comwrote:


 I believe you can also create some high-level categories like store and
 publisher? That would be really useful.


 I also agree with Kasun's point. From APIManager perspective,I think we
 need high-level categories as

 1) store
 2) publisher
 3) keymgt
 4) gateway

 gateway should have 2 profiles
gateway manager.
gateway worker.

 @Amila, I have already sent a mail to developers list to discuss about
 profile categorization of API manager. Content on that mail will surely
 help us in this case as well. Also added 2 or 3 profiles to p2 pom.

 Thanks,
 Sanjeewa.


 Isn't the features category set defined by Dinusha as per thread [Dev]
 New feature structure for API Manager ,would fit with this task..?

 Thanks;


 Thanks,
 KasunG


 On Mon, Aug 5, 2013 at 12:58 PM, Amila De Silva ami...@wso2.com wrote:


 Hi,
 Please find the initial feature categories for APIM at
 https://docs.google.com/a/wso2.com/spreadsheet/ccc?key=0AhlcfaVDH9iFdDhVV2VpMS1DQW8wNHJDb0hnQWktTEE#gid=0

 Similar categories created for AS and DSS can be found at
 https://docs.google.com/a/wso2.com/spreadsheet/ccc?key=0ApWioeKgeCchdGg1bWpVb010SkJGMUpZMkNVTDA4NUEpli=1#gid=0

 Those marked in bold are the features newly added for APIM under
 existing feature categories. Five new categories were created for
 Mediation, Governance, API Management, Identity and Transport.

 Please go through the list and provide some feedback.
 --
 *Amila De Silva*
 *
 *
 WSO2 Inc.*
 *
 mobile :(+94) 775119302

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




 --
 *Kasun Gajasinghe*
 Software Engineer;
 Development Technologies Team, WSO2 Inc.; http://wso2.com


  ,
 *email: **kasung AT spamfree wso2.com


 ** cell: **+94 (77) 678-0813*
 *linked-in: *http://lk.linkedin.com/in/gajasinghe


 *
 *
 *blog: **http://kasunbg.org* http://kasunbg.org


 *
 twitter: **http://twitter.com/kasunbg* http://twitter.com/kasunbg


 *
 *

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




 --
 Lalaji Sureshika
  WSO2, Inc.;  http://wso2.com/
 email: lal...@wso2.com; cell: +94 71 608 6811
 blog: http://lalajisureshika.blogspot.com



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




 --
 *
 *
 *Sanjeewa Malalgoda*
 WSO2 Inc.
 Mobile : +94713068779

  http://sanjeewamalalgoda.blogspot.com/blog
 :http://sanjeewamalalgoda.blogspot.com/http://sanjeewamalalgoda.blogspot.com/





-- 
*Amila De Silva*
*
*
WSO2 Inc.*
*
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fwd: Feature Categorization for APIM

2013-08-06 Thread Amila De Silva
On Tue, Aug 6, 2013 at 11:33 AM, Sanjeewa Malalgoda sanje...@wso2.comwrote:



 On Mon, Aug 5, 2013 at 3:31 PM, Lalaji Sureshika lal...@wso2.com wrote:

 Hi Amila,


 On Mon, Aug 5, 2013 at 12:34 AM, Kasun Gajasinghe kas...@wso2.comwrote:


 I believe you can also create some high-level categories like store and
 publisher? That would be really useful.


 I also agree with Kasun's point. From APIManager perspective,I think we
 need high-level categories as

 1) store
 2) publisher
 3) keymgt
 4) gateway

 gateway should have 2 profiles
gateway manager.
gateway worker.

 @Amila, I have already sent a mail to developers list to discuss about
 profile categorization of API manager. Content on that mail will surely
 help us in this case as well. Also added 2 or 3 profiles to p2 pom.

 Hi Sanjeewa,

AFAIU we should not further separate the gateway feature into two
categories, since both the worker feature and manager feature would contain
the same bundles.
We can point to the same gateway feature when creating different gateway
profiles.

AmilaD

 Thanks,
 Sanjeewa.


 Isn't the features category set defined by Dinusha as per thread [Dev]
 New feature structure for API Manager ,would fit with this task..?

 Thanks;


 Thanks,
 KasunG


 On Mon, Aug 5, 2013 at 12:58 PM, Amila De Silva ami...@wso2.com wrote:


 Hi,
 Please find the initial feature categories for APIM at
 https://docs.google.com/a/wso2.com/spreadsheet/ccc?key=0AhlcfaVDH9iFdDhVV2VpMS1DQW8wNHJDb0hnQWktTEE#gid=0

 Similar categories created for AS and DSS can be found at
 https://docs.google.com/a/wso2.com/spreadsheet/ccc?key=0ApWioeKgeCchdGg1bWpVb010SkJGMUpZMkNVTDA4NUEpli=1#gid=0

 Those marked in bold are the features newly added for APIM under
 existing feature categories. Five new categories were created for
 Mediation, Governance, API Management, Identity and Transport.

 Please go through the list and provide some feedback.
 --
 *Amila De Silva*
 *
 *
 WSO2 Inc.*
 *
 mobile :(+94) 775119302

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




 --
 *Kasun Gajasinghe*
 Software Engineer;
 Development Technologies Team, WSO2 Inc.; http://wso2.com


  ,
 *email: **kasung AT spamfree wso2.com


 ** cell: **+94 (77) 678-0813*
 *linked-in: *http://lk.linkedin.com/in/gajasinghe


 *
 *
 *blog: **http://kasunbg.org* http://kasunbg.org


 *
 twitter: **http://twitter.com/kasunbg* http://twitter.com/kasunbg


 *
 *

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




 --
 Lalaji Sureshika
  WSO2, Inc.;  http://wso2.com/
 email: lal...@wso2.com; cell: +94 71 608 6811
 blog: http://lalajisureshika.blogspot.com



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




 --
 *
 *
 *Sanjeewa Malalgoda*
 WSO2 Inc.
 Mobile : +94713068779

  http://sanjeewamalalgoda.blogspot.com/blog
 :http://sanjeewamalalgoda.blogspot.com/http://sanjeewamalalgoda.blogspot.com/





-- 
*Amila De Silva*
*
*
WSO2 Inc.*
*
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Fwd: Feature Categorization for APIM

2013-08-05 Thread Amila De Silva
Hi,
Please find the initial feature categories for APIM at
https://docs.google.com/a/wso2.com/spreadsheet/ccc?key=0AhlcfaVDH9iFdDhVV2VpMS1DQW8wNHJDb0hnQWktTEE#gid=0

Similar categories created for AS and DSS can be found at
https://docs.google.com/a/wso2.com/spreadsheet/ccc?key=0ApWioeKgeCchdGg1bWpVb010SkJGMUpZMkNVTDA4NUEpli=1#gid=0

Those marked in bold are the features newly added for APIM under existing
feature categories. Five new categories were created for Mediation,
Governance, API Management, Identity and Transport.

Please go through the list and provide some feedback.
-- 
*Amila De Silva*
*
*
WSO2 Inc.*
*
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fwd: Feature Categorization for APIM

2013-08-05 Thread Amila De Silva
Hi,
Updated the  original feature category document defining the high-level
categories for APIM.

AmilaD


On Mon, Aug 5, 2013 at 3:31 PM, Lalaji Sureshika lal...@wso2.com wrote:

 Hi Amila,


 On Mon, Aug 5, 2013 at 12:34 AM, Kasun Gajasinghe kas...@wso2.com wrote:


 I believe you can also create some high-level categories like store and
 publisher? That would be really useful.


 I also agree with Kasun's point. From APIManager perspective,I think we
 need high-level categories as

 1) store
 2) publisher
 3) keymgt
 4) gateway

 Isn't the features category set defined by Dinusha as per thread [Dev]
 New feature structure for API Manager ,would fit with this task..?

 Thanks;


 Thanks,
 KasunG


 On Mon, Aug 5, 2013 at 12:58 PM, Amila De Silva ami...@wso2.com wrote:


 Hi,
 Please find the initial feature categories for APIM at
 https://docs.google.com/a/wso2.com/spreadsheet/ccc?key=0AhlcfaVDH9iFdDhVV2VpMS1DQW8wNHJDb0hnQWktTEE#gid=0

 Similar categories created for AS and DSS can be found at
 https://docs.google.com/a/wso2.com/spreadsheet/ccc?key=0ApWioeKgeCchdGg1bWpVb010SkJGMUpZMkNVTDA4NUEpli=1#gid=0

 Those marked in bold are the features newly added for APIM under
 existing feature categories. Five new categories were created for
 Mediation, Governance, API Management, Identity and Transport.

 Please go through the list and provide some feedback.
 --
 *Amila De Silva*
 *
 *
 WSO2 Inc.*
 *
 mobile :(+94) 775119302

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




 --
 *Kasun Gajasinghe*
 Software Engineer;
 Development Technologies Team, WSO2 Inc.; http://wso2.com


  ,
 *email: **kasung AT spamfree wso2.com


 ** cell: **+94 (77) 678-0813*
 *linked-in: *http://lk.linkedin.com/in/gajasinghe


 *
 *
 *blog: **http://kasunbg.org* http://kasunbg.org


 *
 twitter: **http://twitter.com/kasunbg* http://twitter.com/kasunbg


 *
 *

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




 --
 Lalaji Sureshika
 WSO2, Inc.;  http://wso2.com/
 email: lal...@wso2.com; cell: +94 71 608 6811
 blog: http://lalajisureshika.blogspot.com





-- 
*Amila De Silva*
*
*
WSO2 Inc.*
*
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Dynamically setting User name in UT

2013-07-31 Thread Amila De Silva
Hi,

*Usecase*:
User has a secured backend fronted by API Manager. The exposed API will be
accessed using an Access Token. When a request hits the Gateway, APIM
should find the username associated with the access token , use it for
setting the user name in UserName Token, sign it and send it to the backend.

With the current implementation, username can be made available in the
message context.
We tried achieving the above by implementing a RampartConfigCallbackHandler
and setting the username within its update method.But the problem is when
execution reaches to the ConfigCallbackHandler , the message context
couldn't be accessed.

What should be the proper way to do this?

-- 
*Amila De Silva*
*
*
WSO2 Inc.*
*
mobile :(+94) 775119302
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Committers += Danushka Fernando

2013-05-14 Thread Amila De Silva
Congratulations Danushka!!


On Tue, May 14, 2013 at 11:35 AM, Ramith Jayasinghe ram...@wso2.com wrote:

 Hi,
  Its my pleasure to welcome Danushka Fernando as a WSO2 Commiter.
  He made excellent contributions towards making the Appfactory stable and
 worked on improving the performance.

 Danushka, welcome aboard and keep up the good work.

 regards
 --
 Ramith Jayasinghe

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


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


Re: [Dev] WSO2 Committers += Amila De Silva

2013-04-02 Thread Amila De Silva
Hi,
Thank you very much for this great opportunity and I will continue
contributing my best in future too.

AmilaD


On Tue, Apr 2, 2013 at 10:05 AM, Nuwan Dias nuw...@wso2.com wrote:

 Hi,

 All-MC has voted in Amila De Silva as a WSO2 committer. He has been an
 excellent contributor for the WSO2 API Manager and other related projects
 over the last few months.

 AmilaD, welcome aboard and keep up the good work.

 Thanks,
 NuwanD.

 --
 Nuwan Dias

 Software Engineer - WSO2, Inc. http://wso2.com
 email : nuw...@wso2.com
 Phone : +94 777 775 729

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


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


Re: [Dev] WSO2 Committers += Pamod Sylvester

2013-03-21 Thread Amila De Silva
Congratulations Pamod!!

On Thu, Mar 21, 2013 at 12:56 PM, Pamod Sylvester pa...@wso2.com wrote:

 Hi,

 Thank you very much for the great opportunity. Will keep contributing
 better.

 Thanks,
 Pamod


 On Thu, Mar 21, 2013 at 12:00 PM, Kasun Indrasiri ka...@wso2.com wrote:

 Hi Folks,

 The All-MC has voted in Pamod Sylvester as a WSO2 committer. He has been
 an excellent contributor for WSO2 ESB and other related projects over the
 last few months and done an excellent job in EIP implementation space as
 well.

 Pamod, welcome aboard and keep up the good work.

 Thanks,
 Kasun

 --
 Kasun Indrasiri
 Associate Technical Lead
 WSO2, Inc.; http://wso2.com
 lean.enterprise.middleware

 cell: +94 71 536 4128
 Blog : http://kasunpanorama.blogspot.com/




 --
 *Pamod Sylvester *
 *
 *
 *
 Software Engineer
 *
 Integration Technologies Team, WSO2 Inc.; http://wso2.com
 email: pa...@wso2.com cell: +94 77 7779495

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


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


Re: [Dev] [DEV] Error while accessing publisher application after mounting config space

2013-01-04 Thread Amila De Silva
Hi Eranda,
I'm using a MySql database for this. Attached the files.

AmilaD

On Fri, Jan 4, 2013 at 1:44 PM, Eranda Sooriyabandara era...@wso2.comwrote:

 Hi Amila,
 What is the database you used as the remote DB? H2? Also can you please
 copy the masterdata source config to that remote DB as well as the
 govregistry DB configuration in the registry.xml.

 thanks
 Eranda


 On Fri, Jan 4, 2013 at 12:51 PM, Amila De Silva ami...@wso2.com wrote:


 Hi,
 As explained in [1] an exception is thrown when accessing the pubisher
 and store apps.
 When these are accessed for the first time, an SQL resource is added to
 the location
 /repository/components/org.wso2.carbon.registry/queries/tag-summary of
 the config space.
 Within the publisher app, following code is used to obtain the related
 registry space;

 Registry configRegistry =
 ServiceReferenceHolder.getInstance().getRegistryService().getConfigSystemRegistry();

 As observed following takes place in the registry side, after calling the
 configRegistry.put method;
 1. Since the inserted resource is marked as an SQL media type, at a 
 pointSQLQueryHandler.putis called.
 2.The location of the resource is identified as a non existing one,
 therefore it gets created level by level.
 3.The new location gets created by addEmptyCollection method in
 Repository class, which is recursively called until an existing
 parentResourceID is found.
 4. Once it reaches an existing parentResourceID (in this case it is
 /_system/local/repository/), the immediate child collection (components) is
 created in the underlying database by resourceDAO.add method.
 5. This subsequently calls to createAndApplyResourceID in
 JDBCResourceDAO, which ultimately calls to createResourceID.
 6. The problem originates when executing the block;

  JDBCDatabaseTransaction.ManagedRegistryConnection conn =
 JDBCDatabaseTransaction.getConnection();
 JDBCPathCache pathCache = JDBCPathCache.getPathCache();
 int pathID = pathCache.getPathID(conn, path);
 if (pathID == -1) {
 pathID = pathCache.addEntry(path, parentPathID);
 }

 conn variable points to the database where local space is stored,
 meaning that the pathID is first fetched from the local_space (which is the
 expected behaviour).

 The call to  pathCache.addEntry, subsequently invokes

 dataAccessManager =
 CurrentSession.getUserRegistry().getRegistryContext().getDataAccessManager();

 to get a datasource (the new collection 'components' gets actually stored
 here). But this datasource actually points to the database where config
 space is mounted.
 The problem in short is path is retrieved from one location, but it is
 stored to another.

 Has this to do anything with the way the registry space is obtained?

 [1] https://wso2.org/jira/browse/APIMANAGER-869


 Regards,
 AmilaD


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




 --
 *Eranda Sooriyabandara
 *Software Engineer;
 Integration Technologies Team;
 WSO2 Inc.; http://wso2.com

 *
 *

datasources-configuration xmlns:svns=http://org.wso2.securevault/configuration;

providers
providerorg.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader/provider
/providers

datasources

!--datasource
nameWSO2_CARBON_DB/name
descriptionThe datasource used for registry and user manager/description
jndiConfig
namejdbc/WSO2CarbonDB/name
/jndiConfig
definition type=RDBMS
configuration
urljdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE/url
usernamewso2carbon/username
passwordwso2carbon/password
driverClassNameorg.h2.Driver/driverClassName
maxActive50/maxActive
maxWait6/maxWait
testOnBorrowtrue/testOnBorrow
validationQuerySELECT 1/validationQuery
validationInterval3/validationInterval
/configuration
/definition
/datasource--

datasource
nameWSO2_CARBON_DB/name
descriptionThe datasource used for registry and user manager/description
jndiConfig
namejdbc/WSO2CarbonDB/name
/jndiConfig
definition type=RDBMS
configuration
urljdbc:mysql://localhost:3306/local_space/url 
usernameroot/username 
password/password 
driverClassNamecom.mysql.jdbc.Driver/driverClassName
		defaultAutoCommitfalse/defaultAutoCommit 
maxActive50/maxActive
maxWait6/maxWait
testOnBorrowtrue/testOnBorrow
validationQuerySELECT 1

[Dev] Accessing Config Registry

2012-12-18 Thread Amila De Silva
Hi,
Is it possible to access the config registry of an already existing user,
through org.wso2.carbon.registry.app.RemoteRegistry?

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


[Dev] Error while mounting Registry in APIManager

2012-12-11 Thread Amila De Silva
Hi,

I tried mounting governance space in a recent API Manager pack, which
depends on registry feature 4.0.5. When trying to start the instance after
doing the necessary configuring,
I get the following error:

2012-12-11 12:48:26,674]  INFO - DefaultRealmService Database already
exists. Not creating a new database.
[2012-12-11 12:48:27,377]  INFO - EmbeddedRegistryService Configured
Registry in 53ms
[2012-12-11 12:48:27,412] ERROR - RegistryCoreServiceComponent Failed to
activate Registry Core bundle
java.lang.NullPointerException
at
org.wso2.carbon.registry.core.jdbc.handlers.builtin.MountHandler.setConURL(MountHandler.java:1610)
at
org.wso2.carbon.registry.core.utils.RegistryUtils.registerHandlerForRemoteLinks(RegistryUtils.java:1426)
at
org.wso2.carbon.registry.core.utils.RegistryUtils.registerHandlerForRemoteLinks(RegistryUtils.java:1393)
at
org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.createLink(EmbeddedRegistry.java:2801)
at
org.wso2.carbon.registry.core.caching.CacheBackedRegistry.createLink(CacheBackedRegistry.java:406)
at
org.wso2.carbon.registry.core.session.UserRegistry.createLink(UserRegistry.java:1520)
at
org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.setupMounts(RegistryCoreServiceComponent.java:337)
at
org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.buildRegistryService(RegistryCoreServiceComponent.java:572)
at
org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.activate(RegistryCoreServiceComponent.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:252)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
at
org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:328)
at
org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:221)
at
org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at
org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:68)
at
org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1130)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
at

Re: [Dev] Error while mounting Registry in APIManager

2012-12-11 Thread Amila De Silva
Attached.

On Tue, Dec 11, 2012 at 3:55 PM, Eranda Sooriyabandara era...@wso2.comwrote:

 Hi Amila,
 Can you please attach the masterdatasource.xml and registry.xml please.

 thanks
 Eranda


 On Tue, Dec 11, 2012 at 3:42 PM, Amila De Silva ami...@wso2.com wrote:

 Hi,

 I tried mounting governance space in a recent API Manager pack, which
 depends on registry feature 4.0.5. When trying to start the instance after
 doing the necessary configuring,
 I get the following error:

 2012-12-11 12:48:26,674]  INFO - DefaultRealmService Database already
 exists. Not creating a new database.
 [2012-12-11 12:48:27,377]  INFO - EmbeddedRegistryService Configured
 Registry in 53ms
 [2012-12-11 12:48:27,412] ERROR - RegistryCoreServiceComponent Failed to
 activate Registry Core bundle
 java.lang.NullPointerException
 at
 org.wso2.carbon.registry.core.jdbc.handlers.builtin.MountHandler.setConURL(MountHandler.java:1610)
 at
 org.wso2.carbon.registry.core.utils.RegistryUtils.registerHandlerForRemoteLinks(RegistryUtils.java:1426)
 at
 org.wso2.carbon.registry.core.utils.RegistryUtils.registerHandlerForRemoteLinks(RegistryUtils.java:1393)
 at
 org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.createLink(EmbeddedRegistry.java:2801)
 at
 org.wso2.carbon.registry.core.caching.CacheBackedRegistry.createLink(CacheBackedRegistry.java:406)
 at
 org.wso2.carbon.registry.core.session.UserRegistry.createLink(UserRegistry.java:1520)
 at
 org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.setupMounts(RegistryCoreServiceComponent.java:337)
 at
 org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.buildRegistryService(RegistryCoreServiceComponent.java:572)
 at
 org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.activate(RegistryCoreServiceComponent.java:120)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:252)
 at
 org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
 at
 org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346)
 at
 org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
 at
 org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
 at
 org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:328)
 at
 org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:221)
 at
 org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
 at
 org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
 at
 org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
 at
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
 at
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
 at
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
 at
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
 at
 org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:68)
 at
 org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
 at java.security.AccessController.doPrivileged(Native Method)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
 at
 org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
 at
 org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
 at
 org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1130)
 at
 org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
 at
 org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
 at
 org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL

Re: [Dev] Error while mounting Registry in APIManager

2012-12-11 Thread Amila De Silva
By mistake I have attached the wrong files previously. These are the
correct one's related to the problem. Sorry for the confusion.


On Tue, Dec 11, 2012 at 9:49 PM, Ajith Vitharana aji...@wso2.com wrote:




 On Tue, Dec 11, 2012 at 9:06 PM, Amila De Silva ami...@wso2.com wrote:

 Attached.


 Those files are useless , please attach the files which contains the mount
 configurations.

 Thanks
 Ajith


 On Tue, Dec 11, 2012 at 3:55 PM, Eranda Sooriyabandara 
 era...@wso2.comwrote:

 Hi Amila,
 Can you please attach the masterdatasource.xml and registry.xml please.

 thanks
 Eranda


 On Tue, Dec 11, 2012 at 3:42 PM, Amila De Silva ami...@wso2.com wrote:

 Hi,

 I tried mounting governance space in a recent API Manager pack, which
 depends on registry feature 4.0.5. When trying to start the instance after
 doing the necessary configuring,
 I get the following error:

 2012-12-11 12:48:26,674]  INFO - DefaultRealmService Database already
 exists. Not creating a new database.
 [2012-12-11 12:48:27,377]  INFO - EmbeddedRegistryService Configured
 Registry in 53ms
 [2012-12-11 12:48:27,412] ERROR - RegistryCoreServiceComponent Failed
 to activate Registry Core bundle
 java.lang.NullPointerException
 at
 org.wso2.carbon.registry.core.jdbc.handlers.builtin.MountHandler.setConURL(MountHandler.java:1610)
 at
 org.wso2.carbon.registry.core.utils.RegistryUtils.registerHandlerForRemoteLinks(RegistryUtils.java:1426)
 at
 org.wso2.carbon.registry.core.utils.RegistryUtils.registerHandlerForRemoteLinks(RegistryUtils.java:1393)
 at
 org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.createLink(EmbeddedRegistry.java:2801)
 at
 org.wso2.carbon.registry.core.caching.CacheBackedRegistry.createLink(CacheBackedRegistry.java:406)
 at
 org.wso2.carbon.registry.core.session.UserRegistry.createLink(UserRegistry.java:1520)
 at
 org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.setupMounts(RegistryCoreServiceComponent.java:337)
 at
 org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.buildRegistryService(RegistryCoreServiceComponent.java:572)
 at
 org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.activate(RegistryCoreServiceComponent.java:120)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:252)
 at
 org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
 at
 org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346)
 at
 org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
 at
 org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
 at
 org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:328)
 at
 org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:221)
 at
 org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
 at
 org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
 at
 org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
 at
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
 at
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
 at
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
 at
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
 at
 org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:68)
 at
 org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
 at java.security.AccessController.doPrivileged(Native Method)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
 at
 org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
 at
 org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389

Re: [Dev] Error while mounting Registry in APIManager

2012-12-11 Thread Amila De Silva
Hi,
I have missed out the url when specifying the remoteInstance. After adding
that , the problem got solved.

Regards
Amila

On Wed, Dec 12, 2012 at 10:15 AM, Amila De Silva ami...@wso2.com wrote:

 By mistake I have attached the wrong files previously. These are the
 correct one's related to the problem. Sorry for the confusion.



 On Tue, Dec 11, 2012 at 9:49 PM, Ajith Vitharana aji...@wso2.com wrote:




 On Tue, Dec 11, 2012 at 9:06 PM, Amila De Silva ami...@wso2.com wrote:

 Attached.


 Those files are useless , please attach the files which contains the
 mount configurations.

 Thanks
 Ajith


 On Tue, Dec 11, 2012 at 3:55 PM, Eranda Sooriyabandara 
 era...@wso2.comwrote:

 Hi Amila,
 Can you please attach the masterdatasource.xml and registry.xml please.

 thanks
 Eranda


 On Tue, Dec 11, 2012 at 3:42 PM, Amila De Silva ami...@wso2.comwrote:

 Hi,

 I tried mounting governance space in a recent API Manager pack, which
 depends on registry feature 4.0.5. When trying to start the instance after
 doing the necessary configuring,
 I get the following error:

 2012-12-11 12:48:26,674]  INFO - DefaultRealmService Database already
 exists. Not creating a new database.
 [2012-12-11 12:48:27,377]  INFO - EmbeddedRegistryService Configured
 Registry in 53ms
 [2012-12-11 12:48:27,412] ERROR - RegistryCoreServiceComponent Failed
 to activate Registry Core bundle
 java.lang.NullPointerException
 at
 org.wso2.carbon.registry.core.jdbc.handlers.builtin.MountHandler.setConURL(MountHandler.java:1610)
 at
 org.wso2.carbon.registry.core.utils.RegistryUtils.registerHandlerForRemoteLinks(RegistryUtils.java:1426)
 at
 org.wso2.carbon.registry.core.utils.RegistryUtils.registerHandlerForRemoteLinks(RegistryUtils.java:1393)
 at
 org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.createLink(EmbeddedRegistry.java:2801)
 at
 org.wso2.carbon.registry.core.caching.CacheBackedRegistry.createLink(CacheBackedRegistry.java:406)
 at
 org.wso2.carbon.registry.core.session.UserRegistry.createLink(UserRegistry.java:1520)
 at
 org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.setupMounts(RegistryCoreServiceComponent.java:337)
 at
 org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.buildRegistryService(RegistryCoreServiceComponent.java:572)
 at
 org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.activate(RegistryCoreServiceComponent.java:120)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:252)
 at
 org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
 at
 org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346)
 at
 org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
 at
 org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
 at
 org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:328)
 at
 org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:221)
 at
 org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
 at
 org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
 at
 org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
 at
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
 at
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
 at
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
 at
 org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
 at
 org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:68)
 at
 org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
 at java.security.AccessController.doPrivileged(Native Method)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
 at
 org.eclipse.osgi.framework.internal.core.BundleContextImpl.start

[Dev] Compilation failure in throttling.agent

2012-11-14 Thread Amila De Silva
Hi,
Following failure occured when building
platform/4.0.0/components/stratos/throttling/org.wso2.carbon.throttling.agent/
2.0.5.

[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
org.wso2.carbon.throttling.agent ---
[INFO] Compiling 18 source files to
/home/amila/checkout/platform/4.0.0/components/stratos/throttling/org.wso2.carbon.throttling.agent/2.0.5/target/classes
[INFO] -
[ERROR] COMPILATION ERROR :
[INFO] -
[ERROR]
/home/amila/checkout/platform/4.0.0/components/stratos/throttling/org.wso2.carbon.throttling.agent/2.0.5/src/main/java/org/wso2/carbon/throttling/agent/client/MultitenancyThrottlingServiceClient.java:[59,12]
executeThrottlingRules() in
org.wso2.carbon.throttling.agent.stub.services.MultitenancyThrottlingServiceStub
cannot be applied to (int)
[INFO] 1 error
[INFO] -
[INFO]

[INFO] BUILD FAILURE
[INFO]

[INFO] Total time: 5.086s
[INFO] Finished at: Thu Nov 15 12:06:13 IST 2012
[INFO] Final Memory: 31M/286M
[INFO]

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
(default-compile) on project org.wso2.carbon.throttling.agent: Compilation
failure
[ERROR]
/home/amila/checkout/platform/4.0.0/components/stratos/throttling/org.wso2.carbon.throttling.agent/2.0.5/src/main/java/org/wso2/carbon/throttling/agent/client/MultitenancyThrottlingServiceClient.java:[59,12]
executeThrottlingRules() in
org.wso2.carbon.throttling.agent.stub.services.MultitenancyThrottlingServiceStub
cannot be applied to (int)
[ERROR] - [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


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


[Dev] Build failure on platform

2012-09-04 Thread Amila De Silva
Hi,

I'm getting the following errors when building:

compile:
 [echo] Project: jdbc
[javac] Compiling 15 source files to
/home/amila/checkout/platform/4.0.0/dependencies/hive/0.8.1-wso2v3/build/jdbc/classes
[javac]
/home/amila/checkout/platform/4.0.0/dependencies/hive/0.8.1-wso2v3/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveCallableStatement.java:48:
error: HiveCallableStatement is not abstract and does not override abstract
method TgetObject(String,ClassT) in CallableStatement
[javac] public class HiveCallableStatement implements
java.sql.CallableStatement {
[javac]^
[javac]   where T is a type-variable:
[javac] T extends Object declared in method
TgetObject(String,ClassT)
[javac]
/home/amila/checkout/platform/4.0.0/dependencies/hive/0.8.1-wso2v3/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java:54:
error: HiveConnection is not abstract and does not override abstract method
getNetworkTimeout() in Connection
[javac] public class HiveConnection implements java.sql.Connection {
[javac]^
[javac]
/home/amila/checkout/platform/4.0.0/dependencies/hive/0.8.1-wso2v3/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDataSource.java:31:
error: HiveDataSource is not abstract and does not override abstract method
getParentLogger() in CommonDataSource
[javac] public class HiveDataSource implements DataSource {
[javac]^
[javac]
/home/amila/checkout/platform/4.0.0/dependencies/hive/0.8.1-wso2v3/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java:43:
error: HiveDatabaseMetaData is not abstract and does not override abstract
method generatedKeyAlwaysReturned() in DatabaseMetaData
[javac] public class HiveDatabaseMetaData implements
java.sql.DatabaseMetaData {
[javac]^
[javac]
/home/amila/checkout/platform/4.0.0/dependencies/hive/0.8.1-wso2v3/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java:113:
error: anonymous org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData$1 is
not abstract and does not override abstract method
TgetObject(String,ClassT) in ResultSet
[javac]   , catalogs) {
[javac]   ^
[javac]   where T is a type-variable:
[javac] T extends Object declared in method
TgetObject(String,ClassT)
[javac]
/home/amila/checkout/platform/4.0.0/dependencies/hive/0.8.1-wso2v3/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java:222:
error: anonymous org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData$2 is
not abstract and does not override abstract method
TgetObject(String,ClassT) in ResultSet
[javac]   , columns) {
[javac]  ^
[javac]   where T is a type-variable:
[javac] T extends Object declared in method
TgetObject(String,ClassT)
[javac]
/home/amila/checkout/platform/4.0.0/dependencies/hive/0.8.1-wso2v3/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java:513:
error: anonymous org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData$3 is
not abstract and does not override abstract method
TgetObject(String,ClassT) in ResultSet
[javac] , Arrays.asList(STRING, STRING), null) {
[javac]^
[javac]   where T is a type-variable:
[javac] T extends Object declared in method
TgetObject(String,ClassT)
[javac]
/home/amila/checkout/platform/4.0.0/dependencies/hive/0.8.1-wso2v3/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java:553:
error: anonymous org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData$4 is
not abstract and does not override abstract method
TgetObject(String,ClassT) in ResultSet
[javac] , Arrays.asList(STRING), new
ArrayListTableType(Arrays.asList(tt))) {

[javac]
^
[javac]   where T is a type-variable:
[javac] T extends Object declared in method
TgetObject(String,ClassT)
[javac]
/home/amila/checkout/platform/4.0.0/dependencies/hive/0.8.1-wso2v3/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java:610:
error: anonymous org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData$5 is
not abstract and does not override abstract method
TgetObject(String,ClassT) in ResultSet
[javac] , resultTables) {
[javac] ^
[javac]   where T is a type-variable:
[javac] T extends Object declared in method
TgetObject(String,ClassT)
[javac]
/home/amila/checkout/platform/4.0.0/dependencies/hive/0.8.1-wso2v3/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveDatabaseMetaData.java:688:
error: anonymous org.apache.hadoop.hive.jdbc.HiveDatabaseMetaData$6 is
not abstract and does not override abstract method
TgetObject(String,ClassT) in ResultSet
[javac] , null) {
[javac] ^
[javac]   where T is a type-variable:
[javac] T extends Object declared in method
TgetObject(String,ClassT)
[javac]