Re: [Dev] Please review and merge

2015-07-22 Thread Malaka Silva
We can't merge this until we fully test this. There seems to be http
endpoints which may not work with esb 490 beta.

On Wed, Jul 22, 2015 at 2:04 PM, Elilmatha Sivanesan elilma...@wso2.com
wrote:

 Hi Malaka,

 Please review and merge PR [1]

 [1]
 *https://github.com/wso2/esb-connectors/pull/241
 https://github.com/wso2/esb-connectors/pull/241*

 Thank you.

 --
 *S.Elilmatha*
 Associate  Software Engineer,

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

 Mobile 0779842221.




-- 

Best Regards,

Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/

WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/
http://wso2.com/about/team/malaka-silva/

Save a tree -Conserve nature  Save the world for your future. Print this
email only if it is absolutely necessary.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] G-Reg 5.0.0 nightly build pack - 22/07/2015

2015-07-22 Thread Chandana Napagoda
Hi,

Please find $subject from[1].

[1].
https://svn.wso2.org/repos/wso2/scratch/G-Reg/5.0.0/nightlybuild/20150722/

Regards,
Chandana
-- 
*Chandana Napagoda*
Senior Software Engineer
WSO2 Inc. - http://wso2.org

*Email  :  chand...@wso2.com chand...@wso2.com**Mobile : +94718169299*

*Blog  :http://cnapagoda.blogspot.com http://cnapagoda.blogspot.com*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Please review and merge

2015-07-22 Thread Elilmatha Sivanesan
Hi Malaka,

Please review and merge PR [1]

[1]
*https://github.com/wso2/esb-connectors/pull/241
https://github.com/wso2/esb-connectors/pull/241*

Thank you.

-- 
*S.Elilmatha*
Associate  Software Engineer,

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

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


Re: [Dev] How to add a Servlet in DSS

2015-07-22 Thread Madhawa Gunasekara
Hi Thusitha,

Can we add wild-card option for the implementation ?

Thanks

On Wed, Jul 22, 2015 at 2:12 PM, Thusitha Thilina Dayaratne 
thusit...@wso2.com wrote:

 Hi Madhawa,

 AFAIU In the implementation it get the links and add them to a Map where
 key and value both are same. When we do a request it check from the map
 whether the key exist for the path. If exist it will be bypass otherwise it
 will redirect.
 In your case  /odataservices/* will be the key and when you request
 http://localhost:9443/odataservices/* since the link key matches this
 will bypass the login. But when you request something like
 http://localhost:9443/odataservices/abc then this will not match based on
 the implementation so it will redirect to the login page.

 Thanks
 Thusitha

 On Tue, Jul 21, 2015 at 6:34 PM, Madhawa Gunasekara madha...@wso2.com
 wrote:

 Kind reminder on this..!

 On Sat, Jul 4, 2015 at 9:39 AM, Madhawa Gunasekara madha...@wso2.com
 wrote:

 Hi All,

 I was able to invoke the servlet by using above mentioned reference. but
 I couldn't skip the login page for the all the scenarios. I was able to
 skip the login page for only https://192.168.1.103:9443/odataservices/*
 url request only. Please find my servlet declaration below. I need to
 handle requests like '
 https://192.168.1.103:9443/odataservices/wso2services' from the
 servlet. which begining with particular word 'odataservices'.

 Any help on this matter in highly appreciated.

 What should I missing here ?

 component xmlns=http://products.wso2.org/carbon;

 servlets
 servlet id=ODataServlet
 servlet-nameODataServlet/servlet-name
 url-pattern/odataservices/*/url-pattern
 display-nameOData Services Callback Servlet/display-name
 
 servlet-classorg.wso2.carbon.dataservices.odata.ODataServlet/servlet-class
 /servlet
 /servlets
 framework-configuration
 bypass
 authentication
 link/odataservices/*/link
 /authentication
 /bypass
 /framework-configuration
 /component


 Thanks,
 Madhawa

 On Fri, Jul 3, 2015 at 5:20 PM, Madhawa Gunasekara madha...@wso2.com
 wrote:

 Hi All,

 I have requirement to insert a servlet in DSS to process some specific
 http requests( GET,POST). I have done some implementations by refering [1].
 but when I send the request it will redirect to the login page due to
 the authentications, How can I fixed that? and also servlet methods didn't
 hit but I can find my servlet class in Servlet listings also.

 [2015-07-03 15:20:30,885] DEBUG
 {org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions} -  Listing all
 Servlet items as of now...
 [2015-07-03 15:20:30,885] DEBUG
 {org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions} -
 ---ServletDefinition = ODataservicesCallbackServlet :
 DataservicesCallbackServlet

 Any help on this matter is highly appreciated.

 [1]
 https://github.com/madhawa-gunasekara/carbon-commons/blob/master/components/ntask/org.wso2.carbon.ntask.core/src/main/resources/META-INF/component.xml

 Thanks,
 Madhawa
 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: *http://lk.linkedin.com/in/mgunasekara
 http://lk.linkedin.com/in/mgunasekara*




 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: *http://lk.linkedin.com/in/mgunasekara
 http://lk.linkedin.com/in/mgunasekara*




 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: *http://lk.linkedin.com/in/mgunasekara
 http://lk.linkedin.com/in/mgunasekara*

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




 --
 Thusitha Dayaratne
 Software Engineer
 WSO2 Inc. - lean . enterprise . middleware |  wso2.com

 Mobile  +94712756809
 Blog  alokayasoya.blogspot.com
 Abouthttp://about.me/thusithathilina




-- 
*Madhawa Gunasekara*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 719411002 +94+719411002
blog: *http://madhawa-gunasekara.blogspot.com
http://madhawa-gunasekara.blogspot.com*
linkedin: *http://lk.linkedin.com/in/mgunasekara
http://lk.linkedin.com/in/mgunasekara*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Automated tests to tests Application Server with Apache Ldap as a User Store

2015-07-22 Thread Nuwan Wimalasekara
Hi Kasun,

Please find the inline answers.

On Tue, Jul 21, 2015 at 8:39 PM, KasunG Gajasinghe kas...@wso2.com wrote:

 Hi Nuwan,

 Can you please answer following questions regarding this PR?

 1. Can you rename to module name tests-with-ldap to
 tests-ldap-userstores. I believe that's more meaningful.


Yes. This is more meaningful. will rename the module


 2. Shouldn't the distribution-with-apache-ldap be placed under
 tests-common module? We need a proper name for this module as well, since
 for new eyes, the name seems to be less meaningful. How about
 ldap-installed-wso2as-distribution? Please let me know if you have a better
 name. :-)


I do not think the module which build distribution move into tests-common
module. tests-common module contains the AS test utilities. Having a new
distribution in integration level is fine.

I will discuss and put a meaningful name for the module which built AS
distribution having Apache Ldap server feature itself


 3. What does it mean to have a test case with only a @Factory annotation -
 ReadWriteLdapUserStoreAdminUserTestCase


I did not duplicate the UserManagement Test cases in this test module. I
reuse the same user management test cases which are in the tests module
already implemented for JDBC user store. So I implement a new class
extending the existing class. Then same test methods are executing against
the readwrite Ldap user store . In that class We have to implement a
constructor with @Factory annotation referring the same data provider in
order to execute the test class.


 4. The sub-modules should not have the version tag in maven dependencies.
 The version should be defined in the root pom.


Fixed it by removing version.

Thanks,
Nuwanw


 Thanks.


 On Tue, Jul 21, 2015 at 2:53 PM, Nuwan Wimalasekara nuw...@wso2.com
 wrote:

 Hi,

  We have integrate a tests module(tests-with-ldap)[1] in AS integration
 to test the user management in AS with apache Ldap server as the user
 store. Ldap server feature is installed on AS by building a distribution
 with ldap server feature and the built server is used by the
 tests-with-ldap module throughout the test execution.

 This module executes 100 test cases with the user store as ReadWrite and
 ReadOnly modes by changing the user-mgt.xml. All the user management test
 cases in tests module are executed against the ReadWrite Ldap user store
 and implemented a test class to test the ReadOnly Ldap functionalities as
 well.

 [1] https://github.com/wso2/product-as/pull/152

 Please refer the attached  surefire-reports.zip for test cases

 Thanks,
 Nuwanw

 --
 Nuwan Wimalasekara
 Senior Software Engineer - Test Automation
 WSO2, Inc.: http://wso2.com
 lean. enterprise. middleware

 phone: +94 71 668 4620






 --

 *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
 email: kasung AT spamfree wso2.com
 linked-in: http://lk.linkedin.com/in/gajasinghe
 blog: http://kasunbg.org






-- 
Nuwan Wimalasekara
Senior Software Engineer - Test Automation
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

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


Re: [Dev] API Manager associating a new version of an API with its previous version

2015-07-22 Thread Sajith Ariyarathna
Hi Uvindra,

As pointed out by RuwanA, AppM had a similar problem when creating a new
version of a web app based on an existing version. In AppM, when
'Publish'ing version *2.0.0* of web app *Foo* (which was created from *Foo*
version *1.0.0*), version *1.0.0* is 'Un-publish'ed (because only one
version of a web app is shown to end-users in the store) and subscriptions
from version *1.0.0* are moved to version *2.0.0*. This is not exactly your
situation in APIM, but you can see that subscriptions are moved to the new
version when it is 'Publish'ed.

Suggestion: you should give the option to the Publisher to decide whether
to copy or move subscriptions to the new version. You can give 03 options,
Copy Subscriptions to v2.0.0, Move Subscriptions to v2.0.0 and Do
Nothing. I believe it will improve the user experience for API Publisher.

As suggested by RuwanA, keeping the 'parentID' in the asset or in the DB
will also help to maintain a version hierarchy and in future releases you
can use that data to do API grouping or to show a versioning tree.

Thanks and Regards.


On Wed, Jul 22, 2015 at 1:00 PM, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 What if we keep the parent apiID in the asset itself, rather than in
 new DB column. (by adding the field to api.rxt)

 Cheers,
 Ruwan

 On Wed, Jul 22, 2015 at 12:44 PM, Uvindra Dias Jayasinha uvin...@wso2.com
  wrote:

 The correct way I can think of solving this is to store the apiID of the
 version that is being copied from in the newly created api object so that
 we can make the association later on when we are publishing the new api
 version.

 This means we will need to add a new column to the AM_API table to store
 this, hence Im trying to see if  there is an alternative.



 On 22 July 2015 at 12:38, Uvindra Dias Jayasinha uvin...@wso2.com
 wrote:

 Thanks for the suggestion Ruwan, but we are not on ES yet and wont be
 for sometime so we wont be able to exploit that feature.

 On 22 July 2015 at 12:32, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 We are having same issue and being solved in AppM 1.1.0. We were
 informed that ES 2.0 has grouping capability. So we may be exploit that to
 correlate versions. We plan to back-port some ES 2.0 functions to ES 1
 branch to get this done.

 SajithAR working on this.

 Cheers,
 Ruwan


 On Wed, Jul 22, 2015 at 12:21 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 This applies to API Manager 1.9.0, but this is true for previous
 versions as well. When trying to fix the following ticket[1] I came across
 this scenario,

1. API named *foo* with versions *1.0.0* and *2.0.0* has
existing subscriptions.
2. Create a new version of the same API *3.0.0* from *2.0.0*.
3. Publish API *foo:3.0.0* with the Require  Re-Subscription
option disabled.
4. What should happen is that the subscriptions of *foo:2.0.0*
should be applied to *foo:3.0.0 *automatically


 The problem is step *2 *and *3* above are separate so there is
 currently no association between *foo:2.0.0* and *foo:3.0.0*.

 So how do we determine which API version *foo:3.0.0* was created
 from so that we can transfer that APIs subscriptions at the time of
 publishing?

 Is there a way to do this without adding a new attribute to the newly
 created API to indicate whihc version it was copied from?

 [1] https://wso2.org/jira/browse/APIMANAGER-3971
 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736




 --
 Regards,
 Uvindra

 Mobile: 33962




 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736

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




-- 
Sajith Ariyarathna
Software Engineer; WSO2, Inc.;  http://wso2.com/
mobile: +94 77 6602284, +94 71 3951048
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Manager associating a new version of an API with its previous version

2015-07-22 Thread Uvindra Dias Jayasinha
I think what is trying to be achieved here is to iterate through all
existing versions of a given API and subscribe to all applications that
those API versions have subscribed to in the latest version.

For example,

*foo:1.0.0* is subscribed to by *Application1* and *foo:2.0.0* is
subscribed to by *Application2*. So with current logic *foo:3.0.0* will be
subscribed to by both *Application1* and *Application2*.

The problem is when both* foo:1.0.0* and *foo:2.0.0* are subscribed to
*Application1*.Then when publishing *foo:3.0.0 *we get the Subscription
Already Exists exception thrown in the JIRA ticket.

Instead of blindly trying to insert and triggering the exception we can
check to see if there is already an entry for a given ApiID, ApplicationID
and TierID in the AM_SUBSCRIPTION table. If there is already(as we can see
in the above example which is valid) then we simply should not add the
subscription. No rxt or DB changes needed, WDYT?


On 22 July 2015 at 13:56, Nuwan Dias nuw...@wso2.com wrote:

 Adding this to the rxt is the correct way IMO. But we have to be careful
 when fixing this for API Manager 1.9.1. We cannot do migrations for 1.9.1.
 Hence cannot introduce rxt changes. Since the error trace is harmless, I
 think we should comment and ignore the error for 1.9.1 and make it a point
 to fix properly in 1.10.

 Thanks,
 NuwanD.

 On Wed, Jul 22, 2015 at 1:54 PM, Sanjeewa Malalgoda sanje...@wso2.com
 wrote:

 Adding new field to rxt would be ideal IMO. I noticed some users already
 reported this issue.

 Thanks,
 sanjeewa.

 On Wed, Jul 22, 2015 at 1:00 PM, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 What if we keep the parent apiID in the asset itself, rather than in
 new DB column. (by adding the field to api.rxt)

 Cheers,
 Ruwan

 On Wed, Jul 22, 2015 at 12:44 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 The correct way I can think of solving this is to store the apiID of
 the version that is being copied from in the newly created api object so
 that we can make the association later on when we are publishing the new
 api version.

 This means we will need to add a new column to the AM_API table to
 store this, hence Im trying to see if  there is an alternative.



 On 22 July 2015 at 12:38, Uvindra Dias Jayasinha uvin...@wso2.com
 wrote:

 Thanks for the suggestion Ruwan, but we are not on ES yet and wont be
 for sometime so we wont be able to exploit that feature.

 On 22 July 2015 at 12:32, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 We are having same issue and being solved in AppM 1.1.0. We were
 informed that ES 2.0 has grouping capability. So we may be exploit that 
 to
 correlate versions. We plan to back-port some ES 2.0 functions to ES 1
 branch to get this done.

 SajithAR working on this.

 Cheers,
 Ruwan


 On Wed, Jul 22, 2015 at 12:21 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 This applies to API Manager 1.9.0, but this is true for previous
 versions as well. When trying to fix the following ticket[1] I came 
 across
 this scenario,

1. API named *foo* with versions *1.0.0* and *2.0.0* has
existing subscriptions.
2. Create a new version of the same API *3.0.0* from *2.0.0*.
3. Publish API *foo:3.0.0* with the Require  Re-Subscription
option disabled.
4. What should happen is that the subscriptions of *foo:2.0.0*
should be applied to *foo:3.0.0 *automatically


 The problem is step *2 *and *3* above are separate so there is
 currently no association between *foo:2.0.0* and *foo:3.0.0*.

 So how do we determine which API version *foo:3.0.0* was created
 from so that we can transfer that APIs subscriptions at the time of
 publishing?

 Is there a way to do this without adding a new attribute to the
 newly created API to indicate whihc version it was copied from?

 [1] https://wso2.org/jira/browse/APIMANAGER-3971
 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736




 --
 Regards,
 Uvindra

 Mobile: 33962




 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736

 ___
 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
 

Re: [Dev] [IS] Is there an API to access tenant key store

2015-07-22 Thread Chathura Priyankara
Hi Thilini,

We cannot get the key store manager instance as above mentioned way from a
test case, because the test case is running out side of the OSGi
environment of running server.
So I think we have to get the tenant key store
through KeyStoreAdminServiceStub.

Thanks,
Chathura.

On Wed, Jul 22, 2015 at 10:49 AM, Thilini Cooray thili...@wso2.com wrote:

 Hi,

 org.wso2.carbon.core.util.KeyStoreManager can be used for accessing tenant
 key store as follows.

 KeyStoreManager tenantKeyStoreManager = KeyStoreManager.getInstance(tenantId);

 KeyStoreManager contains a function called getKeyStore for retrieving key 
 store.

 Thanks.



 On Wed, Jul 22, 2015 at 10:35 AM, Chathura Priyankara chathu...@wso2.com
 wrote:

 Hi,

 I'm writing some test cases to test the multi-tenancy functionality in
 AS.
 For that I want to access tenant key store after adding a tenant. Is
 there any API to access tenant key store ?

 Thanks,
 Charhuara.
 --
 Chathura Priyankara
 Software Engineer | WSO2 Inc.
 Mobile : +94718795340
 Blog : www.codeoncloud.blogspot.com

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




 --
 Best Regards,

 *Thilini Cooray*
 Software Engineer
 Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
 E-mail : thili...@wso2.com

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware




-- 
Chathura Priyankara
Software Engineer | WSO2 Inc.
Mobile : +94718795340
Blog : www.codeoncloud.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Manager associating a new version of an API with its previous version

2015-07-22 Thread Nuwan Dias
Adding this to the rxt is the correct way IMO. But we have to be careful
when fixing this for API Manager 1.9.1. We cannot do migrations for 1.9.1.
Hence cannot introduce rxt changes. Since the error trace is harmless, I
think we should comment and ignore the error for 1.9.1 and make it a point
to fix properly in 1.10.

Thanks,
NuwanD.

On Wed, Jul 22, 2015 at 1:54 PM, Sanjeewa Malalgoda sanje...@wso2.com
wrote:

 Adding new field to rxt would be ideal IMO. I noticed some users already
 reported this issue.

 Thanks,
 sanjeewa.

 On Wed, Jul 22, 2015 at 1:00 PM, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 What if we keep the parent apiID in the asset itself, rather than in
 new DB column. (by adding the field to api.rxt)

 Cheers,
 Ruwan

 On Wed, Jul 22, 2015 at 12:44 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 The correct way I can think of solving this is to store the apiID of the
 version that is being copied from in the newly created api object so that
 we can make the association later on when we are publishing the new api
 version.

 This means we will need to add a new column to the AM_API table to store
 this, hence Im trying to see if  there is an alternative.



 On 22 July 2015 at 12:38, Uvindra Dias Jayasinha uvin...@wso2.com
 wrote:

 Thanks for the suggestion Ruwan, but we are not on ES yet and wont be
 for sometime so we wont be able to exploit that feature.

 On 22 July 2015 at 12:32, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 We are having same issue and being solved in AppM 1.1.0. We were
 informed that ES 2.0 has grouping capability. So we may be exploit that to
 correlate versions. We plan to back-port some ES 2.0 functions to ES 1
 branch to get this done.

 SajithAR working on this.

 Cheers,
 Ruwan


 On Wed, Jul 22, 2015 at 12:21 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 This applies to API Manager 1.9.0, but this is true for previous
 versions as well. When trying to fix the following ticket[1] I came 
 across
 this scenario,

1. API named *foo* with versions *1.0.0* and *2.0.0* has
existing subscriptions.
2. Create a new version of the same API *3.0.0* from *2.0.0*.
3. Publish API *foo:3.0.0* with the Require  Re-Subscription
option disabled.
4. What should happen is that the subscriptions of *foo:2.0.0*
should be applied to *foo:3.0.0 *automatically


 The problem is step *2 *and *3* above are separate so there is
 currently no association between *foo:2.0.0* and *foo:3.0.0*.

 So how do we determine which API version *foo:3.0.0* was created
 from so that we can transfer that APIs subscriptions at the time of
 publishing?

 Is there a way to do this without adding a new attribute to the newly
 created API to indicate whihc version it was copied from?

 [1] https://wso2.org/jira/browse/APIMANAGER-3971
 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736




 --
 Regards,
 Uvindra

 Mobile: 33962




 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736

 ___
 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




-- 
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


[Dev] API Manager associating a new version of an API with its previous version

2015-07-22 Thread Uvindra Dias Jayasinha
This applies to API Manager 1.9.0, but this is true for previous versions
as well. When trying to fix the following ticket[1] I came across this
scenario,

   1. API named *foo* with versions *1.0.0* and *2.0.0* has existing
   subscriptions.
   2. Create a new version of the same API *3.0.0* from *2.0.0*.
   3. Publish API *foo:3.0.0* with the Require  Re-Subscription option
   disabled.
   4. What should happen is that the subscriptions of *foo:2.0.0* should
   be applied to *foo:3.0.0 *automatically


The problem is step *2 *and *3* above are separate so there is currently no
association between *foo:2.0.0* and *foo:3.0.0*.

So how do we determine which API version *foo:3.0.0* was created from so
that we can transfer that APIs subscriptions at the time of publishing?

Is there a way to do this without adding a new attribute to the newly
created API to indicate whihc version it was copied from?

[1] https://wso2.org/jira/browse/APIMANAGER-3971
-- 
Regards,
Uvindra

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


Re: [Dev] API Manager associating a new version of an API with its previous version

2015-07-22 Thread Ruwan Abeykoon
Hi Uvindra,
What if we keep the parent apiID in the asset itself, rather than in new
DB column. (by adding the field to api.rxt)

Cheers,
Ruwan

On Wed, Jul 22, 2015 at 12:44 PM, Uvindra Dias Jayasinha uvin...@wso2.com
wrote:

 The correct way I can think of solving this is to store the apiID of the
 version that is being copied from in the newly created api object so that
 we can make the association later on when we are publishing the new api
 version.

 This means we will need to add a new column to the AM_API table to store
 this, hence Im trying to see if  there is an alternative.



 On 22 July 2015 at 12:38, Uvindra Dias Jayasinha uvin...@wso2.com wrote:

 Thanks for the suggestion Ruwan, but we are not on ES yet and wont be for
 sometime so we wont be able to exploit that feature.

 On 22 July 2015 at 12:32, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 We are having same issue and being solved in AppM 1.1.0. We were
 informed that ES 2.0 has grouping capability. So we may be exploit that to
 correlate versions. We plan to back-port some ES 2.0 functions to ES 1
 branch to get this done.

 SajithAR working on this.

 Cheers,
 Ruwan


 On Wed, Jul 22, 2015 at 12:21 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 This applies to API Manager 1.9.0, but this is true for previous
 versions as well. When trying to fix the following ticket[1] I came across
 this scenario,

1. API named *foo* with versions *1.0.0* and *2.0.0* has
existing subscriptions.
2. Create a new version of the same API *3.0.0* from *2.0.0*.
3. Publish API *foo:3.0.0* with the Require  Re-Subscription
option disabled.
4. What should happen is that the subscriptions of *foo:2.0.0*
should be applied to *foo:3.0.0 *automatically


 The problem is step *2 *and *3* above are separate so there is
 currently no association between *foo:2.0.0* and *foo:3.0.0*.

 So how do we determine which API version *foo:3.0.0* was created
 from so that we can transfer that APIs subscriptions at the time of
 publishing?

 Is there a way to do this without adding a new attribute to the newly
 created API to indicate whihc version it was copied from?

 [1] https://wso2.org/jira/browse/APIMANAGER-3971
 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736




 --
 Regards,
 Uvindra

 Mobile: 33962




 --
 Regards,
 Uvindra

 Mobile: 33962

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




-- 

*Ruwan Abeykoon*
*Architect,*
*WSO2, Inc. http://wso2.com http://wso2.com/ *
*lean.enterprise.middleware.*

email: ruw...@wso2.com
phone:(+94) 39736
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Manager associating a new version of an API with its previous version

2015-07-22 Thread Ruwan Abeykoon
Hi Uvindra,
We are having same issue and being solved in AppM 1.1.0. We were informed
that ES 2.0 has a grouping capability, exposed by registry. So we may be
exploit that to correlate versions. We plan to back-port some ES 2.0
functions to ES 1 branch to get this done.

Sajith (AR) working on this.

Cheers,
Ruwan

On Wed, Jul 22, 2015 at 12:21 PM, Uvindra Dias Jayasinha uvin...@wso2.com
wrote:

 This applies to API Manager 1.9.0, but this is true for previous versions
 as well. When trying to fix the following ticket[1] I came across this
 scenario,

1. API named *foo* with versions *1.0.0* and *2.0.0* has
existing subscriptions.
2. Create a new version of the same API *3.0.0* from *2.0.0*.
3. Publish API *foo:3.0.0* with the Require  Re-Subscription
option disabled.
4. What should happen is that the subscriptions of *foo:2.0.0*
should be applied to *foo:3.0.0 *automatically


 The problem is step *2 *and *3* above are separate so there is currently
 no association between *foo:2.0.0* and *foo:3.0.0*.

 So how do we determine which API version *foo:3.0.0* was created from
 so that we can transfer that APIs subscriptions at the time of publishing?

 Is there a way to do this without adding a new attribute to the newly
 created API to indicate whihc version it was copied from?

 [1] https://wso2.org/jira/browse/APIMANAGER-3971
 --
 Regards,
 Uvindra

 Mobile: 33962

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




-- 

*Ruwan Abeykoon*
*Architect,*
*WSO2, Inc. http://wso2.com http://wso2.com/ *
*lean.enterprise.middleware.*

email: ruw...@wso2.com
phone:(+94) 39736
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Manager associating a new version of an API with its previous version

2015-07-22 Thread Uvindra Dias Jayasinha
The correct way I can think of solving this is to store the apiID of the
version that is being copied from in the newly created api object so that
we can make the association later on when we are publishing the new api
version.

This means we will need to add a new column to the AM_API table to store
this, hence Im trying to see if  there is an alternative.



On 22 July 2015 at 12:38, Uvindra Dias Jayasinha uvin...@wso2.com wrote:

 Thanks for the suggestion Ruwan, but we are not on ES yet and wont be for
 sometime so we wont be able to exploit that feature.

 On 22 July 2015 at 12:32, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 We are having same issue and being solved in AppM 1.1.0. We were informed
 that ES 2.0 has grouping capability. So we may be exploit that to correlate
 versions. We plan to back-port some ES 2.0 functions to ES 1 branch to get
 this done.

 SajithAR working on this.

 Cheers,
 Ruwan


 On Wed, Jul 22, 2015 at 12:21 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 This applies to API Manager 1.9.0, but this is true for previous
 versions as well. When trying to fix the following ticket[1] I came across
 this scenario,

1. API named *foo* with versions *1.0.0* and *2.0.0* has
existing subscriptions.
2. Create a new version of the same API *3.0.0* from *2.0.0*.
3. Publish API *foo:3.0.0* with the Require  Re-Subscription
option disabled.
4. What should happen is that the subscriptions of *foo:2.0.0*
should be applied to *foo:3.0.0 *automatically


 The problem is step *2 *and *3* above are separate so there is
 currently no association between *foo:2.0.0* and *foo:3.0.0*.

 So how do we determine which API version *foo:3.0.0* was created from
 so that we can transfer that APIs subscriptions at the time of publishing?

 Is there a way to do this without adding a new attribute to the newly
 created API to indicate whihc version it was copied from?

 [1] https://wso2.org/jira/browse/APIMANAGER-3971
 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736




 --
 Regards,
 Uvindra

 Mobile: 33962




-- 
Regards,
Uvindra

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


Re: [Dev] User already exist when AD as a userstore

2015-07-22 Thread Udara Liyanage
Hi,

I used org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager
usermanager for AD

On Wed, Jul 22, 2015 at 2:02 PM, Udara Liyanage ud...@wso2.com wrote:

 Hi,

 I tried adding a AD as a RW userstore and encountered the following
 exception. I tried setting AddAdmin false but found no luck. Then I changed
 admin name to admin1 and encountered the exception [2](*One or more
 attributes you are trying to add/update are not supported by underlying
 LDAP*). Please note that I am using IS 410.

 [2015-07-22 13:52:02,484]  INFO
 {org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager} -  LDAP
 connection created successfully in read-write mode
 [2015-07-22 13:52:03,179] ERROR
 {org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager} -  Can not
 access the directory context or user already exists in the system
 javax.naming.NameAlreadyBoundException: [LDAP: error code 68 - 2071:
 UpdErr: DSID-0305031D, problem 6005 (ENTRY_EXISTS), data 0
 ]; remaining name 'cn=admin'
 at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3062)
 at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3013)
 at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2820)
 at com.sun.jndi.ldap.LdapCtx.c_bind(LdapCtx.java:400)
 at
 com.sun.jndi.toolkit.ctx.ComponentDirContext.p_bind(ComponentDirContext.java:277)
 at
 com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.bind(PartialCompositeDirContext.java:197)
 at
 org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.doAddUser(ReadWriteLDAPUserStoreManager.java:242)
 at
 org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.doAddUser(ReadWriteLDAPUserStoreManager.java:211)
 at
 org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.addInitialData(ReadWriteLDAPUserStoreManager.java:1805)
 at
 org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.init(ReadWriteLDAPUserStoreManager.java:142)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at
 org.wso2.carbon.user.core.common.DefaultRealm.createObjectWithOptions(DefaultRealm.java:225)
 at
 org.wso2.carbon.user.core.common.DefaultRealm.initializeObjects(DefaultRealm.java:147)
 at
 org.wso2.carbon.user.core.common.DefaultRealm.init(DefaultRealm.java:113)
 at
 org.wso2.carbon.user.core.common.DefaultRealmService.initializeRealm(DefaultRealmService.java:223)
 at
 org.wso2.carbon.user.core.common.DefaultRealmService.init(DefaultRealmService.java:103)
 at
 org.wso2.carbon.user.core.common.DefaultRealmService.init(DefaultRealmService.java:116)
 at
 org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:67)
 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
 org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
 at
 org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
 [2015-07-22 13:52:03,181] ERROR
 {org.wso2.carbon.user.core.common.DefaultRealm} -  Cannot create
 org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager
 java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at
 

Re: [Dev] API Manager associating a new version of an API with its previous version

2015-07-22 Thread Uvindra Dias Jayasinha
@Sajith, we already have those options you have mentioned in API Manager,
if we are publishing a new version of an API either we can choose to make
the users of the API to re-subscribe or we can automatically transfer over
the subscriptions from the previous version.

On 22 July 2015 at 14:25, Sajith Ariyarathna sajit...@wso2.com wrote:

 Hi Uvindra,

 As pointed out by RuwanA, AppM had a similar problem when creating a new
 version of a web app based on an existing version. In AppM, when
 'Publish'ing version *2.0.0* of web app *Foo* (which was created from
 *Foo* version *1.0.0*), version *1.0.0* is 'Un-publish'ed (because only
 one version of a web app is shown to end-users in the store) and subscriptions
 from version *1.0.0* are moved to version *2.0.0*. This is not exactly
 your situation in APIM, but you can see that subscriptions are moved to the
 new version when it is 'Publish'ed.

 Suggestion: you should give the option to the Publisher to decide whether
 to copy or move subscriptions to the new version. You can give 03 options,
 Copy Subscriptions to v2.0.0, Move Subscriptions to v2.0.0 and Do
 Nothing. I believe it will improve the user experience for API Publisher.

 As suggested by RuwanA, keeping the 'parentID' in the asset or in the DB
 will also help to maintain a version hierarchy and in future releases you
 can use that data to do API grouping or to show a versioning tree.

 Thanks and Regards.


 On Wed, Jul 22, 2015 at 1:00 PM, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 What if we keep the parent apiID in the asset itself, rather than in
 new DB column. (by adding the field to api.rxt)

 Cheers,
 Ruwan

 On Wed, Jul 22, 2015 at 12:44 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 The correct way I can think of solving this is to store the apiID of the
 version that is being copied from in the newly created api object so that
 we can make the association later on when we are publishing the new api
 version.

 This means we will need to add a new column to the AM_API table to store
 this, hence Im trying to see if  there is an alternative.



 On 22 July 2015 at 12:38, Uvindra Dias Jayasinha uvin...@wso2.com
 wrote:

 Thanks for the suggestion Ruwan, but we are not on ES yet and wont be
 for sometime so we wont be able to exploit that feature.

 On 22 July 2015 at 12:32, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 We are having same issue and being solved in AppM 1.1.0. We were
 informed that ES 2.0 has grouping capability. So we may be exploit that to
 correlate versions. We plan to back-port some ES 2.0 functions to ES 1
 branch to get this done.

 SajithAR working on this.

 Cheers,
 Ruwan


 On Wed, Jul 22, 2015 at 12:21 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 This applies to API Manager 1.9.0, but this is true for previous
 versions as well. When trying to fix the following ticket[1] I came 
 across
 this scenario,

1. API named *foo* with versions *1.0.0* and *2.0.0* has
existing subscriptions.
2. Create a new version of the same API *3.0.0* from *2.0.0*.
3. Publish API *foo:3.0.0* with the Require  Re-Subscription
option disabled.
4. What should happen is that the subscriptions of *foo:2.0.0*
should be applied to *foo:3.0.0 *automatically


 The problem is step *2 *and *3* above are separate so there is
 currently no association between *foo:2.0.0* and *foo:3.0.0*.

 So how do we determine which API version *foo:3.0.0* was created
 from so that we can transfer that APIs subscriptions at the time of
 publishing?

 Is there a way to do this without adding a new attribute to the newly
 created API to indicate whihc version it was copied from?

 [1] https://wso2.org/jira/browse/APIMANAGER-3971
 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736




 --
 Regards,
 Uvindra

 Mobile: 33962




 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736

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




 --
 Sajith Ariyarathna
 Software Engineer; WSO2, Inc.;  http://wso2.com/
 mobile: +94 77 6602284, +94 71 3951048




-- 
Regards,
Uvindra

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


[Dev] Source code for wso2 API Manager 1.8

2015-07-22 Thread rohit
Hello All,

Where Can I find source code for  wso2 API Manager 1.8? I was able to find
source for 1.9 at github
Thanks in advance.



--
View this message in context: 
http://wso2-oxygen-tank.10903.n7.nabble.com/Source-code-for-wso2-API-Manager-1-8-tp122130.html
Sent from the WSO2 Development mailing list archive at Nabble.com.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] When Will be the Greg 5.0.0 new features are available in the Documentation

2015-07-22 Thread Chalitha Waldeniyage
Hi Chandana,

We don't have access permission for the gdoc which you have pointed
above.
Can you please provide us the required permission for all the new features
gdocs. So that we can carry on the testing.

On Wed, Jul 22, 2015 at 11:28 AM, Chandana Napagoda chand...@wso2.com
wrote:

 Hi Chamitha,

 For the each redmine task, there is a related DOC Jira, where you can find
 related doc links.

 Ex: https://redmine.wso2.com/issues/478 :
 https://wso2.org/jira/browse/DOCUMENTATION-1602

 Regards,
 Chandana

 On Wed, Jul 22, 2015 at 11:12 AM, Chalitha Waldeniyage chali...@wso2.com
 wrote:

 Hi Shazni,

 I have followed [1] in readmine issues and i couldn't find any. Can you
 please point me to the doc links already been added.

 [1] https://redmine.wso2.com/milestones/20

 On Wed, Jul 22, 2015 at 11:04 AM, Shazni Nazeer sha...@wso2.com wrote:

 Hi Chalitha,

 Until the docs are ready, you can find the documentation for features
 and improvements in the redmine it self. In the redmine there's a link to
 the document under section Documentation Link:

 Shazni Nazeer
 Mob : +94 37331
 LinkedIn : http://lk.linkedin.com/in/shazninazeer
 Blog : http://shazninazeer.blogspot.com

 On Wed, Jul 22, 2015 at 9:58 AM, Chalitha Waldeniyage chali...@wso2.com
  wrote:

 Hi Tania,

 Until you ready with new doc links, do we have any draft doc references
 in order to carry on this.

 Thank you,
 Chalitha.


 On Mon, Jul 20, 2015 at 6:00 PM, Chalitha Waldeniyage 
 chali...@wso2.com wrote:

 Hi,

 Currently we are following the [1] and [2] for Greg 5.0.0  Alpha
 testing and Need to have new features in Greg 5.0.0 documentation for
 testing.Can you please confirm the  $subject in order to continue the
 testing with new features.

 [1]
 https://docs.wso2.com/display/Governance500/WSO2+Governance+Registry+Documentation

 [2] https://redmine.wso2.com/milestones/20


 Thank you,
 Chalitha.


 --
 *Chalitha Maheshwari*
 Software Engineer-QA,
 WSO2 Inc.

 *E-mail:* chali...@wso2.com
 *Mobile: *+94710 411 112




 --
 *Chalitha Maheshwari*
 Software Engineer-QA,
 WSO2 Inc.

 *E-mail:* chali...@wso2.com
 *Mobile: *+94710 411 112

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





 --
 *Chalitha Maheshwari*
 Software Engineer-QA,
 WSO2 Inc.

 *E-mail:* chali...@wso2.com
 *Mobile: *+94710 411 112

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




 --
 *Chandana Napagoda*
 Senior Software Engineer
 WSO2 Inc. - http://wso2.org

 *Email  :  chand...@wso2.com chand...@wso2.com**Mobile : +94718169299
 %2B94718169299*

 *Blog  :http://cnapagoda.blogspot.com http://cnapagoda.blogspot.com*




-- 
*Chalitha Maheshwari*
Software Engineer-QA,
WSO2 Inc.

*E-mail:* chali...@wso2.com
*Mobile: *+94710 411 112
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fetch Email Id from Wso2 Store buser signup section/b

2015-07-22 Thread rohit
Thank you that helped :D



--
View this message in context: 
http://wso2-oxygen-tank.10903.n7.nabble.com/Fetch-Email-Id-from-Wso2-Store-b-user-signup-section-b-tp121955p122128.html
Sent from the WSO2 Development mailing list archive at Nabble.com.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [CDM] Device attribute within the Enrolment Class

2015-07-22 Thread Milan Perera
Hi Ayyoob,

The actual use case for this is there are some cases where we should only
need to have the enrolment info of a particular device. In that case we
should be able to keep the reference of the device along with the enrolment
info. That's why we have used device bean again inside of the enrolment
info in order to keep the reference.

However, there is no need to keep the complete device object inside the
enrolment info since it only requires the device identifier to identify the
device. We will change it ASAP.
Thank you for pointing it out.

Regards,

On Wed, Jul 22, 2015 at 8:06 AM, Ayyoob Hamza ayy...@wso2.com wrote:

 Hi,
 In CDM, Device class[1] has an attribute called EnrolmentInfo[2]. What is
 the reason for having a Device attribute once again within the
 EnrolmentInfo class ?.


 [1]
 https://github.com/wso2/carbon-device-mgt/blob/master/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/Device.java
 [2]
 https://github.com/wso2/carbon-device-mgt/blob/a5a9d02deec97dfd69d04c3b5c747fd3215a1323/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/EnrolmentInfo.java

 Thanks,
 *Ayyoob Hamza*
 *Software Engineer*
 WSO2 Inc.; http://wso2.com
 email: ayy...@wso2.com cell: +94 77 1681010 %2B94%2077%207779495

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




-- 
Milan Harindu Perera
Software Engineer
*WSO2, Inc*
(+94) 77 309 7088
lean . enterprise . middleware
http://lk.linkedin.com/in/milanharinduperera
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Source code for wso2 API Manager 1.8

2015-07-22 Thread Uvindra Dias Jayasinha
Hi Rohit,

API Manager 1.8.0 is not on github and is only available via our public svn
repo, please refer[1].

API Manager source code is here[2] and you will need to refer to this
pom[3] to identify which component source versions to refer to for API
Manager 1.8.0

[1] https://docs.wso2.com/display/AM180/Building+from+Source
[2]
https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/apimgt/
[3]
https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/product-releases/chunk-14/components/pom.xml

On 22 July 2015 at 11:12, rohit rohitab...@gmail.com wrote:

 Hello All,

 Where Can I find source code for  wso2 API Manager 1.8? I was able to find
 source for 1.9 at github
 Thanks in advance.



 --
 View this message in context:
 http://wso2-oxygen-tank.10903.n7.nabble.com/Source-code-for-wso2-API-Manager-1-8-tp122130.html
 Sent from the WSO2 Development mailing list archive at Nabble.com.
 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 
Regards,
Uvindra

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


Re: [Dev] [IS] Is there an API to access tenant key store

2015-07-22 Thread Chamath Gunawardana
Hi Thilini,

The refereed link by you is a temp location used by me for some time back.
Hence please use [2] for the same artifact.

[2] -
https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/platform-integration/test-automation-framework/4.2.8/org.wso2.carbon.automation.api/src/main/java/org/wso2/carbon/automation/api/clients/security/KeyStoreAdminServiceClient.java


Thanks,
Chamath

On Wed, Jul 22, 2015 at 12:40 PM, Thilini Cooray thili...@wso2.com wrote:

 Hi,

 Yes, you will be able to access the tenant key store via
 KeyStoreAdminService.
 [1] contains a KeyStoreAdminServiceClient which might be useful for you.

 [1]
 https://svn.wso2.org/repos/wso2/people/chamathg/sandbox/test-automation-framework/org.wso2.carbon.automation.api/src/main/java/org/wso2/carbon/automation/api/clients/security/KeyStoreAdminServiceClient.java

 Thanks.

 On Wed, Jul 22, 2015 at 12:18 PM, Chathura Priyankara chathu...@wso2.com
 wrote:

 Hi Thilini,

 We cannot get the key store manager instance as above mentioned way from
 a test case, because the test case is running out side of the OSGi
 environment of running server.
 So I think we have to get the tenant key store
 through KeyStoreAdminServiceStub.

 Thanks,
 Chathura.

 On Wed, Jul 22, 2015 at 10:49 AM, Thilini Cooray thili...@wso2.com
 wrote:

 Hi,

 org.wso2.carbon.core.util.KeyStoreManager can be used for accessing
 tenant key store as follows.

 KeyStoreManager tenantKeyStoreManager = 
 KeyStoreManager.getInstance(tenantId);

 KeyStoreManager contains a function called getKeyStore for retrieving key 
 store.

 Thanks.



 On Wed, Jul 22, 2015 at 10:35 AM, Chathura Priyankara 
 chathu...@wso2.com wrote:

 Hi,

 I'm writing some test cases to test the multi-tenancy functionality in
 AS.
 For that I want to access tenant key store after adding a tenant. Is
 there any API to access tenant key store ?

 Thanks,
 Charhuara.
 --
 Chathura Priyankara
 Software Engineer | WSO2 Inc.
 Mobile : +94718795340
 Blog : www.codeoncloud.blogspot.com

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




 --
 Best Regards,

 *Thilini Cooray*
 Software Engineer
 Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
 E-mail : thili...@wso2.com

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware




 --
 Chathura Priyankara
 Software Engineer | WSO2 Inc.
 Mobile : +94718795340
 Blog : www.codeoncloud.blogspot.com




 --
 Best Regards,

 *Thilini Cooray*
 Software Engineer
 Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
 E-mail : thili...@wso2.com

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware

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




-- 
Thanks,
Best Regards,
Chamath Gunawardana
Technical Lead; WSO2 Inc.
Mobile : +94776322240
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS] Is there an API to access tenant key store

2015-07-22 Thread Thilini Cooray
Thank you Chamath for the update.

On Wed, Jul 22, 2015 at 3:06 PM, Chamath Gunawardana chama...@wso2.com
wrote:

 Hi Thilini,

 The refereed link by you is a temp location used by me for some time back.
 Hence please use [2] for the same artifact.

 [2] -
 https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/platform-integration/test-automation-framework/4.2.8/org.wso2.carbon.automation.api/src/main/java/org/wso2/carbon/automation/api/clients/security/KeyStoreAdminServiceClient.java


 Thanks,
 Chamath

 On Wed, Jul 22, 2015 at 12:40 PM, Thilini Cooray thili...@wso2.com
 wrote:

 Hi,

 Yes, you will be able to access the tenant key store via
 KeyStoreAdminService.
 [1] contains a KeyStoreAdminServiceClient which might be useful for you.

 [1]
 https://svn.wso2.org/repos/wso2/people/chamathg/sandbox/test-automation-framework/org.wso2.carbon.automation.api/src/main/java/org/wso2/carbon/automation/api/clients/security/KeyStoreAdminServiceClient.java

 Thanks.

 On Wed, Jul 22, 2015 at 12:18 PM, Chathura Priyankara chathu...@wso2.com
  wrote:

 Hi Thilini,

 We cannot get the key store manager instance as above mentioned way from
 a test case, because the test case is running out side of the OSGi
 environment of running server.
 So I think we have to get the tenant key store
 through KeyStoreAdminServiceStub.

 Thanks,
 Chathura.

 On Wed, Jul 22, 2015 at 10:49 AM, Thilini Cooray thili...@wso2.com
 wrote:

 Hi,

 org.wso2.carbon.core.util.KeyStoreManager can be used for accessing
 tenant key store as follows.

 KeyStoreManager tenantKeyStoreManager = 
 KeyStoreManager.getInstance(tenantId);

 KeyStoreManager contains a function called getKeyStore for retrieving 
 key store.

 Thanks.



 On Wed, Jul 22, 2015 at 10:35 AM, Chathura Priyankara 
 chathu...@wso2.com wrote:

 Hi,

 I'm writing some test cases to test the multi-tenancy functionality in
 AS.
 For that I want to access tenant key store after adding a tenant. Is
 there any API to access tenant key store ?

 Thanks,
 Charhuara.
 --
 Chathura Priyankara
 Software Engineer | WSO2 Inc.
 Mobile : +94718795340
 Blog : www.codeoncloud.blogspot.com

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




 --
 Best Regards,

 *Thilini Cooray*
 Software Engineer
 Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
 E-mail : thili...@wso2.com

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware




 --
 Chathura Priyankara
 Software Engineer | WSO2 Inc.
 Mobile : +94718795340
 Blog : www.codeoncloud.blogspot.com




 --
 Best Regards,

 *Thilini Cooray*
 Software Engineer
 Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
 E-mail : thili...@wso2.com

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware

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




 --
 Thanks,
 Best Regards,
 Chamath Gunawardana
 Technical Lead; WSO2 Inc.
 Mobile : +94776322240




-- 
Best Regards,

*Thilini Cooray*
Software Engineer
Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
E-mail : thili...@wso2.com

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to add a Servlet in DSS

2015-07-22 Thread Niranjan Karunanandham
Hi Madhawa,

Can you raise a JIRA in Kernel as an improvement for this?

Regards,
Nira

On Wed, Jul 22, 2015 at 2:14 PM, Madhawa Gunasekara madha...@wso2.com
wrote:

 Hi Thusitha,

 Can we add wild-card option for the implementation ?

 Thanks

 On Wed, Jul 22, 2015 at 2:12 PM, Thusitha Thilina Dayaratne 
 thusit...@wso2.com wrote:

 Hi Madhawa,

 AFAIU In the implementation it get the links and add them to a Map where
 key and value both are same. When we do a request it check from the map
 whether the key exist for the path. If exist it will be bypass otherwise it
 will redirect.
 In your case  /odataservices/* will be the key and when you request
 http://localhost:9443/odataservices/* since the link key matches this
 will bypass the login. But when you request something like
 http://localhost:9443/odataservices/abc then this will not match based
 on the implementation so it will redirect to the login page.

 Thanks
 Thusitha

 On Tue, Jul 21, 2015 at 6:34 PM, Madhawa Gunasekara madha...@wso2.com
 wrote:

 Kind reminder on this..!

 On Sat, Jul 4, 2015 at 9:39 AM, Madhawa Gunasekara madha...@wso2.com
 wrote:

 Hi All,

 I was able to invoke the servlet by using above mentioned reference.
 but I couldn't skip the login page for the all the scenarios. I was able to
 skip the login page for only https://192.168.1.103:9443/odataservices/*
 url request only. Please find my servlet declaration below. I need to
 handle requests like '
 https://192.168.1.103:9443/odataservices/wso2services' from the
 servlet. which begining with particular word 'odataservices'.

 Any help on this matter in highly appreciated.

 What should I missing here ?

 component xmlns=http://products.wso2.org/carbon;

 servlets
 servlet id=ODataServlet
 servlet-nameODataServlet/servlet-name
 url-pattern/odataservices/*/url-pattern
 display-nameOData Services Callback Servlet/display-name
 
 servlet-classorg.wso2.carbon.dataservices.odata.ODataServlet/servlet-class
 /servlet
 /servlets
 framework-configuration
 bypass
 authentication
 link/odataservices/*/link
 /authentication
 /bypass
 /framework-configuration
 /component


 Thanks,
 Madhawa

 On Fri, Jul 3, 2015 at 5:20 PM, Madhawa Gunasekara madha...@wso2.com
 wrote:

 Hi All,

 I have requirement to insert a servlet in DSS to process some specific
 http requests( GET,POST). I have done some implementations by refering 
 [1].
 but when I send the request it will redirect to the login page due to
 the authentications, How can I fixed that? and also servlet methods didn't
 hit but I can find my servlet class in Servlet listings also.

 [2015-07-03 15:20:30,885] DEBUG
 {org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions} -  Listing all
 Servlet items as of now...
 [2015-07-03 15:20:30,885] DEBUG
 {org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions} -
 ---ServletDefinition = ODataservicesCallbackServlet :
 DataservicesCallbackServlet

 Any help on this matter is highly appreciated.

 [1]
 https://github.com/madhawa-gunasekara/carbon-commons/blob/master/components/ntask/org.wso2.carbon.ntask.core/src/main/resources/META-INF/component.xml

 Thanks,
 Madhawa
 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: *http://lk.linkedin.com/in/mgunasekara
 http://lk.linkedin.com/in/mgunasekara*




 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: *http://lk.linkedin.com/in/mgunasekara
 http://lk.linkedin.com/in/mgunasekara*




 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: *http://lk.linkedin.com/in/mgunasekara
 http://lk.linkedin.com/in/mgunasekara*

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




 --
 Thusitha Dayaratne
 Software Engineer
 WSO2 Inc. - lean . enterprise . middleware |  wso2.com

 Mobile  +94712756809
 Blog  alokayasoya.blogspot.com
 Abouthttp://about.me/thusithathilina




 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: *http://lk.linkedin.com/in/mgunasekara
 http://lk.linkedin.com/in/mgunasekara*




-- 

*Niranjan Karunanandham*
Senior Software Engineer - WSO2 Inc.
WSO2 Inc.: http://www.wso2.com

Re: [Dev] API Manager associating a new version of an API with its previous version

2015-07-22 Thread Nuwan Dias
On Wed, Jul 22, 2015 at 2:55 PM, Uvindra Dias Jayasinha uvin...@wso2.com
wrote:

 Let me summarise,

 If the requirement is to only transfer the subscriptions of the API
 version we are copying from, then we need to store the parent API version
 in the rxt or the DB as has been already suggested.


I believe this is the correct requirement and the solution.

Note: We should only copy the active subscriptions. Not the ones on hold
due to workflow approvals.


 But if the requirement is to transfer all subscriptions of an existing
 APIs versions to the new API we can simply do a duplicate check before
 trying to insert subscription data which is a simple fix.

 So which is the correct functionality?


I think for 1.9.1, we should just live with the duplicate check since we're
unable to do any rxt changes. But make a note in 1.10 so we do not iterate
through all versions and copy subscriptions of all versions.


 On 22 July 2015 at 14:36, Uvindra Dias Jayasinha uvin...@wso2.com wrote:

 @Sajith, we already have those options you have mentioned in API Manager,
 if we are publishing a new version of an API either we can choose to make
 the users of the API to re-subscribe or we can automatically transfer over
 the subscriptions from the previous version.

 On 22 July 2015 at 14:25, Sajith Ariyarathna sajit...@wso2.com wrote:

 Hi Uvindra,

 As pointed out by RuwanA, AppM had a similar problem when creating a new
 version of a web app based on an existing version. In AppM, when
 'Publish'ing version *2.0.0* of web app *Foo* (which was created from
 *Foo* version *1.0.0*), version *1.0.0* is 'Un-publish'ed (because only
 one version of a web app is shown to end-users in the store) and 
 subscriptions
 from version *1.0.0* are moved to version *2.0.0*. This is not exactly
 your situation in APIM, but you can see that subscriptions are moved to the
 new version when it is 'Publish'ed.

 Suggestion: you should give the option to the Publisher to decide
 whether to copy or move subscriptions to the new version. You can give 03
 options, Copy Subscriptions to v2.0.0, Move Subscriptions to v2.0.0 and
 Do Nothing. I believe it will improve the user experience for API
 Publisher.

 As suggested by RuwanA, keeping the 'parentID' in the asset or in the
 DB will also help to maintain a version hierarchy and in future releases
 you can use that data to do API grouping or to show a versioning tree.

 Thanks and Regards.


 On Wed, Jul 22, 2015 at 1:00 PM, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 What if we keep the parent apiID in the asset itself, rather than in
 new DB column. (by adding the field to api.rxt)

 Cheers,
 Ruwan

 On Wed, Jul 22, 2015 at 12:44 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 The correct way I can think of solving this is to store the apiID of
 the version that is being copied from in the newly created api object so
 that we can make the association later on when we are publishing the new
 api version.

 This means we will need to add a new column to the AM_API table to
 store this, hence Im trying to see if  there is an alternative.



 On 22 July 2015 at 12:38, Uvindra Dias Jayasinha uvin...@wso2.com
 wrote:

 Thanks for the suggestion Ruwan, but we are not on ES yet and wont be
 for sometime so we wont be able to exploit that feature.

 On 22 July 2015 at 12:32, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 We are having same issue and being solved in AppM 1.1.0. We were
 informed that ES 2.0 has grouping capability. So we may be exploit that 
 to
 correlate versions. We plan to back-port some ES 2.0 functions to ES 1
 branch to get this done.

 SajithAR working on this.

 Cheers,
 Ruwan


 On Wed, Jul 22, 2015 at 12:21 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 This applies to API Manager 1.9.0, but this is true for previous
 versions as well. When trying to fix the following ticket[1] I came 
 across
 this scenario,

1. API named *foo* with versions *1.0.0* and *2.0.0* has
existing subscriptions.
2. Create a new version of the same API *3.0.0* from *2.0.0*
.
3. Publish API *foo:3.0.0* with the Require
Re-Subscription option disabled.
4. What should happen is that the subscriptions of *foo:2.0.0*
should be applied to *foo:3.0.0 *automatically


 The problem is step *2 *and *3* above are separate so there is
 currently no association between *foo:2.0.0* and *foo:3.0.0*.

 So how do we determine which API version *foo:3.0.0* was created
 from so that we can transfer that APIs subscriptions at the time of
 publishing?

 Is there a way to do this without adding a new attribute to the
 newly created API to indicate whihc version it was copied from?

 [1] https://wso2.org/jira/browse/APIMANAGER-3971
 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. 

Re: [Dev] API Manager associating a new version of an API with its previous version

2015-07-22 Thread Uvindra Dias Jayasinha
Let me summarise,

If the requirement is to only transfer the subscriptions of the API version
we are copying from, then we need to store the parent API version in the
rxt or the DB as has been already suggested.

But if the requirement is to transfer all subscriptions of an existing APIs
versions to the new API we can simply do a duplicate check before trying to
insert subscription data which is a simple fix.

So which is the correct functionality?


On 22 July 2015 at 14:36, Uvindra Dias Jayasinha uvin...@wso2.com wrote:

 @Sajith, we already have those options you have mentioned in API Manager,
 if we are publishing a new version of an API either we can choose to make
 the users of the API to re-subscribe or we can automatically transfer over
 the subscriptions from the previous version.

 On 22 July 2015 at 14:25, Sajith Ariyarathna sajit...@wso2.com wrote:

 Hi Uvindra,

 As pointed out by RuwanA, AppM had a similar problem when creating a new
 version of a web app based on an existing version. In AppM, when
 'Publish'ing version *2.0.0* of web app *Foo* (which was created from
 *Foo* version *1.0.0*), version *1.0.0* is 'Un-publish'ed (because only
 one version of a web app is shown to end-users in the store) and 
 subscriptions
 from version *1.0.0* are moved to version *2.0.0*. This is not exactly
 your situation in APIM, but you can see that subscriptions are moved to the
 new version when it is 'Publish'ed.

 Suggestion: you should give the option to the Publisher to decide whether
 to copy or move subscriptions to the new version. You can give 03 options,
 Copy Subscriptions to v2.0.0, Move Subscriptions to v2.0.0 and Do
 Nothing. I believe it will improve the user experience for API Publisher.

 As suggested by RuwanA, keeping the 'parentID' in the asset or in the DB
 will also help to maintain a version hierarchy and in future releases you
 can use that data to do API grouping or to show a versioning tree.

 Thanks and Regards.


 On Wed, Jul 22, 2015 at 1:00 PM, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 What if we keep the parent apiID in the asset itself, rather than in
 new DB column. (by adding the field to api.rxt)

 Cheers,
 Ruwan

 On Wed, Jul 22, 2015 at 12:44 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 The correct way I can think of solving this is to store the apiID of
 the version that is being copied from in the newly created api object so
 that we can make the association later on when we are publishing the new
 api version.

 This means we will need to add a new column to the AM_API table to
 store this, hence Im trying to see if  there is an alternative.



 On 22 July 2015 at 12:38, Uvindra Dias Jayasinha uvin...@wso2.com
 wrote:

 Thanks for the suggestion Ruwan, but we are not on ES yet and wont be
 for sometime so we wont be able to exploit that feature.

 On 22 July 2015 at 12:32, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 We are having same issue and being solved in AppM 1.1.0. We were
 informed that ES 2.0 has grouping capability. So we may be exploit that 
 to
 correlate versions. We plan to back-port some ES 2.0 functions to ES 1
 branch to get this done.

 SajithAR working on this.

 Cheers,
 Ruwan


 On Wed, Jul 22, 2015 at 12:21 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 This applies to API Manager 1.9.0, but this is true for previous
 versions as well. When trying to fix the following ticket[1] I came 
 across
 this scenario,

1. API named *foo* with versions *1.0.0* and *2.0.0* has
existing subscriptions.
2. Create a new version of the same API *3.0.0* from *2.0.0*.
3. Publish API *foo:3.0.0* with the Require  Re-Subscription
option disabled.
4. What should happen is that the subscriptions of *foo:2.0.0*
should be applied to *foo:3.0.0 *automatically


 The problem is step *2 *and *3* above are separate so there is
 currently no association between *foo:2.0.0* and *foo:3.0.0*.

 So how do we determine which API version *foo:3.0.0* was created
 from so that we can transfer that APIs subscriptions at the time of
 publishing?

 Is there a way to do this without adding a new attribute to the
 newly created API to indicate whihc version it was copied from?

 [1] https://wso2.org/jira/browse/APIMANAGER-3971
 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736




 --
 Regards,
 Uvindra

 Mobile: 33962




 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com

Re: [Dev] How to add a Servlet in DSS

2015-07-22 Thread Madhawa Gunasekara
Hi All,

Please find the created JIRA https://wso2.org/jira/browse/CARBON-15322

Thanks
Madhawa

On Wed, Jul 22, 2015 at 2:46 PM, Niranjan Karunanandham niran...@wso2.com
wrote:

 Hi Madhawa,

 Can you raise a JIRA in Kernel as an improvement for this?

 Regards,
 Nira

 On Wed, Jul 22, 2015 at 2:14 PM, Madhawa Gunasekara madha...@wso2.com
 wrote:

 Hi Thusitha,

 Can we add wild-card option for the implementation ?

 Thanks

 On Wed, Jul 22, 2015 at 2:12 PM, Thusitha Thilina Dayaratne 
 thusit...@wso2.com wrote:

 Hi Madhawa,

 AFAIU In the implementation it get the links and add them to a Map where
 key and value both are same. When we do a request it check from the map
 whether the key exist for the path. If exist it will be bypass otherwise it
 will redirect.
 In your case  /odataservices/* will be the key and when you request
 http://localhost:9443/odataservices/* since the link key matches this
 will bypass the login. But when you request something like
 http://localhost:9443/odataservices/abc then this will not match based
 on the implementation so it will redirect to the login page.

 Thanks
 Thusitha

 On Tue, Jul 21, 2015 at 6:34 PM, Madhawa Gunasekara madha...@wso2.com
 wrote:

 Kind reminder on this..!

 On Sat, Jul 4, 2015 at 9:39 AM, Madhawa Gunasekara madha...@wso2.com
 wrote:

 Hi All,

 I was able to invoke the servlet by using above mentioned reference.
 but I couldn't skip the login page for the all the scenarios. I was able 
 to
 skip the login page for only
 https://192.168.1.103:9443/odataservices/* url request only. Please
 find my servlet declaration below. I need to handle requests like '
 https://192.168.1.103:9443/odataservices/wso2services' from the
 servlet. which begining with particular word 'odataservices'.

 Any help on this matter in highly appreciated.

 What should I missing here ?

 component xmlns=http://products.wso2.org/carbon;

 servlets
 servlet id=ODataServlet
 servlet-nameODataServlet/servlet-name
 url-pattern/odataservices/*/url-pattern
 display-nameOData Services Callback Servlet/display-name
 
 servlet-classorg.wso2.carbon.dataservices.odata.ODataServlet/servlet-class
 /servlet
 /servlets
 framework-configuration
 bypass
 authentication
 link/odataservices/*/link
 /authentication
 /bypass
 /framework-configuration
 /component


 Thanks,
 Madhawa

 On Fri, Jul 3, 2015 at 5:20 PM, Madhawa Gunasekara madha...@wso2.com
 wrote:

 Hi All,

 I have requirement to insert a servlet in DSS to process some
 specific http requests( GET,POST). I have done some implementations by
 refering [1].
 but when I send the request it will redirect to the login page due to
 the authentications, How can I fixed that? and also servlet methods 
 didn't
 hit but I can find my servlet class in Servlet listings also.

 [2015-07-03 15:20:30,885] DEBUG
 {org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions} -  Listing all
 Servlet items as of now...
 [2015-07-03 15:20:30,885] DEBUG
 {org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions} -
 ---ServletDefinition = ODataservicesCallbackServlet :
 DataservicesCallbackServlet

 Any help on this matter is highly appreciated.

 [1]
 https://github.com/madhawa-gunasekara/carbon-commons/blob/master/components/ntask/org.wso2.carbon.ntask.core/src/main/resources/META-INF/component.xml

 Thanks,
 Madhawa
 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: *http://lk.linkedin.com/in/mgunasekara
 http://lk.linkedin.com/in/mgunasekara*




 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: *http://lk.linkedin.com/in/mgunasekara
 http://lk.linkedin.com/in/mgunasekara*




 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: *http://lk.linkedin.com/in/mgunasekara
 http://lk.linkedin.com/in/mgunasekara*

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




 --
 Thusitha Dayaratne
 Software Engineer
 WSO2 Inc. - lean . enterprise . middleware |  wso2.com

 Mobile  +94712756809
 Blog  alokayasoya.blogspot.com
 Abouthttp://about.me/thusithathilina




 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: 

Re: [Dev] API Manager associating a new version of an API with its previous version

2015-07-22 Thread Uvindra Dias Jayasinha
Ticket has been updated with the requirement, please add 1.10 release to
API Manager JIRA to set the fix version so that this can be prioritised.

On 22 July 2015 at 15:10, Nuwan Dias nuw...@wso2.com wrote:



 On Wed, Jul 22, 2015 at 2:55 PM, Uvindra Dias Jayasinha uvin...@wso2.com
 wrote:

 Let me summarise,

 If the requirement is to only transfer the subscriptions of the API
 version we are copying from, then we need to store the parent API version
 in the rxt or the DB as has been already suggested.


 I believe this is the correct requirement and the solution.

 Note: We should only copy the active subscriptions. Not the ones on hold
 due to workflow approvals.


 But if the requirement is to transfer all subscriptions of an existing
 APIs versions to the new API we can simply do a duplicate check before
 trying to insert subscription data which is a simple fix.

 So which is the correct functionality?


 I think for 1.9.1, we should just live with the duplicate check since
 we're unable to do any rxt changes. But make a note in 1.10 so we do not
 iterate through all versions and copy subscriptions of all versions.


 On 22 July 2015 at 14:36, Uvindra Dias Jayasinha uvin...@wso2.com
 wrote:

 @Sajith, we already have those options you have mentioned in API
 Manager, if we are publishing a new version of an API either we can choose
 to make the users of the API to re-subscribe or we can automatically
 transfer over the subscriptions from the previous version.

 On 22 July 2015 at 14:25, Sajith Ariyarathna sajit...@wso2.com wrote:

 Hi Uvindra,

 As pointed out by RuwanA, AppM had a similar problem when creating a
 new version of a web app based on an existing version. In AppM, when
 'Publish'ing version *2.0.0* of web app *Foo* (which was created from
 *Foo* version *1.0.0*), version *1.0.0* is 'Un-publish'ed (because only
 one version of a web app is shown to end-users in the store) and 
 subscriptions
 from version *1.0.0* are moved to version *2.0.0*. This is not exactly
 your situation in APIM, but you can see that subscriptions are moved to the
 new version when it is 'Publish'ed.

 Suggestion: you should give the option to the Publisher to decide
 whether to copy or move subscriptions to the new version. You can give 03
 options, Copy Subscriptions to v2.0.0, Move Subscriptions to v2.0.0 and
 Do Nothing. I believe it will improve the user experience for API
 Publisher.

 As suggested by RuwanA, keeping the 'parentID' in the asset or in the
 DB will also help to maintain a version hierarchy and in future releases
 you can use that data to do API grouping or to show a versioning tree.

 Thanks and Regards.


 On Wed, Jul 22, 2015 at 1:00 PM, Ruwan Abeykoon ruw...@wso2.com
 wrote:

 Hi Uvindra,
 What if we keep the parent apiID in the asset itself, rather than
 in new DB column. (by adding the field to api.rxt)

 Cheers,
 Ruwan

 On Wed, Jul 22, 2015 at 12:44 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 The correct way I can think of solving this is to store the apiID of
 the version that is being copied from in the newly created api object so
 that we can make the association later on when we are publishing the new
 api version.

 This means we will need to add a new column to the AM_API table to
 store this, hence Im trying to see if  there is an alternative.



 On 22 July 2015 at 12:38, Uvindra Dias Jayasinha uvin...@wso2.com
 wrote:

 Thanks for the suggestion Ruwan, but we are not on ES yet and wont
 be for sometime so we wont be able to exploit that feature.

 On 22 July 2015 at 12:32, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 We are having same issue and being solved in AppM 1.1.0. We were
 informed that ES 2.0 has grouping capability. So we may be exploit 
 that to
 correlate versions. We plan to back-port some ES 2.0 functions to ES 1
 branch to get this done.

 SajithAR working on this.

 Cheers,
 Ruwan


 On Wed, Jul 22, 2015 at 12:21 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 This applies to API Manager 1.9.0, but this is true for previous
 versions as well. When trying to fix the following ticket[1] I came 
 across
 this scenario,

1. API named *foo* with versions *1.0.0* and *2.0.0* has
existing subscriptions.
2. Create a new version of the same API *3.0.0* from
*2.0.0*.
3. Publish API *foo:3.0.0* with the Require
Re-Subscription option disabled.
4. What should happen is that the subscriptions of
*foo:2.0.0* should be applied to *foo:3.0.0 *automatically


 The problem is step *2 *and *3* above are separate so there is
 currently no association between *foo:2.0.0* and *foo:3.0.0*.

 So how do we determine which API version *foo:3.0.0* was
 created from so that we can transfer that APIs subscriptions at the 
 time of
 publishing?

 Is there a way to do this without adding a new attribute to the
 newly created API to indicate whihc version it was copied from?

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

Re: [Dev] [IS 5.1.0] User search by claim uri

2015-07-22 Thread Darshana Gunawardana
Hi Prabath,

This is fixed with https://github.com/wso2/carbon-identity/pull/657

Thanks,
Darshana

On Tue, Jul 21, 2015 at 7:45 PM, Prabath Siriwardena prab...@wso2.com
wrote:

 At the moment search is limited to the required claims (it looks so from
 the UI).

 Shouldn't support all the claims - having the 'supported by default'
 attribute to true. That includes all the attributed shown in the user
 profile page.

 [image: Inline image 1]

 --
 Thanks  Regards,
 Prabath

 Twitter : @prabath
 LinkedIn : http://www.linkedin.com/in/prabathsiriwardena

 Mobile : +1 650 625 7950

 http://blog.facilelogin.com
 http://blog.api-security.org

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




-- 
Regards,


*Darshana Gunawardana*Senior Software Engineer
WSO2 Inc.; http://wso2.com

*E-mail: darsh...@wso2.com darsh...@wso2.com*
*Mobile: +94718566859*Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [EMM] Android Device Management - Challenges

2015-07-22 Thread Kasun Dananjaya Delgolla
Hi All,

Given below are the tasks which are in progress on the Android device
management layer. I'm listing this down according to the priority with the
challenges we faced so far.

1. Policy Monitoring - Plugin level implementation.


   - We need to generalize all the platforms in this scenario specially
   when it comes to the three Monitoring types (Acknowledge, Enforce,
   Warning). In iOS, Enforce mode should send the policy payload back to the
   device. But in Android it's not required since we are storing the policy in
   the Agent app. We overcame this issue by re-sending policy payload (Policy
   Bundle command) to the device. Android Agent will just ignore the policy if
   it matches with the existing policy.

2. Policy Monitoring - Agent level implementation.


   - Completed Implementation.

3. Policy Revoke - Android Agent


   - We have implemented a revoking mechanism for policies to be used in
   situations like dis-enrollment, device administration force disabling and
   apply new policies. In such situations android agent is now revoking the
   existing policy by retrieving the current policy and revoking one by one
   (Ex: If the policy disabled the camera, revoke function will enable the
   camera)

3. BYOD + COPE Separation.


   - Completed and made UI and flow changes to the Android agent
   accordingly. In COPE mode, in the enrollment, license agreement + PIN
   setting will not pop up and user will not be able to dis-enroll the device
   unless the EMM Admin sends a dis-enroll command. In BYOD mode, licence will
   be shown before enrollment, critical operation PIN have to be given as
   well. User can dis-enroll the device at anytime in this mode(in
   dis-enrollment Android agent will auto clear the app data such as access
   tokens etc + agent will initiate an enterprise wipe).

4. Tenant configuration + Settings (This is common to all platforms) - This
is to set settings such as monitoring frequency, email settings etc. - MDM
jaggery app level implementation + Service layer.


   - Completed the jaggery UIs and the back end services are in the process
   of development. We have decided to have the tenant configurations persisted
   in the registry. And retrieve it from their whenever required. (Ex: Android
   enrollment - Notification mode [GCM/LOCAL], GCM sender ID, Notifier
   frequency etc have to be retrieved from configurations)


5. Containerization feature integration - Lollipop API support in Android
Agent level.


   - We are currently in the process of going through the documentation by
   Google on which features we can integrate and how we can get them in place
   to provide a proper container solution for Android.

6. Gradle build - Upgrading the current build script to generate signed APK
taking the keys from a configurable location.


   - Currently we have completed the maven script to invoke gradle build
   script and build the APK (unsigned release APK) and copy it to MDM jaggery
   app downloads location. But there is an intermittent issue we are yet to
   figure out which happens when the build is trying to download Gradle
   wrapper dependency. This dependency is 50+ MB (1st a JAR and then JAR
   invokes a download of 40+ MB file) and in case if it failed in between, the
   build fails. So we need to figure out whether to have these dependency in
   the pack itself and bring the JAR to orbit. We need an input on this.

Please go through and reply in the same thread with your concerns.

Thanks

--
Kasun Dananjaya Delgolla

Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware
Tel:  +94 11 214 5345
Fax: +94 11 2145300
Mob: + 94 771 771 015
Blog: http://kddcodingparadise.blogspot.com
Linkedin: *http://lk.linkedin.com/in/kasundananjaya
http://lk.linkedin.com/in/kasundananjaya*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to avoid addTenant from changing already existing password in LDAP

2015-07-22 Thread Danushka Fernando
We can do something like thos

@Override
   public void doUpdateCredentialByAdmin(String userName, Object
newCredential)
   throws UserStoreException {
   if (newCredential != null  !newCredential.equals()) {
   super.doUpdateCredentialByAdmin(userName,
newCredential);
  }
   }

Thanks  Regards
Danushka Fernando
Senior Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729

On Wed, Jul 22, 2015 at 5:40 PM, Amila Maha Arachchi ami...@wso2.com
wrote:



 On Wed, Jul 22, 2015 at 12:49 PM, Manjula Rathnayake manju...@wso2.com
 wrote:

 Hi all,

 Let me add bit more context here.

 Registering an organization(creating a tenant) was originated from AF in
 app cloud. By upon receiving a tenant registration request to AF node, AF
 node trigger tenant creation in Stratos nodes(namely Dev,Test,Prod Stratos
 manager nodes). All above nodes make use of a single LDAP and tenant admin
 user is created only by AF node. But other nodes kept updating the password
 of this tenant admin with the same value received from initial tenant
 registration flow.

 In cloud setup, we are changing the tenant creation flow as below.
 1. Tenant creation is initiated by cloud management application upon
 organization registration. This create a tenant structure in LDAP and
 userstore database.
 2. Tenant admin logins and click on app cloud. This triggers tenant
 creation process in Stratos nodes.

 Based on above flow, we do not have the tenant admin password in 2nd step
 above.

 I am +1 on coming up with a custom userstore manager due to
 1. Minimal changes on existing flow where new userstore manager is
 plugged in with config changes.
 2. Cloud already making use of a custom userstore manager, hence
 introduction of new method is simple.
 3. Cloud management application already validates the password
 requirements in front-end layers, hence ignoring the empty password update
 at the backend is acceptable rather patching the kernel with API changes.


 IIUC this custom userstore manager needs to be used at stratos manager,
 correct? In our setup, we already have a custom userstore manager and we
 will have to override the method you have mentioned, correct?

 If so, what will happen when we use the same userstore manager in AF
 instance or the appserver where tenant creation happens?

 Feels like I am missing something. May be the logic on how to decide to
 not to update the password?


 thank you.



 On Wed, Jul 22, 2015 at 12:13 PM, Punnadi Gunarathna punn...@wso2.com
 wrote:

 hi All,

 In AF latest deployment, AF has a separate UM and Registry database
 where as Straos side has a separate UM and registry database. All are
 pointing to same LDAP.

 Once the tenant get registered, login to AF side and click on app
 cloud,  a listener will be invoked in Stratos side which does addTenant
 process. Since the user is logged in, the tenant password is set to a
 garbage value and it will be sent to Stratos side. This will update the
 tenant admin password to a garbage value with persistTenant method in
 TenantPesistor [1] (Line no 204).

 We thought of writing a custom userstore and override
 updateCredentialByAdmin as follows:

 Send either an empty password or a constant from AF side and password
 update will not happen in override method by checking that condition.

 Please share your thoughts.


 [1]
 https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/stratos/tenant-mgt/org.wso2.carbon.tenant.mgt.core/2.2.0/src/main/java/org/wso2/carbon/tenant/mgt/core/
 --
 Thanks and Regards,

 Punnadi Gunarathna
 Senior Software Engineer,
 WSO2, Inc.; http://wso2.com http://wso2
 Blog: http://hi-my-world.blogspot.com/
 Tel : 94 11 214 5345
 Fax :94 11 2145300



  http://lalajisureshika.blogspot.com/




 --
 Manjula Rathnayaka
 Associate Technical Lead
 WSO2, Inc.
 Mobile:+94 77 743 1987




 --
 *Amila Maharachchi*
 Senior Technical Lead
 WSO2, Inc.; http://wso2.com

 Blog: http://maharachchi.blogspot.com
 Mobile: +94719371446


 ___
 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


[Dev] How to avoid addTenant from changing already existing password in LDAP

2015-07-22 Thread Punnadi Gunarathna
hi All,

In AF latest deployment, AF has a separate UM and Registry database where
as Straos side has a separate UM and registry database. All are pointing to
same LDAP.

Once the tenant get registered, login to AF side and click on app cloud,  a
listener will be invoked in Stratos side which does addTenant process.
Since the user is logged in, the tenant password is set to a garbage value
and it will be sent to Stratos side. This will update the tenant admin
password to a garbage value with persistTenant method in TenantPesistor [1]
(Line no 204).

We thought of writing a custom userstore and override
updateCredentialByAdmin as follows:

Send either an empty password or a constant from AF side and password
update will not happen in override method by checking that condition.

Please share your thoughts.


[1]
https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/stratos/tenant-mgt/org.wso2.carbon.tenant.mgt.core/2.2.0/src/main/java/org/wso2/carbon/tenant/mgt/core/
-- 
Thanks and Regards,

Punnadi Gunarathna
Senior Software Engineer,
WSO2, Inc.; http://wso2.com http://wso2
Blog: http://hi-my-world.blogspot.com/
Tel : 94 11 214 5345
Fax :94 11 2145300



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


Re: [Dev] [IS] Is there an API to access tenant key store

2015-07-22 Thread Thilini Cooray
Hi,

Yes, you will be able to access the tenant key store via
KeyStoreAdminService.
[1] contains a KeyStoreAdminServiceClient which might be useful for you.

[1]
https://svn.wso2.org/repos/wso2/people/chamathg/sandbox/test-automation-framework/org.wso2.carbon.automation.api/src/main/java/org/wso2/carbon/automation/api/clients/security/KeyStoreAdminServiceClient.java

Thanks.

On Wed, Jul 22, 2015 at 12:18 PM, Chathura Priyankara chathu...@wso2.com
wrote:

 Hi Thilini,

 We cannot get the key store manager instance as above mentioned way from a
 test case, because the test case is running out side of the OSGi
 environment of running server.
 So I think we have to get the tenant key store
 through KeyStoreAdminServiceStub.

 Thanks,
 Chathura.

 On Wed, Jul 22, 2015 at 10:49 AM, Thilini Cooray thili...@wso2.com
 wrote:

 Hi,

 org.wso2.carbon.core.util.KeyStoreManager can be used for accessing
 tenant key store as follows.

 KeyStoreManager tenantKeyStoreManager = 
 KeyStoreManager.getInstance(tenantId);

 KeyStoreManager contains a function called getKeyStore for retrieving key 
 store.

 Thanks.



 On Wed, Jul 22, 2015 at 10:35 AM, Chathura Priyankara chathu...@wso2.com
  wrote:

 Hi,

 I'm writing some test cases to test the multi-tenancy functionality in
 AS.
 For that I want to access tenant key store after adding a tenant. Is
 there any API to access tenant key store ?

 Thanks,
 Charhuara.
 --
 Chathura Priyankara
 Software Engineer | WSO2 Inc.
 Mobile : +94718795340
 Blog : www.codeoncloud.blogspot.com

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




 --
 Best Regards,

 *Thilini Cooray*
 Software Engineer
 Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
 E-mail : thili...@wso2.com

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware




 --
 Chathura Priyankara
 Software Engineer | WSO2 Inc.
 Mobile : +94718795340
 Blog : www.codeoncloud.blogspot.com




-- 
Best Regards,

*Thilini Cooray*
Software Engineer
Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
E-mail : thili...@wso2.com

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to avoid addTenant from changing already existing password in LDAP

2015-07-22 Thread Manjula Rathnayake
Hi all,

Let me add bit more context here.

Registering an organization(creating a tenant) was originated from AF in
app cloud. By upon receiving a tenant registration request to AF node, AF
node trigger tenant creation in Stratos nodes(namely Dev,Test,Prod Stratos
manager nodes). All above nodes make use of a single LDAP and tenant admin
user is created only by AF node. But other nodes kept updating the password
of this tenant admin with the same value received from initial tenant
registration flow.

In cloud setup, we are changing the tenant creation flow as below.
1. Tenant creation is initiated by cloud management application upon
organization registration. This create a tenant structure in LDAP and
userstore database.
2. Tenant admin logins and click on app cloud. This triggers tenant
creation process in Stratos nodes.

Based on above flow, we do not have the tenant admin password in 2nd step
above.

I am +1 on coming up with a custom userstore manager due to
1. Minimal changes on existing flow where new userstore manager is plugged
in with config changes.
2. Cloud already making use of a custom userstore manager, hence
introduction of new method is simple.
3. Cloud management application already validates the password requirements
in front-end layers, hence ignoring the empty password update at the
backend is acceptable rather patching the kernel with API changes.

thank you.



On Wed, Jul 22, 2015 at 12:13 PM, Punnadi Gunarathna punn...@wso2.com
wrote:

 hi All,

 In AF latest deployment, AF has a separate UM and Registry database where
 as Straos side has a separate UM and registry database. All are pointing to
 same LDAP.

 Once the tenant get registered, login to AF side and click on app cloud,
 a listener will be invoked in Stratos side which does addTenant process.
 Since the user is logged in, the tenant password is set to a garbage value
 and it will be sent to Stratos side. This will update the tenant admin
 password to a garbage value with persistTenant method in TenantPesistor [1]
 (Line no 204).

 We thought of writing a custom userstore and override
 updateCredentialByAdmin as follows:

 Send either an empty password or a constant from AF side and password
 update will not happen in override method by checking that condition.

 Please share your thoughts.


 [1]
 https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/stratos/tenant-mgt/org.wso2.carbon.tenant.mgt.core/2.2.0/src/main/java/org/wso2/carbon/tenant/mgt/core/
 --
 Thanks and Regards,

 Punnadi Gunarathna
 Senior Software Engineer,
 WSO2, Inc.; http://wso2.com http://wso2
 Blog: http://hi-my-world.blogspot.com/
 Tel : 94 11 214 5345
 Fax :94 11 2145300



  http://lalajisureshika.blogspot.com/




-- 
Manjula Rathnayaka
Associate Technical Lead
WSO2, Inc.
Mobile:+94 77 743 1987
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] java.lang.IllegalStateException: Trying to set the domain from 1 to 2

2015-07-22 Thread Supun Malinga
Hi Malaka,

Can you point out the place where its being set in message context ?.
Basically I want to understand why we cannot destroy the context at that
level (after the usage of CC is done).

thanks,

On Tue, Jul 21, 2015 at 8:10 PM, Malaka Silva mal...@wso2.com wrote:

 Hi Supun,

 This issue can only be reproduced if you do a load test parallel with two
 or more tenants.

 Here tenant domain is set with the value from message context. This fix
 will clean the thread context before setting the new context.

 On Tue, Jul 21, 2015 at 7:45 PM, Supun Malinga sup...@wso2.com wrote:

 Hi Malaka,

 Can you explain the fix you have done pls ?. We need to understand that
 the fix is the optimal one.

 Also do we have integration tests for the fix in kernel or ESB level ?.
 Please note it is better if we can have a test case for this in kernel
 itself.

 thanks,

 On Tue, Jul 21, 2015 at 4:33 PM, Malaka Silva mal...@wso2.com wrote:

 Hi Carbon Team,

 Please review and merge this before the next release.

 On Tue, Jul 21, 2015 at 4:29 PM, Malaka Silva mal...@wso2.com wrote:

 Any update on this?

 On Mon, Jul 13, 2015 at 10:35 AM, Malaka Silva mal...@wso2.com wrote:

 Hi Carbon Team,

 Any update on this?

 On Thu, Jul 2, 2015 at 12:11 PM, Malaka Silva mal...@wso2.com wrote:

 Hi Carbon Team,

 I have reproduced the issue and have done a fix.

 Please review and merge.

 Related jira's [1] and [2]. Fix with [3]

 [1] https://wso2.org/jira/browse/ESBJAVA-3801
 [2] https://wso2.org/jira/browse/CARBON-15294
 [3] https://github.com/wso2/carbon4-kernel/pull/264

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --
 Supun Malinga,

 Senior Software Engineer,
 WSO2 Inc.
 http://wso2.com
 email: sup...@wso2.com sup...@wso2.com
 mobile: +94 (0)71 56 91 321




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print this
 email only if it is absolutely necessary.




-- 
Supun Malinga,

Senior Software Engineer,
WSO2 Inc.
http://wso2.com
email: sup...@wso2.com sup...@wso2.com
mobile: +94 (0)71 56 91 321
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Manager associating a new version of an API with its previous version

2015-07-22 Thread Uvindra Dias Jayasinha
Hi Ruwan,

Updating the rxt is a good option, thanks for suggesting. But since this
will lead to a data migration we cant do it for 1.9.1 release, so we will
prioritise the fix for the 1.10 release.

On 22 July 2015 at 13:00, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 What if we keep the parent apiID in the asset itself, rather than in
 new DB column. (by adding the field to api.rxt)

 Cheers,
 Ruwan

 On Wed, Jul 22, 2015 at 12:44 PM, Uvindra Dias Jayasinha uvin...@wso2.com
  wrote:

 The correct way I can think of solving this is to store the apiID of the
 version that is being copied from in the newly created api object so that
 we can make the association later on when we are publishing the new api
 version.

 This means we will need to add a new column to the AM_API table to store
 this, hence Im trying to see if  there is an alternative.



 On 22 July 2015 at 12:38, Uvindra Dias Jayasinha uvin...@wso2.com
 wrote:

 Thanks for the suggestion Ruwan, but we are not on ES yet and wont be
 for sometime so we wont be able to exploit that feature.

 On 22 July 2015 at 12:32, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 We are having same issue and being solved in AppM 1.1.0. We were
 informed that ES 2.0 has grouping capability. So we may be exploit that to
 correlate versions. We plan to back-port some ES 2.0 functions to ES 1
 branch to get this done.

 SajithAR working on this.

 Cheers,
 Ruwan


 On Wed, Jul 22, 2015 at 12:21 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 This applies to API Manager 1.9.0, but this is true for previous
 versions as well. When trying to fix the following ticket[1] I came across
 this scenario,

1. API named *foo* with versions *1.0.0* and *2.0.0* has
existing subscriptions.
2. Create a new version of the same API *3.0.0* from *2.0.0*.
3. Publish API *foo:3.0.0* with the Require  Re-Subscription
option disabled.
4. What should happen is that the subscriptions of *foo:2.0.0*
should be applied to *foo:3.0.0 *automatically


 The problem is step *2 *and *3* above are separate so there is
 currently no association between *foo:2.0.0* and *foo:3.0.0*.

 So how do we determine which API version *foo:3.0.0* was created
 from so that we can transfer that APIs subscriptions at the time of
 publishing?

 Is there a way to do this without adding a new attribute to the newly
 created API to indicate whihc version it was copied from?

 [1] https://wso2.org/jira/browse/APIMANAGER-3971
 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736




 --
 Regards,
 Uvindra

 Mobile: 33962




 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736




-- 
Regards,
Uvindra

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


Re: [Dev] API Manager associating a new version of an API with its previous version

2015-07-22 Thread Sanjeewa Malalgoda
Adding new field to rxt would be ideal IMO. I noticed some users already
reported this issue.

Thanks,
sanjeewa.

On Wed, Jul 22, 2015 at 1:00 PM, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 What if we keep the parent apiID in the asset itself, rather than in
 new DB column. (by adding the field to api.rxt)

 Cheers,
 Ruwan

 On Wed, Jul 22, 2015 at 12:44 PM, Uvindra Dias Jayasinha uvin...@wso2.com
  wrote:

 The correct way I can think of solving this is to store the apiID of the
 version that is being copied from in the newly created api object so that
 we can make the association later on when we are publishing the new api
 version.

 This means we will need to add a new column to the AM_API table to store
 this, hence Im trying to see if  there is an alternative.



 On 22 July 2015 at 12:38, Uvindra Dias Jayasinha uvin...@wso2.com
 wrote:

 Thanks for the suggestion Ruwan, but we are not on ES yet and wont be
 for sometime so we wont be able to exploit that feature.

 On 22 July 2015 at 12:32, Ruwan Abeykoon ruw...@wso2.com wrote:

 Hi Uvindra,
 We are having same issue and being solved in AppM 1.1.0. We were
 informed that ES 2.0 has grouping capability. So we may be exploit that to
 correlate versions. We plan to back-port some ES 2.0 functions to ES 1
 branch to get this done.

 SajithAR working on this.

 Cheers,
 Ruwan


 On Wed, Jul 22, 2015 at 12:21 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 This applies to API Manager 1.9.0, but this is true for previous
 versions as well. When trying to fix the following ticket[1] I came across
 this scenario,

1. API named *foo* with versions *1.0.0* and *2.0.0* has
existing subscriptions.
2. Create a new version of the same API *3.0.0* from *2.0.0*.
3. Publish API *foo:3.0.0* with the Require  Re-Subscription
option disabled.
4. What should happen is that the subscriptions of *foo:2.0.0*
should be applied to *foo:3.0.0 *automatically


 The problem is step *2 *and *3* above are separate so there is
 currently no association between *foo:2.0.0* and *foo:3.0.0*.

 So how do we determine which API version *foo:3.0.0* was created
 from so that we can transfer that APIs subscriptions at the time of
 publishing?

 Is there a way to do this without adding a new attribute to the newly
 created API to indicate whihc version it was copied from?

 [1] https://wso2.org/jira/browse/APIMANAGER-3971
 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736




 --
 Regards,
 Uvindra

 Mobile: 33962




 --
 Regards,
 Uvindra

 Mobile: 33962

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




 --

 *Ruwan Abeykoon*
 *Architect,*
 *WSO2, Inc. http://wso2.com http://wso2.com/ *
 *lean.enterprise.middleware.*

 email: ruw...@wso2.com
 phone:(+94) 39736

 ___
 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


[Dev] User already exist when AD as a userstore

2015-07-22 Thread Udara Liyanage
Hi,

I tried adding a AD as a RW userstore and encountered the following
exception. I tried setting AddAdmin false but found no luck. Then I changed
admin name to admin1 and encountered the exception [2](*One or more
attributes you are trying to add/update are not supported by underlying
LDAP*). Please note that I am using IS 410.

[2015-07-22 13:52:02,484]  INFO
{org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager} -  LDAP
connection created successfully in read-write mode
[2015-07-22 13:52:03,179] ERROR
{org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager} -  Can not
access the directory context or user already exists in the system
javax.naming.NameAlreadyBoundException: [LDAP: error code 68 - 2071:
UpdErr: DSID-0305031D, problem 6005 (ENTRY_EXISTS), data 0
]; remaining name 'cn=admin'
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3062)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3013)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2820)
at com.sun.jndi.ldap.LdapCtx.c_bind(LdapCtx.java:400)
at
com.sun.jndi.toolkit.ctx.ComponentDirContext.p_bind(ComponentDirContext.java:277)
at
com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.bind(PartialCompositeDirContext.java:197)
at
org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.doAddUser(ReadWriteLDAPUserStoreManager.java:242)
at
org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.doAddUser(ReadWriteLDAPUserStoreManager.java:211)
at
org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.addInitialData(ReadWriteLDAPUserStoreManager.java:1805)
at
org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.init(ReadWriteLDAPUserStoreManager.java:142)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.wso2.carbon.user.core.common.DefaultRealm.createObjectWithOptions(DefaultRealm.java:225)
at
org.wso2.carbon.user.core.common.DefaultRealm.initializeObjects(DefaultRealm.java:147)
at org.wso2.carbon.user.core.common.DefaultRealm.init(DefaultRealm.java:113)
at
org.wso2.carbon.user.core.common.DefaultRealmService.initializeRealm(DefaultRealmService.java:223)
at
org.wso2.carbon.user.core.common.DefaultRealmService.init(DefaultRealmService.java:103)
at
org.wso2.carbon.user.core.common.DefaultRealmService.init(DefaultRealmService.java:116)
at
org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:67)
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
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
[2015-07-22 13:52:03,181] ERROR
{org.wso2.carbon.user.core.common.DefaultRealm} -  Cannot create
org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.wso2.carbon.user.core.common.DefaultRealm.createObjectWithOptions(DefaultRealm.java:225)
at
org.wso2.carbon.user.core.common.DefaultRealm.initializeObjects(DefaultRealm.java:147)
at org.wso2.carbon.user.core.common.DefaultRealm.init(DefaultRealm.java:113)

Re: [Dev] User already exist when AD as a userstore

2015-07-22 Thread Udara Liyanage
Hi,

However I don't get this issue when I configured AD as the secondary
userstore.

On Wed, Jul 22, 2015 at 2:05 PM, Udara Liyanage ud...@wso2.com wrote:

 Hi,

 I used org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager
 usermanager for AD

 On Wed, Jul 22, 2015 at 2:02 PM, Udara Liyanage ud...@wso2.com wrote:

 Hi,

 I tried adding a AD as a RW userstore and encountered the following
 exception. I tried setting AddAdmin false but found no luck. Then I changed
 admin name to admin1 and encountered the exception [2](*One or more
 attributes you are trying to add/update are not supported by underlying
 LDAP*). Please note that I am using IS 410.

 [2015-07-22 13:52:02,484]  INFO
 {org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager} -  LDAP
 connection created successfully in read-write mode
 [2015-07-22 13:52:03,179] ERROR
 {org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager} -  Can not
 access the directory context or user already exists in the system
 javax.naming.NameAlreadyBoundException: [LDAP: error code 68 - 2071:
 UpdErr: DSID-0305031D, problem 6005 (ENTRY_EXISTS), data 0
 ]; remaining name 'cn=admin'
 at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3062)
 at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3013)
 at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2820)
 at com.sun.jndi.ldap.LdapCtx.c_bind(LdapCtx.java:400)
 at
 com.sun.jndi.toolkit.ctx.ComponentDirContext.p_bind(ComponentDirContext.java:277)
 at
 com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.bind(PartialCompositeDirContext.java:197)
 at
 org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.doAddUser(ReadWriteLDAPUserStoreManager.java:242)
 at
 org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.doAddUser(ReadWriteLDAPUserStoreManager.java:211)
 at
 org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.addInitialData(ReadWriteLDAPUserStoreManager.java:1805)
 at
 org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.init(ReadWriteLDAPUserStoreManager.java:142)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at
 org.wso2.carbon.user.core.common.DefaultRealm.createObjectWithOptions(DefaultRealm.java:225)
 at
 org.wso2.carbon.user.core.common.DefaultRealm.initializeObjects(DefaultRealm.java:147)
 at
 org.wso2.carbon.user.core.common.DefaultRealm.init(DefaultRealm.java:113)
 at
 org.wso2.carbon.user.core.common.DefaultRealmService.initializeRealm(DefaultRealmService.java:223)
 at
 org.wso2.carbon.user.core.common.DefaultRealmService.init(DefaultRealmService.java:103)
 at
 org.wso2.carbon.user.core.common.DefaultRealmService.init(DefaultRealmService.java:116)
 at
 org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:67)
 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
 org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
 at
 org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
 [2015-07-22 13:52:03,181] ERROR
 {org.wso2.carbon.user.core.common.DefaultRealm} -  Cannot create
 org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager
 java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at
 

Re: [Dev] How to add a Servlet in DSS

2015-07-22 Thread Thusitha Thilina Dayaratne
Hi Madhawa,

AFAIU In the implementation it get the links and add them to a Map where
key and value both are same. When we do a request it check from the map
whether the key exist for the path. If exist it will be bypass otherwise it
will redirect.
In your case  /odataservices/* will be the key and when you request
http://localhost:9443/odataservices/* since the link key matches this will
bypass the login. But when you request something like
http://localhost:9443/odataservices/abc
then this will not match based on the implementation so it will redirect to
the login page.

Thanks
Thusitha

On Tue, Jul 21, 2015 at 6:34 PM, Madhawa Gunasekara madha...@wso2.com
wrote:

 Kind reminder on this..!

 On Sat, Jul 4, 2015 at 9:39 AM, Madhawa Gunasekara madha...@wso2.com
 wrote:

 Hi All,

 I was able to invoke the servlet by using above mentioned reference. but
 I couldn't skip the login page for the all the scenarios. I was able to
 skip the login page for only https://192.168.1.103:9443/odataservices/*
 url request only. Please find my servlet declaration below. I need to
 handle requests like '
 https://192.168.1.103:9443/odataservices/wso2services' from the servlet.
 which begining with particular word 'odataservices'.

 Any help on this matter in highly appreciated.

 What should I missing here ?

 component xmlns=http://products.wso2.org/carbon;

 servlets
 servlet id=ODataServlet
 servlet-nameODataServlet/servlet-name
 url-pattern/odataservices/*/url-pattern
 display-nameOData Services Callback Servlet/display-name
 
 servlet-classorg.wso2.carbon.dataservices.odata.ODataServlet/servlet-class
 /servlet
 /servlets
 framework-configuration
 bypass
 authentication
 link/odataservices/*/link
 /authentication
 /bypass
 /framework-configuration
 /component


 Thanks,
 Madhawa

 On Fri, Jul 3, 2015 at 5:20 PM, Madhawa Gunasekara madha...@wso2.com
 wrote:

 Hi All,

 I have requirement to insert a servlet in DSS to process some specific
 http requests( GET,POST). I have done some implementations by refering [1].
 but when I send the request it will redirect to the login page due to
 the authentications, How can I fixed that? and also servlet methods didn't
 hit but I can find my servlet class in Servlet listings also.

 [2015-07-03 15:20:30,885] DEBUG
 {org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions} -  Listing all
 Servlet items as of now...
 [2015-07-03 15:20:30,885] DEBUG
 {org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions} -
 ---ServletDefinition = ODataservicesCallbackServlet :
 DataservicesCallbackServlet

 Any help on this matter is highly appreciated.

 [1]
 https://github.com/madhawa-gunasekara/carbon-commons/blob/master/components/ntask/org.wso2.carbon.ntask.core/src/main/resources/META-INF/component.xml

 Thanks,
 Madhawa
 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: *http://lk.linkedin.com/in/mgunasekara
 http://lk.linkedin.com/in/mgunasekara*




 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: *http://lk.linkedin.com/in/mgunasekara
 http://lk.linkedin.com/in/mgunasekara*




 --
 *Madhawa Gunasekara*
 Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 719411002 +94+719411002
 blog: *http://madhawa-gunasekara.blogspot.com
 http://madhawa-gunasekara.blogspot.com*
 linkedin: *http://lk.linkedin.com/in/mgunasekara
 http://lk.linkedin.com/in/mgunasekara*

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




-- 
Thusitha Dayaratne
Software Engineer
WSO2 Inc. - lean . enterprise . middleware |  wso2.com

Mobile  +94712756809
Blog  alokayasoya.blogspot.com
Abouthttp://about.me/thusithathilina
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to avoid addTenant from changing already existing password in LDAP

2015-07-22 Thread Amila Maha Arachchi
On Wed, Jul 22, 2015 at 12:49 PM, Manjula Rathnayake manju...@wso2.com
wrote:

 Hi all,

 Let me add bit more context here.

 Registering an organization(creating a tenant) was originated from AF in
 app cloud. By upon receiving a tenant registration request to AF node, AF
 node trigger tenant creation in Stratos nodes(namely Dev,Test,Prod Stratos
 manager nodes). All above nodes make use of a single LDAP and tenant admin
 user is created only by AF node. But other nodes kept updating the password
 of this tenant admin with the same value received from initial tenant
 registration flow.

 In cloud setup, we are changing the tenant creation flow as below.
 1. Tenant creation is initiated by cloud management application upon
 organization registration. This create a tenant structure in LDAP and
 userstore database.
 2. Tenant admin logins and click on app cloud. This triggers tenant
 creation process in Stratos nodes.

 Based on above flow, we do not have the tenant admin password in 2nd step
 above.

 I am +1 on coming up with a custom userstore manager due to
 1. Minimal changes on existing flow where new userstore manager is plugged
 in with config changes.
 2. Cloud already making use of a custom userstore manager, hence
 introduction of new method is simple.
 3. Cloud management application already validates the password
 requirements in front-end layers, hence ignoring the empty password update
 at the backend is acceptable rather patching the kernel with API changes.


IIUC this custom userstore manager needs to be used at stratos manager,
correct? In our setup, we already have a custom userstore manager and we
will have to override the method you have mentioned, correct?

If so, what will happen when we use the same userstore manager in AF
instance or the appserver where tenant creation happens?

Feels like I am missing something. May be the logic on how to decide to not
to update the password?


 thank you.



 On Wed, Jul 22, 2015 at 12:13 PM, Punnadi Gunarathna punn...@wso2.com
 wrote:

 hi All,

 In AF latest deployment, AF has a separate UM and Registry database where
 as Straos side has a separate UM and registry database. All are pointing to
 same LDAP.

 Once the tenant get registered, login to AF side and click on app cloud,
 a listener will be invoked in Stratos side which does addTenant process.
 Since the user is logged in, the tenant password is set to a garbage value
 and it will be sent to Stratos side. This will update the tenant admin
 password to a garbage value with persistTenant method in TenantPesistor [1]
 (Line no 204).

 We thought of writing a custom userstore and override
 updateCredentialByAdmin as follows:

 Send either an empty password or a constant from AF side and password
 update will not happen in override method by checking that condition.

 Please share your thoughts.


 [1]
 https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/stratos/tenant-mgt/org.wso2.carbon.tenant.mgt.core/2.2.0/src/main/java/org/wso2/carbon/tenant/mgt/core/
 --
 Thanks and Regards,

 Punnadi Gunarathna
 Senior Software Engineer,
 WSO2, Inc.; http://wso2.com http://wso2
 Blog: http://hi-my-world.blogspot.com/
 Tel : 94 11 214 5345
 Fax :94 11 2145300



  http://lalajisureshika.blogspot.com/




 --
 Manjula Rathnayaka
 Associate Technical Lead
 WSO2, Inc.
 Mobile:+94 77 743 1987




-- 
*Amila Maharachchi*
Senior Technical Lead
WSO2, Inc.; http://wso2.com

Blog: http://maharachchi.blogspot.com
Mobile: +94719371446
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ML] Update - Deeplearning Integration to WSO2-ml

2015-07-22 Thread Thushan Ganegedara
Hi,

Apologies about the late reply.

Notes of the Demonstration

Time duration: approximately 30 mins

The demonstration was to demonstrate the implemented deeplearning feature
of WSO2-ML. The demo started first explaining the dataset used (i.e.
MNIST). The dataset is a CSV file with approximately 3 rows and 784
features.

Next the dataset was loaded to WSO2-ml. Here a concern was raised regarding
selecting the type of data in the Preprocessing Phase (i.e. Categorical vs
Numerical) The suggestion was that there should be a UI feature to change
the data type for all the variables at once (very useful for large amounts
of features).

Next the deeplearning algorithm for MNIST dataset was demonstrated and was
able to achieve an appx 95% accuracy. Regarding the deeplearning
algorithms, H-2-O doesn't seem to have different deeplearning algorithms at
the moment, but a general deep network + classifier (probably autoencoder).
So the idea was to ask H-2-O team whether they are planning to implement
different networks in the future.

Also, it was suggested to add a visualization feature in parameter setting
stage to provide a summarized visualization of the network to the user.

Furthermore, another suggestion was to test the deep network on real world
datasets and see how it performs. For this datasets from Kaggle will be
used.


About progress.

I'm currently testing the algorithm against different datasets. and I'll
provide a detailed report on that in the recent future.

Thank you



On Wed, Jul 22, 2015 at 2:00 PM, Nirmal Fernando nir...@wso2.com wrote:

 @Thushan how are you progressing? Could you please send the notes of our
 last review?

 On Thu, Jul 16, 2015 at 10:43 AM, CD Athuraliya chathur...@wso2.com
 wrote:



 On Mon, Jul 13, 2015 at 11:12 AM, Thushan Ganegedara thu...@gmail.com
 wrote:

 Hello CD,

 Yes, it seems to be working fine now. But why does it show the axes in
 meters? Is this a d3 specific thing?


 I think *m* stands for *Milli* here.


 On Mon, Jul 13, 2015 at 3:17 PM, Thushan Ganegedara thu...@gmail.com
 wrote:

 Hi all,

 Thank you very much for pointing out. I'll get the latest update and
 see.

 On Mon, Jul 13, 2015 at 3:03 PM, CD Athuraliya chathur...@wso2.com
 wrote:

 Hi Thushan,

 That method has been updated. Please get the latest. You might have to
 define your own case depending on predicted values.

 CD Athuraliya
 Sent from my mobile device
 On Jul 13, 2015 10:24 AM, Nirmal Fernando nir...@wso2.com wrote:

 Great work Thushan! On the UI issues, @CD could help you. AFAIK
 actual keeps the pointer to the actual label and predicted is the
 probability and predictedLabel is after rounding it using a threshold.

 On Mon, Jul 13, 2015 at 7:14 AM, Thushan Ganegedara thu...@gmail.com
  wrote:

 Hi all,

 I have integrated H-2-O deeplearning to WSO2-ml successfully.
 Following are the stats on 2 tests conducted (screenshots attached).

 Iris dataset - 93.62% Accuracy
 MNIST (Small) dataset - 94.94% Accuracy

 However, there were few unusual issues that I had to spend lot of
 time to identify.

 *FrameSplitter does not work for any value other than 0.5. Any value
 other than 0.5, the following error is returned*
 (Frame splitter is used to split trainingData to train and valid
 sets)
 barrier onExCompletion for
 hex.deeplearning.DeepLearning$DeepLearningDriver@25e994ae
 ​java.lang.RuntimeException: java.lang.RuntimeException:
 java.lang.NullPointerException
 at
 hex.deeplearning.DeepLearning$DeepLearningDriver.trainModel(DeepLearning.java:382)​

 *​DeepLearningModel.score(double[] vec) method doesn't work. *
 The predictions obtained with ​score(Frame f) and score(double[] v)
 is shown below.

 *Actual, score(Frame f), score(double[] v)*
 ​0.0, 0.0, 1.0
 1.0, 1.0, 2.0
 2.0, 2.0, 2.0
 2.0, 1.0, 2.0
 1.0, 1.0, 2.0

 As you can see, score(double[] v) is quite poor.

 After fixing above issues, everything seems to be working fine at
 the moment.

 However, the I've a concern regarding the following method in
 view-model.jag - function
 drawPredictedVsActualChart(testResultDataPointsSample)

 var actual = testResultDataPointsSample[i].predictedVsActual.actual;
 var predicted =
 testResultDataPointsSample[i].predictedVsActual.predicted;
 var labeledPredicted = labelPredicted(predicted, 0.5);

 if(actual == labeledPredicted) {
 predictedVsActualPoint[2] = 'Correct';
 }
 else {
 predictedVsActualPoint[2] = 'Incorrect';
 }

 why does it compare the *actual and labeledPredicted* where it
 should be comparing *actual and predicted*?

 Also, the *Actual vs Predicted graph for MNIST show the axis in
 Meters *(mnist.png) which doesn't make sense. I'm still looking
 into this.

 Thank you



 --
 Regards,

 Thushan Ganegedara
 School of IT
 University of Sydney, Australia




 --

 Thanks  regards,
 Nirmal

 Associate Technical Lead - Data Technologies Team, WSO2 Inc.
 Mobile: +94715779733
 Blog: 

Re: [Dev] How to avoid addTenant from changing already existing password in LDAP

2015-07-22 Thread Amila Maha Arachchi
+1

On Wed, Jul 22, 2015 at 5:43 PM, Danushka Fernando danush...@wso2.com
wrote:

 We can do something like thos

 @Override
public void doUpdateCredentialByAdmin(String userName, Object
 newCredential)
throws UserStoreException {
if (newCredential != null  !newCredential.equals()) {
super.doUpdateCredentialByAdmin(userName,
 newCredential);
   }
}

 Thanks  Regards
 Danushka Fernando
 Senior Software Engineer
 WSO2 inc. http://wso2.com/
 Mobile : +94716332729

 On Wed, Jul 22, 2015 at 5:40 PM, Amila Maha Arachchi ami...@wso2.com
 wrote:



 On Wed, Jul 22, 2015 at 12:49 PM, Manjula Rathnayake manju...@wso2.com
 wrote:

 Hi all,

 Let me add bit more context here.

 Registering an organization(creating a tenant) was originated from AF in
 app cloud. By upon receiving a tenant registration request to AF node, AF
 node trigger tenant creation in Stratos nodes(namely Dev,Test,Prod Stratos
 manager nodes). All above nodes make use of a single LDAP and tenant admin
 user is created only by AF node. But other nodes kept updating the password
 of this tenant admin with the same value received from initial tenant
 registration flow.

 In cloud setup, we are changing the tenant creation flow as below.
 1. Tenant creation is initiated by cloud management application upon
 organization registration. This create a tenant structure in LDAP and
 userstore database.
 2. Tenant admin logins and click on app cloud. This triggers tenant
 creation process in Stratos nodes.

 Based on above flow, we do not have the tenant admin password in 2nd
 step above.

 I am +1 on coming up with a custom userstore manager due to
 1. Minimal changes on existing flow where new userstore manager is
 plugged in with config changes.
 2. Cloud already making use of a custom userstore manager, hence
 introduction of new method is simple.
 3. Cloud management application already validates the password
 requirements in front-end layers, hence ignoring the empty password update
 at the backend is acceptable rather patching the kernel with API changes.


 IIUC this custom userstore manager needs to be used at stratos manager,
 correct? In our setup, we already have a custom userstore manager and we
 will have to override the method you have mentioned, correct?

 If so, what will happen when we use the same userstore manager in AF
 instance or the appserver where tenant creation happens?

 Feels like I am missing something. May be the logic on how to decide to
 not to update the password?


 thank you.



 On Wed, Jul 22, 2015 at 12:13 PM, Punnadi Gunarathna punn...@wso2.com
 wrote:

 hi All,

 In AF latest deployment, AF has a separate UM and Registry database
 where as Straos side has a separate UM and registry database. All are
 pointing to same LDAP.

 Once the tenant get registered, login to AF side and click on app
 cloud,  a listener will be invoked in Stratos side which does addTenant
 process. Since the user is logged in, the tenant password is set to a
 garbage value and it will be sent to Stratos side. This will update the
 tenant admin password to a garbage value with persistTenant method in
 TenantPesistor [1] (Line no 204).

 We thought of writing a custom userstore and override
 updateCredentialByAdmin as follows:

 Send either an empty password or a constant from AF side and password
 update will not happen in override method by checking that condition.

 Please share your thoughts.


 [1]
 https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/stratos/tenant-mgt/org.wso2.carbon.tenant.mgt.core/2.2.0/src/main/java/org/wso2/carbon/tenant/mgt/core/
 --
 Thanks and Regards,

 Punnadi Gunarathna
 Senior Software Engineer,
 WSO2, Inc.; http://wso2.com http://wso2
 Blog: http://hi-my-world.blogspot.com/
 Tel : 94 11 214 5345
 Fax :94 11 2145300



  http://lalajisureshika.blogspot.com/




 --
 Manjula Rathnayaka
 Associate Technical Lead
 WSO2, Inc.
 Mobile:+94 77 743 1987




 --
 *Amila Maharachchi*
 Senior Technical Lead
 WSO2, Inc.; http://wso2.com

 Blog: http://maharachchi.blogspot.com
 Mobile: +94719371446


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





-- 
*Amila Maharachchi*
Senior Technical Lead
WSO2, Inc.; http://wso2.com

Blog: http://maharachchi.blogspot.com
Mobile: +94719371446
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to check exceeded allocated quota in RoleBasedAccessRateController

2015-07-22 Thread Supun Malinga
Hi,

For the moment this would be the way to filter out the cause. But the
better approach would be to set a flag in AccessInformation class on the
respective error type. For this we need to improve AccessInformation class.

May I know your use case ?.

thanks,

On Wed, Jul 22, 2015 at 11:37 AM, Thilini Cooray thili...@wso2.com wrote:

 Hi,

 I would like to have a little clarification regarding canAccess method in 
 RoleBasedAccessRateController
 of org.wso2.carbon.throttle.core.

 Consider following example
   AccessInformation info =
 roleBasedAccessControler.canAccess(throttleContext, consumerKey,
 throttleId);

 I want to filter out the situation where info.isAccessAllowed() = false due
 to the reason exceeded the allocated quota.

 Is there a more suitable approach to do this check other than info.
 getFaultReason().contains(exceeded the allocated quota)?

 Thanks.

 --
 Best Regards,

 *Thilini Cooray*
 Software Engineer
 Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
 E-mail : thili...@wso2.com

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware

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




-- 
Supun Malinga,

Senior Software Engineer,
WSO2 Inc.
http://wso2.com
email: sup...@wso2.com sup...@wso2.com
mobile: +94 (0)71 56 91 321
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] java.lang.IllegalStateException: Trying to set the domain from 1 to 2

2015-07-22 Thread Supun Malinga
Hi,

The fix seems appropriate. Will discuss with the team further and merge
this today..
For the integration tests, is there no way to verify the fix without doing
load requests ?.

thanks,

On Wed, Jul 22, 2015 at 1:39 PM, Supun Malinga sup...@wso2.com wrote:

 Hi Malaka,

 Can you point out the place where its being set in message context ?.
 Basically I want to understand why we cannot destroy the context at that
 level (after the usage of CC is done).

 thanks,

 On Tue, Jul 21, 2015 at 8:10 PM, Malaka Silva mal...@wso2.com wrote:

 Hi Supun,

 This issue can only be reproduced if you do a load test parallel with two
 or more tenants.

 Here tenant domain is set with the value from message context. This fix
 will clean the thread context before setting the new context.

 On Tue, Jul 21, 2015 at 7:45 PM, Supun Malinga sup...@wso2.com wrote:

 Hi Malaka,

 Can you explain the fix you have done pls ?. We need to understand that
 the fix is the optimal one.

 Also do we have integration tests for the fix in kernel or ESB level ?.
 Please note it is better if we can have a test case for this in kernel
 itself.

 thanks,

 On Tue, Jul 21, 2015 at 4:33 PM, Malaka Silva mal...@wso2.com wrote:

 Hi Carbon Team,

 Please review and merge this before the next release.

 On Tue, Jul 21, 2015 at 4:29 PM, Malaka Silva mal...@wso2.com wrote:

 Any update on this?

 On Mon, Jul 13, 2015 at 10:35 AM, Malaka Silva mal...@wso2.com
 wrote:

 Hi Carbon Team,

 Any update on this?

 On Thu, Jul 2, 2015 at 12:11 PM, Malaka Silva mal...@wso2.com
 wrote:

 Hi Carbon Team,

 I have reproduced the issue and have done a fix.

 Please review and merge.

 Related jira's [1] and [2]. Fix with [3]

 [1] https://wso2.org/jira/browse/ESBJAVA-3801
 [2] https://wso2.org/jira/browse/CARBON-15294
 [3] https://github.com/wso2/carbon4-kernel/pull/264

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --
 Supun Malinga,

 Senior Software Engineer,
 WSO2 Inc.
 http://wso2.com
 email: sup...@wso2.com sup...@wso2.com
 mobile: +94 (0)71 56 91 321




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print this
 email only if it is absolutely necessary.




 --
 Supun Malinga,

 Senior Software Engineer,
 WSO2 Inc.
 http://wso2.com
 email: sup...@wso2.com sup...@wso2.com
 mobile: +94 (0)71 56 91 321




-- 
Supun Malinga,

Senior Software Engineer,
WSO2 Inc.
http://wso2.com
email: sup...@wso2.com sup...@wso2.com
mobile: +94 (0)71 56 91 321
___
Dev mailing list
Dev@wso2.org

Re: [Dev] [GSoC-2015] Proposal 11: Recommendation Solution for WSO2 Machine Learner

2015-07-22 Thread Madawa Soysa
Hi Nirmal,

Sorry for the late reply.

I have successfully integrated the Recommendation Algorithm to ML for data
sets with explicit Rating. Currently I am implementing the feature for data
sets with implicit feedback data.

Is it possible to have a code review next week? Then I could demonstrate
what I did and also discuss further modification and the JavaScript client.

Thanks,
Madawa

On 22 July 2015 at 10:10, Nirmal Fernando nir...@wso2.com wrote:

 Ok, thanks for the update. Do you need any input from us for the remaining
 tasks?

 On Wed, Jul 22, 2015 at 10:06 AM, Madawa Soysa madawa...@cse.mrt.ac.lk
 wrote:

 Hi,

 Almost finished integrating the algorithm to the ML. I'm currently
 testing and fixing some errors with it. I will give a full update in the
 evening. Things left to do are we need a way to get recommendations through
 the REST API and also the JavaScript client to extract data.

 Thanks,
 Madawa

 On 22 July 2015 at 09:32, Nirmal Fernando nir...@wso2.com wrote:

 Hi Madawa,

 Could you please summarize the current status of the project and also
 the things left to do?

 On Thu, Jul 16, 2015 at 12:15 PM, Thushan Ganegedara thu...@gmail.com
 wrote:

 Hello Madawa,

 In addition to what Nirmal said, please check if there any spelling
 mistakes or case mismatches in the Algorithm Name/Algorithm Type

 Thank you

 On Thu, Jul 16, 2015 at 4:19 PM, Nirmal Fernando nir...@wso2.com
 wrote:

 +Thushan

 On Thu, Jul 16, 2015 at 11:42 AM, Nirmal Fernando nir...@wso2.com
 wrote:

 Hi Madawa,

 Please check
 https://github.com/thushv89/carbon-ml/commit/a76dfcfdbca157cc4ac4e175959c80ae72bd0d01

 You need to update Jag files a bit.

 On Thu, Jul 16, 2015 at 11:33 AM, Madawa Soysa 
 madawa...@cse.mrt.ac.lk wrote:

 Hi Nirmal,

 I added the details of the new algorithm to the machine-learner.xml.
 But the UI doesn't show the new algorithm to select when creating an
 analysis. What would be the reason? Any idea how to fix it?

 On 6 July 2015 at 12:17, Madawa Soysa madawa...@cse.mrt.ac.lk
 wrote:

 Hi Nirmal,

 Thanks for the link. I will check it.

 On 6 July 2015 at 07:27, Nirmal Fernando nir...@wso2.com wrote:

 Hi Madawa,

 Please check this presentation
 https://spark-summit.org/2015/events/a-more-scalable-way-of-making-recommendations-with-mllib/

 On Thu, Jul 2, 2015 at 9:22 AM, Nirmal Fernando nir...@wso2.com
 wrote:

 Thanks Madawa.

 On Wed, Jul 1, 2015 at 11:46 PM, Madawa Soysa 
 madawa...@cse.mrt.ac.lk wrote:

 Hi Nirmal,

 I have done following work so far in the project.

- Implemented the recommendation algorithm using java and
spark. A sample source code is hosted at [1]
https://github.com/madawas/spark-recommendation

- Researched on *inferring a rating through implicit
feedback data*,  collaborative filtering with implicit
feedback data and using existing functions on spark to work with 
 implicit
data and recommending.
After reading several papers and documents, I decided to use 
 *weighted
average of product page views and purchases* as the inferred
observation as the preference value.

- Started integrating the algorithms to carbon-ml. [2]
https://github.com/madawas/carbon-ml/tree/recommendation

 [1] - https://github.com/madawas/spark-recommendation
 [2] - https://github.com/madawas/carbon-ml/tree/recommendation


 Regards,
 Madawa

 On 1 July 2015 at 22:25, Nirmal Fernando nir...@wso2.com
 wrote:

 Hi Madawa,

 Please send the current status/work carried out of the project,
 that will help us to set the future goals.

 On Fri, Jun 26, 2015 at 12:09 PM, Madawa Soysa 
 madawa...@cse.mrt.ac.lk wrote:

 Sure, let's meet next week.

 On 25 June 2015 at 14:44, Srinath Perera srin...@wso2.com
 wrote:

 Madawa, sorry for being late to respond. Lets planning to
 meet on week of july 07 ( I am traveling). Meet Nirmal before if 
 needed.

 --Srinath

 On Mon, Jun 22, 2015 at 9:26 AM, Madawa Soysa 
 madawa...@cse.mrt.ac.lk wrote:

 I have lectures in Wednesday morning till 12.15. I'll be
 free after that.

 On 22 June 2015 at 09:24, Srinath Perera srin...@wso2.com
 wrote:

 Can we meet Wednesday 10.30 at WSO2 Trace office?

 On Mon, Jun 22, 2015 at 9:10 AM, Nirmal Fernando 
 nir...@wso2.com wrote:



 On Mon, Jun 22, 2015 at 9:07 AM, Madawa Soysa 
 madawa...@cse.mrt.ac.lk wrote:

 Hi,

 In this week I have researched on collaborative filtering
 with implicit feedback data (i.e session data and user 
 behavior). I have
 followed [1, 2] on this. Even though these papers provide a 
 solution we
 cannot use them since we cannot use the current 
 implementation in Spark
 with these.

 Also I researched on the possibility of inferring a
 rating using the session data and create a new data set and 
 push to spark,
 but almost all the solutions are domain specific. Since the 
 preferences are
 dependent on item attributes.

 How should I proceed? Since I have finished implementing
 the generic recommendation algorithm I can integrate this 
 with ML with a

Re: [Dev] Please review and merge

2015-07-22 Thread Elilmatha Sivanesan
Hi Malaka,

Please review and merge PR[1] for bugherd connector.
After fixing the certificate issue from bugherd support , I have changed
the http endpoints to work with esb beta.

[1] https://github.com/wso2/esb-connectors/pull/241/

Thank you.

On Thu, Jul 23, 2015 at 3:06 AM, Vanjikumaran Sivajothy va...@wso2.com
wrote:

 @eilimatha,
 Please do not send the mail to dev so blank subject! Send with some
 meaningful content and the subject!

 On Wed, Jul 22, 2015 at 8:14 AM, Malaka Silva mal...@wso2.com wrote:

 We can't merge this until we fully test this. There seems to be http
 endpoints which may not work with esb 490 beta.

 On Wed, Jul 22, 2015 at 2:04 PM, Elilmatha Sivanesan elilma...@wso2.com
 wrote:

 Hi Malaka,

 Please review and merge PR [1]

 [1]
 *https://github.com/wso2/esb-connectors/pull/241
 https://github.com/wso2/esb-connectors/pull/241*

 Thank you.

 --
 *S.Elilmatha*
 Associate  Software Engineer,

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

 Mobile 0779842221.




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print this
 email only if it is absolutely necessary.

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




 --
 Vanjikumaran Sivajothy
 *Associate Technical Lead*
 *WSO2 Inc. http://wso2.com http://wso2.com/*
 *USA Mobile **+1-812-361-1286*
 *Srilanka Mobile:+94-777-219-209*
 [image: Facebook] https://www.facebook.com/vanjikumaran [image: Twitter]
 https://twitter.com/vanjikumaran [image: LinkedIn]
 http://www.linkedin.com/pub/vanjikumaran-sivajothy/25/b31/293 [image:
 Blogger] http://vanjikumaran.blogspot.com/ [image: SlideShare]
 http://www.slideshare.net/vanjikumaran

 This communication may contain privileged or other
 confidential information and is intended exclusively for the addressee/s.
 If you are not the intended recipient/s, or believe that you may
 have received this communication in error, please reply to the
 sender indicating that fact and delete the copy you received and in
 addition, you should not print, copy, re-transmit, disseminate, or
 otherwise use the information contained in this communication.
 Internet communications cannot be guaranteed to be timely, secure, error
 or virus-free. The sender does not accept liability for any errors
 or omissions




-- 
*S.Elilmatha*
Associate  Software Engineer,

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

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


[Dev] How to add a SCIM user to secondary userstore

2015-07-22 Thread Udara Liyanage
Hi,

I used below REST call to create a SCIM user. This create a users in
primary userstore sucesfully. I want to how to create the user in my
secondary userstore (AD) which has domain name udaraad.

curl -v -k --user admin:admin --data
{schemas:[],name:{familyName:gunasinghe,givenName:hasinitg},userName:'hasinit',password:hasinitg,emails:[{primary:true,value:
hasini_home.com,type:home},{value:hasini_work.com,type:work}]}
--header Content-Type:application/json
https://localhost:9443/wso2/scim/Users

I tried with following combinations and found no luck and encountered below
error response. But still no error message is shown in Carbon logs which
should.

userName:'udaraad/hasinit'
userName:'udaraad\/hasinit'
userName:udaraad/hasinit
userName:udaraad//hasinit

{Errors:[{description:Error in adding the user: udaraad/hasinit to the
user store..,code:500}]}



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to add a SCIM user to secondary userstore

2015-07-22 Thread Ushani Balasooriya
Hi Udara,

Have you done the claim mapping correctly?

E.g.,

urn:scim:schemas:core:1.0:id -
homePostalAddress;udaraad/homePostalAddress;

Then the command should be as below : Please refer [1]

curl -v -k --user admin:admin --data {schemas:[],userName:'udaraad
/user1',password:Wso2@123} --header Content-Type:application/json
https://localhost:9443/wso2/scim/Users

[1]
https://docs.wso2.com/display/IS500/Provisioning+Users+to+Active+Directory+User+Store+Using+SCIM


On Thu, Jul 23, 2015 at 10:59 AM, Udara Liyanage ud...@wso2.com wrote:

 Hi,

 I used below REST call to create a SCIM user. This create a users in
 primary userstore sucesfully. I want to how to create the user in my
 secondary userstore (AD) which has domain name udaraad.

 curl -v -k --user admin:admin --data
 {schemas:[],name:{familyName:gunasinghe,givenName:hasinitg},userName:'hasinit',password:hasinitg,emails:[{primary:true,value:
 hasini_home.com,type:home},{value:hasini_work.com,type:work}]}
 --header Content-Type:application/json
 https://localhost:9443/wso2/scim/Users

 I tried with following combinations and found no luck and encountered
 below error response. But still no error message is shown in Carbon logs
 which should.

 userName:'udaraad/hasinit'
 userName:'udaraad\/hasinit'
 userName:udaraad/hasinit
 userName:udaraad//hasinit

 {Errors:[{description:Error in adding the user: udaraad/hasinit to
 the user store..,code:500}]}



 --

 Udara Liyanage
 Software Engineer
 WSO2, Inc.: http://wso2.com
 lean. enterprise. middleware

 web: http://udaraliyanage.wordpress.com
 phone: +94 71 443 6897

 ___
 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
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to check exceeded allocated quota in RoleBasedAccessRateController

2015-07-22 Thread Thilini Cooray
Hi,

We are going to add an attribute to tier policies such as ignoreThrottle
(attribute name not finalized). If this attribute is enabled for a
particular tier policy, throttled out requests will not be halt.

For this particular scenario, we want to filter out requests which
throttled out because its allocated quota is exceeded. While going through
the source of RoleBasedAccessRateController I was able to identify that
exceeding quota is not the only reason for becoming
AccessInformation.isAccessAllowed = false.
That is why I wanted to clarify.

Thanks.

On Wed, Jul 22, 2015 at 6:25 PM, Supun Malinga sup...@wso2.com wrote:

 Hi,

 For the moment this would be the way to filter out the cause. But the
 better approach would be to set a flag in AccessInformation class on the
 respective error type. For this we need to improve AccessInformation
 class.

 May I know your use case ?.

 thanks,

 On Wed, Jul 22, 2015 at 11:37 AM, Thilini Cooray thili...@wso2.com
 wrote:

 Hi,

 I would like to have a little clarification regarding canAccess method
 in RoleBasedAccessRateController of org.wso2.carbon.throttle.core.

 Consider following example
   AccessInformation info =
 roleBasedAccessControler.canAccess(throttleContext, consumerKey,
 throttleId);

 I want to filter out the situation where info.isAccessAllowed() = false due
 to the reason exceeded the allocated quota.

 Is there a more suitable approach to do this check other than info.
 getFaultReason().contains(exceeded the allocated quota)?

 Thanks.

 --
 Best Regards,

 *Thilini Cooray*
 Software Engineer
 Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
 E-mail : thili...@wso2.com

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware

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




 --
 Supun Malinga,

 Senior Software Engineer,
 WSO2 Inc.
 http://wso2.com
 email: sup...@wso2.com sup...@wso2.com
 mobile: +94 (0)71 56 91 321




-- 
Best Regards,

*Thilini Cooray*
Software Engineer
Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
E-mail : thili...@wso2.com

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] java.lang.IllegalStateException: Trying to set the domain from 1 to 2

2015-07-22 Thread Malaka Silva
thx

On Thu, Jul 23, 2015 at 8:54 AM, Supun Malinga sup...@wso2.com wrote:

 Hi,

 The fix seems appropriate. Will discuss with the team further and merge
 this today..
 For the integration tests, is there no way to verify the fix without doing
 load requests ?.

 thanks,

 On Wed, Jul 22, 2015 at 1:39 PM, Supun Malinga sup...@wso2.com wrote:

 Hi Malaka,

 Can you point out the place where its being set in message context ?.
 Basically I want to understand why we cannot destroy the context at that
 level (after the usage of CC is done).

 thanks,

 On Tue, Jul 21, 2015 at 8:10 PM, Malaka Silva mal...@wso2.com wrote:

 Hi Supun,

 This issue can only be reproduced if you do a load test parallel with
 two or more tenants.

 Here tenant domain is set with the value from message context. This fix
 will clean the thread context before setting the new context.

 On Tue, Jul 21, 2015 at 7:45 PM, Supun Malinga sup...@wso2.com wrote:

 Hi Malaka,

 Can you explain the fix you have done pls ?. We need to understand that
 the fix is the optimal one.

 Also do we have integration tests for the fix in kernel or ESB level ?.
 Please note it is better if we can have a test case for this in kernel
 itself.

 thanks,

 On Tue, Jul 21, 2015 at 4:33 PM, Malaka Silva mal...@wso2.com wrote:

 Hi Carbon Team,

 Please review and merge this before the next release.

 On Tue, Jul 21, 2015 at 4:29 PM, Malaka Silva mal...@wso2.com wrote:

 Any update on this?

 On Mon, Jul 13, 2015 at 10:35 AM, Malaka Silva mal...@wso2.com
 wrote:

 Hi Carbon Team,

 Any update on this?

 On Thu, Jul 2, 2015 at 12:11 PM, Malaka Silva mal...@wso2.com
 wrote:

 Hi Carbon Team,

 I have reproduced the issue and have done a fix.

 Please review and merge.

 Related jira's [1] and [2]. Fix with [3]

 [1] https://wso2.org/jira/browse/ESBJAVA-3801
 [2] https://wso2.org/jira/browse/CARBON-15294
 [3] https://github.com/wso2/carbon4-kernel/pull/264

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future.
 Print this email only if it is absolutely necessary.




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --
 Supun Malinga,

 Senior Software Engineer,
 WSO2 Inc.
 http://wso2.com
 email: sup...@wso2.com sup...@wso2.com
 mobile: +94 (0)71 56 91 321




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/
 http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --
 Supun Malinga,

 Senior Software Engineer,
 WSO2 Inc.
 http://wso2.com
 email: sup...@wso2.com sup...@wso2.com
 mobile: +94 (0)71 56 91 321




 --
 Supun Malinga,

 Senior Software Engineer,
 WSO2 Inc.
 http://wso2.com
 email: sup...@wso2.com sup...@wso2.com
 mobile: +94 (0)71 56 91 

[Dev] Interns working on data analysis

2015-07-22 Thread Di Zhong
Hi all,

Corey and I are two interns from IU Bloomington, we are working on
analyzing two datasets using WSO2 BAM.

Right now we are still on the stage of pushing data to BAM. We might be
sending emails asking some questions about BAM for a while, we appreciate
any help and thanks for bearing with us.


Best Regards,

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


Re: [Dev] How to check exceeded allocated quota in RoleBasedAccessRateController

2015-07-22 Thread Supun Malinga
On Thu, Jul 23, 2015 at 9:58 AM, Thilini Cooray thili...@wso2.com wrote:

 Hi,

 We are going to add an attribute to tier policies such as ignoreThrottle
 (attribute name not finalized). If this attribute is enabled for a
 particular tier policy, throttled out requests will not be halt.

Its better if the name implies the usecase. ignoreThrottle might be
confusing as per why we are ignoring it..



 For this particular scenario, we want to filter out requests which
 throttled out because its allocated quota is exceeded. While going through
 the source of RoleBasedAccessRateController I was able to identify that
 exceeding quota is not the only reason for becoming
 AccessInformation.isAccessAllowed = false.
 That is why I wanted to clarify.


I see. Then you will have to add a flag to represent each case..

thanks,



 Thanks.

 On Wed, Jul 22, 2015 at 6:25 PM, Supun Malinga sup...@wso2.com wrote:

 Hi,

 For the moment this would be the way to filter out the cause. But the
 better approach would be to set a flag in AccessInformation class on the
 respective error type. For this we need to improve AccessInformation
 class.

 May I know your use case ?.

 thanks,

 On Wed, Jul 22, 2015 at 11:37 AM, Thilini Cooray thili...@wso2.com
 wrote:

 Hi,

 I would like to have a little clarification regarding canAccess method
 in RoleBasedAccessRateController of org.wso2.carbon.throttle.core.

 Consider following example
   AccessInformation info =
 roleBasedAccessControler.canAccess(throttleContext, consumerKey,
 throttleId);

 I want to filter out the situation where info.isAccessAllowed() = false due
 to the reason exceeded the allocated quota.

 Is there a more suitable approach to do this check other than info.
 getFaultReason().contains(exceeded the allocated quota)?

 Thanks.

 --
 Best Regards,

 *Thilini Cooray*
 Software Engineer
 Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
 E-mail : thili...@wso2.com

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware

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




 --
 Supun Malinga,

 Senior Software Engineer,
 WSO2 Inc.
 http://wso2.com
 email: sup...@wso2.com sup...@wso2.com
 mobile: +94 (0)71 56 91 321




 --
 Best Regards,

 *Thilini Cooray*
 Software Engineer
 Mobile : +94 (0) 774 570 112 %2B94%20%280%29%20773%20451194
 E-mail : thili...@wso2.com

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware




-- 
Supun Malinga,

Senior Software Engineer,
WSO2 Inc.
http://wso2.com
email: sup...@wso2.com sup...@wso2.com
mobile: +94 (0)71 56 91 321
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Interns working on data analysis

2015-07-22 Thread Niranda Perera
Hi Di,

we would be more than happy to help you out with any problems you come
across.

on a side note, we are now moving BAM development to DAS (data analytics
server). DAS comes with a new approach and whole new architecture. so, we
suggest you take a look into that as well.
you could try the beta version here [1]

cheers

[1] https://svn.wso2.org/repos/wso2/people/inosh/wso2das-3.0.0-BETA.zip

On Thu, Jul 23, 2015 at 9:56 AM, Di Zhong d...@wso2.com wrote:

 Hi all,

 Corey and I are two interns from IU Bloomington, we are working on
 analyzing two datasets using WSO2 BAM.

 Right now we are still on the stage of pushing data to BAM. We might be
 sending emails asking some questions about BAM for a while, we appreciate
 any help and thanks for bearing with us.


 Best Regards,

 Di Zhong

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




-- 
*Niranda Perera*
Software Engineer, WSO2 Inc.
Mobile: +94-71-554-8430
Twitter: @n1r44 https://twitter.com/N1R44
https://pythagoreanscript.wordpress.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] XML works in devstudio but fails in UI editor

2015-07-22 Thread John Hawkins
Hi Folks,


I tried to manually edit an esb flow through the web UI but it fails with

javax.xml.stream.XMLStreamException: ParseError at [row,col]:[27,62]
Message: Element type header must be followed by either attribute
specifications,  or /.

This flow had been exported from devstudio - so devstsudio was the thing
that output the malformed xml ?

Is this a known problem or should I raise a jira (I tried googling but
couldn't see it reported anywhere).

many thanks,
John.


John Hawkins
Director: Solutions Architecture
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [EMM][CDM] EMM url prints from cdmf

2015-07-22 Thread Ayyoob Hamza
Hi,
What is the  reason for printing emm url from CDMF[1][2]. because this
 block will be executed even if we are running only cdmf without the emm. I
believe this needs to be moved into cdmf-plugins for emm.

[1]
https://github.com/wso2/carbon-device-mgt/blob/master/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/startup/handler/URLPrinterStartupHandler.java
https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fwso2%2Fcarbon-device-mgt%2Fblob%2Fmaster%2Fcomponents%2Fdevice-mgt%2Forg.wso2.carbon.device.mgt.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fwso2%2Fcarbon%2Fdevice%2Fmgt%2Fcore%2Fstartup%2Fhandler%2FURLPrinterStartupHandler.javasa=Dsntz=1usg=AFQjCNGtwmG8FXfXpbA6813Scdtt14lfQw
[2]
https://github.com/wso2/carbon-device-mgt/blob/master/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/internal/DeviceManagementServiceComponent.java


Thanks,


*Ayyoob Hamza*
*Software Engineer*
WSO2 Inc.; http://wso2.com
email: ayy...@wso2.com cell: +94 77 1681010 %2B94%2077%207779495
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev