Re: [Dev] An option to drop all categorical variables

2016-01-25 Thread Supun Sethunga
+1,

Think we should have an option to deselect-all/select-all features as well.
(why? : if there are hundreds of features and if the user wants only a few
features to their model, then he should be able to "deselect all" and
select only the necessary ones).

 In addition to that I think we need a 'search' for features too.

we have :)



On Tue, Jan 26, 2016 at 10:27 AM, Nirmal Fernando  wrote:

> +1. In addition to that I think we need a 'search' for features too.
>
> On Tue, Jan 26, 2016 at 10:15 AM, Fazlan Nazeem  wrote:
>
>> Hi team,
>>
>> What about adding an option to drop all categorical variables in the
>> dataset explore section? For instance when there are a lot of features in a
>> dataset and also a quite a number of categorical features, and if a user
>> needs to drop all the categorical variables prior to running the algorithm
>> it might be troublesome to go from page to page and drop them one by one.
>>
>> WDYT?
>>
>> --
>> Thanks & Regards,
>>
>> Fazlan Nazeem
>>
>> *Software Engineer*
>>
>> *WSO2 Inc*
>> Mobile : +94772338839
>> <%2B94%20%280%29%20773%20451194>
>> fazl...@wso2.com
>>
>
>
>
> --
>
> Thanks & regards,
> Nirmal
>
> Team Lead - WSO2 Machine Learner
> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
> Mobile: +94715779733
> Blog: http://nirmalfdo.blogspot.com/
>
>
>


-- 
*Supun Sethunga*
Software Engineer
WSO2, Inc.
http://wso2.com/
lean | enterprise | middleware
Mobile : +94 716546324
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Puppet modules - Cleaned up jdk and product distribution

2016-01-25 Thread Sajith Kariyawasam
Hi Devs,

With the current puppet modules, when docker images are built it sized
around 2.216 GB and it seemed product and JDK binaries were not removed
after the installation.

I have now updated the puppet modules to,

1) Remove java cache directory after java installation
2) Remove wso2 product pack after installation

Ideally, JDK distribution should be cleaned up by the 7-terminals [1]
module. I have sent a PR [2] with the improvement, until its merged and
available in puppet forge I have fixed that in java.pp

Now the image size is reduced to around 1.417 GB

[1] https://github.com/7terminals/puppet-java.git
[2] https://github.com/7terminals/puppet-java/pull/14

Thanks,
Sajith

-- 
Sajith Kariyawasam
*Committer and PMC member, Apache Stratos, *
*WSO2 Inc.; http://wso2.com *
*Mobile: 0772269575*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [VOTE] Release WSO2 Microservices Server 1.0.0 RC4

2016-01-25 Thread Lakmal Warusawithana
Hi Devs,

I have worked with Dhakshika on the issue and we found out the reason for
the issue, when access the petstore UI, backend servers not properly up and
running. (in the background servers still booting up). But if we wait few
seconds and tried the app, it working as expected.

since this in not a code issue, I'm withdraw my -1  and giving +1

[x] Go head and release.

On Sat, Jan 23, 2016 at 3:55 PM, Lakmal Warusawithana 
wrote:

> -1
>
> [x] Broken - do not release
>
> I have checked both Chrome and Firefox but when going to add Pet category
> its redirect to login.
>
>
>
> On Sat, Jan 23, 2016 at 2:02 PM, Afkham Azeez  wrote:
>
>> Can you clear all cookies or retry from a different browser?
>>
>> On Fri, Jan 22, 2016 at 4:35 PM, Lakmal Warusawithana 
>> wrote:
>>
>>> Hi,
>>>
>>> Petstore sample is failing to me. :(
>>>
>>> Setting up k8s and docker images work as expected. But front end admin
>>> UI not allowed to add pet categories. Its re directing to login page. I
>>> have tested with chrome in mac.
>>>
>>> @Dakshika, did you changed something in login/redirect ?
>>>
>>>
>>>
>>>
>>> On Tue, Jan 19, 2016 at 5:49 PM, Samiyuru Senarathne 
>>> wrote:
>>>
 Hi Devs,

 This is the 4th Release Candidate of WSO2 Microservices Server 1.0.0.

 Please download, test the product and vote.

 *​Source and binary distribution files:*
 *https://github.com/wso2/product-mss/releases/tag/v1.0.0-RC4
 *

 *Maven staging repository:*
 http://maven.wso2.org/nexus/content/repositories/orgwso2carbonmss-298/

 *The tag to be voted upon:*
 *https://github.com/wso2/product-mss/tree/v1.0.0-RC4
 *


 [ ] Broken - do not release (explain why)
 [ ] Stable - go ahead and release

 Note: Since the artifacts that have to be uploaded to the maven central
 are not yet uploaded, please make sure to first build the project from the
 source in order to make all artifacts available in the maven local
 repository.

 Thank you,
 Carbon Team

 --
 Samiyuru Senarathne
 *Software Engineer*
 Mobile : +94 (0) 71 134 6087
 samiy...@wso2.com

>>>
>>>
>>>
>>> --
>>> Lakmal Warusawithana
>>> Director - Cloud Architecture; WSO2 Inc.
>>> Mobile : +94714289692
>>> Blog : http://lakmalsview.blogspot.com/
>>>
>>>
>>
>>
>> --
>> *Afkham Azeez*
>> Director of Architecture; WSO2, Inc.; http://wso2.com
>> Member; Apache Software Foundation; http://www.apache.org/
>> * *
>> *email: **az...@wso2.com* 
>> * cell: +94 77 3320919 <%2B94%2077%203320919>blog: *
>> *http://blog.afkham.org* 
>> *twitter: **http://twitter.com/afkham_azeez*
>> 
>> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
>> *
>>
>> *Lean . Enterprise . Middleware*
>>
>
>
>
> --
> Lakmal Warusawithana
> Director - Cloud Architecture; WSO2 Inc.
> Mobile : +94714289692
> Blog : http://lakmalsview.blogspot.com/
>
>


-- 
Lakmal Warusawithana
Director - Cloud Architecture; WSO2 Inc.
Mobile : +94714289692
Blog : http://lakmalsview.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] SCIM PUT/PATCH group with members in order to add a new member

2016-01-25 Thread Chamila Wijayarathna
Hi Xavaier,

I could run the steps you have mentioned above without any issue in my IS
5.1.0 setup.

In your case it seems like the issue is in your step 3 (Create second
user). There you have intended to create a user, but has sent  a GROUP POST
request to SCIM group endpoint, so there it will create a group not a user.
So there is no user with id '1b97b894-5cbe-4b39-b6ce-9606debc5a28'. This is
why your requests are failing. Please check that, it will fix your issue.

Thank You!

On Mon, Jan 25, 2016 at 10:26 PM, Xavier Pegenaute M2M <
xavier.pegena...@m2mcloudfactory.com> wrote:

> Hi again,
>
> first, thanks a lot for your previous answers. This time I had some
> problem updating a group when it has already some member. My steps are
> shown below:
>
> *1) Create a first user*
> curl -k --user admin:admin --data
> "{"schemas":[],"name":{"familyName":"John","givenName":"Doe"},"userName":'groupUSR001',"password":"testPwd123"}"
> --header "Content-Type:application/json"
> https://localhost:9443/wso2/scim/Users
>
> {"id":"9b0585d0-646e-4eee-9d8a-342203540510","schemas":["urn:scim:schemas:core:1.0"],"name":{"familyName":"John","givenName":"Doe"},"userName":"groupUSR001","meta":
> {"lastModified":"2016-01-25T08:50:55","location":
> "https://localhost:9443/wso2/scim/Users/9b0585d0-646e-4eee-9d8a-342203540510;
> 
> ,"created":"2016-01-25T08:50:55"}}
>
> *2) Create a group with a member*
> curl -k --user admin:admin --data "{"displayName": 'ngioletGR', "members":
> [{"value": "9b0585d0-646e-4eee-9d8a-342203540510", "display":
> "groupUSR001"}]}" --header "Content-Type:application/json"
> https://localhost:9443/wso2/scim/Groups
>
>
> {"id":"1b97b894-5cbe-4b39-b6ce-9606debc5a28","schemas":["urn:scim:schemas:core:1.0"],"displayName":"PRIMARY/ngioletGR","members":[{"value":"9b0585d0-646e-4eee-9d8a-342203540510","display":"groupUSR001"}],"meta":{"lastModified":"2016-01-25T08:59:49","created":"2016-01-25T08:59:49","location":
> "https://localhost:9443/wso2/scim/Groups/1b97b894-5cbe-4b39-b6ce-9606debc5a28;
> 
> }}
>
> *3) Create a second user*
> curl -k --user admin:admin --data "{"displayName": 'ngioletGR2',
> "members": [{"value": "9b0585d0-646e-4eee-9d8a-342203540510", "display":
> "groupUSR001"}]}" --header "Content-Type:application/json"
> https://localhost:9443/wso2/scim/Groups
>
>
> {"id":"1b97b894-5cbe-4b39-b6ce-9606debc5a28","schemas":["urn:scim:schemas:core:1.0"],"displayName":"PRIMARY/ngioletGR2","members":[{"value":"9b0585d0-646e-4eee-9d8a-342203540510","display":"groupUSR001"}],"meta":{"lastModified":"2016-01-25T08:59:49","created":"2016-01-25T08:59:49","location":
> "https://localhost:9443/wso2/scim/Groups/1b97b894-5cbe-4b39-b6ce-9606debc5a28;
> 
> }}
>
>
> *3a) PATCH group to add the last user*
> curl -k -X PATCH --user admin:admin --data "{"displayName": 'ngioletGR',
> "members": [{"value": "9b0585d0-646e-4eee-9d8a-342203540510", "display":
> "groupUSR001"}, {"value": "1b97b894-5cbe-4b39-b6ce-9606debc5a28",
> "display": "groupUSR002"}]}" --header "Content-Type:application/json"
> https://localhost:9443/wso2/scim/Groups/1b97b894-5cbe-4b39-b6ce-9606debc5a28
>
> *{"Errors":[{"description":"User: 1b97b894-5cbe-4b39-b6ce-9606debc5a28
> doesn't exist in the user store. Hence, can not update the group:
> ngioletGR","code":"500"}]}*
>
> *3b) PUT group **to add the last user*
> curl -k -X PUT --user admin:admin --data "{"displayName": 'ngioletGR',
> "members": [{"value": "9b0585d0-646e-4eee-9d8a-342203540510", "display":
> "groupUSR001"}, {"value": "1b97b894-5cbe-4b39-b6ce-9606debc5a28",
> "display": "groupUSR002"}]}" --header "Content-Type:application/json"
> https://localhost:9443/wso2/scim/Groups/1b97b894-5cbe-4b39-b6ce-9606debc5a28
>
> *{"Errors":[{"description":"Error occurred while updating old group :
> PRIMARY/ngioletGR","code":"500"}]}*
>
>
> Am I wrong in some step?, I am using IS 5.1
>
> Best regards,
> Xavi
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Chamila Dilshan Wijayarathna,*
Software Engineer
Mobile:(+94)788193620
WSO2 Inc., http://wso2.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] An option to drop all categorical variables

2016-01-25 Thread Nirmal Fernando
+1. In addition to that I think we need a 'search' for features too.

On Tue, Jan 26, 2016 at 10:15 AM, Fazlan Nazeem  wrote:

> Hi team,
>
> What about adding an option to drop all categorical variables in the
> dataset explore section? For instance when there are a lot of features in a
> dataset and also a quite a number of categorical features, and if a user
> needs to drop all the categorical variables prior to running the algorithm
> it might be troublesome to go from page to page and drop them one by one.
>
> WDYT?
>
> --
> Thanks & Regards,
>
> Fazlan Nazeem
>
> *Software Engineer*
>
> *WSO2 Inc*
> Mobile : +94772338839
> <%2B94%20%280%29%20773%20451194>
> fazl...@wso2.com
>



-- 

Thanks & regards,
Nirmal

Team Lead - WSO2 Machine Learner
Associate Technical Lead - Data Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] An option to drop all categorical variables

2016-01-25 Thread CD Athuraliya
On Tue, Jan 26, 2016 at 10:42 AM, Supun Sethunga  wrote:

> +1,
>
> Think we should have an option to deselect-all/select-all features as
> well. (why? : if there are hundreds of features and if the user wants only
> a few features to their model, then he should be able to "deselect all" and
> select only the necessary ones).
>

Exactly! It's better to have more generic ones as much as possible instead
of specific options. Anyway drop all categorical features seems fair enough
option. For select all/none we have something here [1]. Please talk to UX
guys if we're gonna add them. Not sure whether this supports DataTables.

[1] http://wso2-dev-ux.github.io/theme-wso2/layout.html

>
>  In addition to that I think we need a 'search' for features too.
>
> we have :)
>
>
>
> On Tue, Jan 26, 2016 at 10:27 AM, Nirmal Fernando  wrote:
>
>> +1. In addition to that I think we need a 'search' for features too.
>>
>> On Tue, Jan 26, 2016 at 10:15 AM, Fazlan Nazeem  wrote:
>>
>>> Hi team,
>>>
>>> What about adding an option to drop all categorical variables in the
>>> dataset explore section? For instance when there are a lot of features in a
>>> dataset and also a quite a number of categorical features, and if a user
>>> needs to drop all the categorical variables prior to running the algorithm
>>> it might be troublesome to go from page to page and drop them one by one.
>>>
>>> WDYT?
>>>
>>> --
>>> Thanks & Regards,
>>>
>>> Fazlan Nazeem
>>>
>>> *Software Engineer*
>>>
>>> *WSO2 Inc*
>>> Mobile : +94772338839
>>> <%2B94%20%280%29%20773%20451194>
>>> fazl...@wso2.com
>>>
>>
>>
>>
>> --
>>
>> Thanks & regards,
>> Nirmal
>>
>> Team Lead - WSO2 Machine Learner
>> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
>> Mobile: +94715779733
>> Blog: http://nirmalfdo.blogspot.com/
>>
>>
>>
>
>
> --
> *Supun Sethunga*
> Software Engineer
> WSO2, Inc.
> http://wso2.com/
> lean | enterprise | middleware
> Mobile : +94 716546324
>



-- 
*CD Athuraliya*
Software Engineer
WSO2, Inc.
lean . enterprise . middleware
Mobile: +94 716288847 <94716288847>
LinkedIn  | Twitter
 | Blog

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


[Dev] Why are we passing Algorithms Name to update Hyper-parameters?

2016-01-25 Thread Supun Sethunga
HI,

Any idea for $subject, at [1] ? Isn't the analysis id is sufficient? or was
there any reason to do so?

Issue is, if the user passes a wrong/mismatching algorithm name (than the
actual algo name in the analysis) here, it updates the "ML_HYPER_PARAMETER"
table with this algo name, while keeping the "ML_MODEL_CONFIGURATION"
table's algo name unchanged. This leads to data inconsistencies in
retrieving data via REST API.

Think we don't need to store alog name in ML_HYPER_PARAMETER table in the
first place. But if we need to do so for some reason, then best approach is
to get it from the ML_MODEL_CONFIGURATION table and update the
ML_HYPER_PARAMETER table.

[1]
https://docs.wso2.com/display/ML110/Setting+Hyper+Parameters+for+an+Algorithm+of+an+Analysis+via+REST+API


Regards,
Supun

-- 
*Supun Sethunga*
Software Engineer
WSO2, Inc.
http://wso2.com/
lean | enterprise | middleware
Mobile : +94 716546324
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ESB] What is usage of OAuth Mediator

2016-01-25 Thread Vijitha Ekanayake
Hi Abimaran,

AFAIK, OAuth mediator or OAuth Handler is used in similar
purposes(authenticate clients to secured services). One difference could be
the request intercepting points are different in a mediator and a handler.
Oauth mediator can be used authenticate to proxy service and normal Oauth
API handler only used authenticate requests comes to API which cannot use
to authenticate proxy services.

Following blog posts may be helpful to you:
[1] -
http://pathberiya.blogspot.com/2011/02/2-legged-oauth-to-secure-restful.html
[2] -
http://blog.facilelogin.com/2011/07/integrating-3-legged-oauth-with-xacml.html


Thanks.

On Tue, Jan 26, 2016 at 5:59 AM, Abimaran Kugathasan 
wrote:

> Hi,
>
> What is the usage of OAuth Mediator [1]? What we can achive with this
> mediator than with a custom OAuth Handler with Identity Server?
>
> [1] : https://docs.wso2.com/display/ESB490/OAuth+Mediator
>
> --
> Thanks
> Abimaran Kugathasan
>
> Software Engineer | WSO2 Inc
> Data & APIs Technologies Team
> Mobile : +94 773922820
>
> 
> 
>   
> 
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Vijitha Ekanayake
Software Engineer*, *WSO2, Inc.; http://wso2.com/
Mobile : +94 777 24 73 39 | +94 718 74 44 08
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Issue activating osgi component with the service component reference

2016-01-25 Thread Nipuna Prashan
Hidanushka,

Yes I checked debugging. No it is not hitting active method when I add
following reference

* @scr.reference name="tenant.tenantManagementService"
*
interface="org.wso2.carbon.appfactory.tenant.mgt.service.TenantManagementService"
cardinality="0..1"
* policy="dynamic" bind="*setTenantManagementService*" unbind="
*unsetTenantManagementService*"

Service Component Class


import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.cloud.tenantdeletion.StartDeletor;
import
org.wso2.carbon.cloud.tenantdeletion.listeners.CloudUserOperationListener;
import
org.wso2.carbon.cloud.tenantdeletion.listeners.UserStoreConfgurationContextObserver;
import org.wso2.carbon.registry.core.service.RegistryService;
import org.wso2.carbon.registry.core.service.TenantRegistryLoader;
import org.wso2.carbon.user.core.listener.UserOperationEventListener;
import org.wso2.carbon.user.core.service.RealmService;
import org.wso2.carbon.utils.Axis2ConfigurationContextObserver;
*import
org.wso2.carbon.appfactory.tenant.mgt.service.TenantManagementService;*

/**
 * @scr.component name="wso2.carbon.cloud.tenantdeletion" immediate="true"
 * @scr.reference name="realm.service"
 * interface="org.wso2.carbon.user.core.service.RealmService"
cardinality="1..1"
 * policy="dynamic" bind="setRealmService" unbind="unsetRealmService"
 * @scr.reference name="registry.service"
 * interface="org.wso2.carbon.registry.core.service.RegistryService"
cardinality="1..1"
 * policy="dynamic" bind="setRegistryService" unbind="unsetRegistryService
 * @scr.reference name="tenant.registryloader"
 * interface="org.wso2.carbon.registry.core.service.TenantRegistryLoader"
cardinality="1..1"
 * policy="dynamic" bind="setTenantRegistryLoader"
unbind="unsetTenantRegistryLoader"


* * @scr.reference name="tenant.tenantManagementService" *
interface="org.wso2.carbon.appfactory.tenant.mgt.service.TenantManagementService"
cardinality="0..1" * policy="dynamic" bind="setTenantManagementService"
unbind="unsetTenantManagementService"*
 */

public class TenantDeletionServiceComponent {
   private final static Log logger =
LogFactory.getLog(TenantDeletionServiceComponent.class);
   private ServiceRegistration userOperationEventListenerRef;
   private ServiceRegistration contextObserverRef;

   /**
* Method to activate bundle.
* @param context OSGi component context.
*/
   protected void activate(ComponentContext context) {
  BundleContext bundleContext = context.getBundleContext();
  try {
 CloudUserOperationListener cloudUserOperationListener = new
CloudUserOperationListener();
 UserStoreConfgurationContextObserver
userStoreConfgurationContextObserver = new
   UserStoreConfgurationContextObserver();
 this.userOperationEventListenerRef =
bundleContext.registerService(UserOperationEventListener.class
   .getName(),
   cloudUserOperationListener, null);
 this.contextObserverRef =
bundleContext.registerService(Axis2ConfigurationContextObserver.class.getName(),
   userStoreConfgurationContextObserver, null);
  } catch (Exception e) {
 logger.error("Failed to activate the Tenant Deletion service.", e);
  }
  if (logger.isDebugEnabled()) {
 logger.debug("Tenant Deletionservice component activated
successfully.");
  }
  StartDeletor.getInstance().startDeletion();
   }

   /**
* Method to deactivate bundle.
* @param context OSGi component context.
*/
   protected void deactivate(ComponentContext context) {
  this.userOperationEventListenerRef.unregister();
  this.contextObserverRef.unregister();
  if (logger.isDebugEnabled()) {
 logger.debug("Tenant Deletionservice component is deactivated ");
  }
   }

   /**
* Method to set registry service.
* @param registryService service to get tenant data.
*/
   protected void setRegistryService(RegistryService registryService) {
  if (logger.isDebugEnabled()) {
 logger.debug("Setting RegistryService.");
  }
  ServiceHolder.getInstance().setRegistryService(registryService);
   }

   /**
* Method to unset registry service.
* @param registryService service to get registry data.
*/
   protected void unsetRegistryService(RegistryService registryService) {
  if (logger.isDebugEnabled()) {
 logger.debug("Unset Registry service.");
  }
  ServiceHolder.getInstance().setRegistryService(null);
   }

   /**
* Method to set realm service.
* @param realmService service to get tenant data.
*/
   protected void setRealmService(RealmService realmService) {
  ServiceHolder.getInstance().setRealmService(realmService);
  if (logger.isDebugEnabled()) {
 logger.debug("Realm service initialized");
  }
   }

   

Re: [Dev] Issue activating osgi component with the service component reference

2016-01-25 Thread Firzhan Naqash
Sorry I meant maven-scr-plugin.

Regards,
Firzhan


-- 
*Firzhan Naqash*
Senior Software Engineer - Integration Platform Team
WSO2 Inc. http://wso2.com

email: firz...@wso2.com
mobile: (+94) 77 9785674 <%28%2B94%29%2071%205247551>*|
blog: http://firzhanblogger.blogspot.com/
  *
*twitter: https://twitter.com/firzhan007  |
linked-in: **https://www.linkedin.com/in/firzhan
*

On Tue, Jan 26, 2016 at 9:53 AM, Firzhan Naqash  wrote:

> Hi Nipuna,
>
> I guess you have not added themaven-bundle-plugin plugin dependency in
> your pom file. [1]
>
>
> [1]
> https://github.com/wso2/carbon-business-process/blob/master/components/bpmn/org.wso2.carbon.bpmn.analytics.publisher/pom.xml
>
>
>
> Regards,
> Firzhan
>
>
> --
> *Firzhan Naqash*
> Senior Software Engineer - Integration Platform Team
> WSO2 Inc. http://wso2.com
>
> email: firz...@wso2.com
> mobile: (+94) 77 9785674 <%28%2B94%29%2071%205247551>*|
> blog: http://firzhanblogger.blogspot.com/
>   *
> *twitter: https://twitter.com/firzhan007
>  | linked-in: 
> **https://www.linkedin.com/in/firzhan
> *
>
> On Tue, Jan 26, 2016 at 9:37 AM, Nipuna Prashan  wrote:
>
>> Hidanushka,
>>
>> Yes I checked debugging. No it is not hitting active method when I add
>> following reference
>>
>> * @scr.reference name="tenant.tenantManagementService"
>> *
>> interface="org.wso2.carbon.appfactory.tenant.mgt.service.TenantManagementService"
>> cardinality="0..1"
>> * policy="dynamic" bind="*setTenantManagementService*" unbind="
>> *unsetTenantManagementService*"
>>
>> Service Component Class
>>
>>
>> import org.apache.commons.logging.Log;
>> import org.apache.commons.logging.LogFactory;
>> import org.osgi.framework.BundleContext;
>> import org.osgi.framework.ServiceRegistration;
>> import org.osgi.service.component.ComponentContext;
>> import org.wso2.carbon.cloud.tenantdeletion.StartDeletor;
>> import
>> org.wso2.carbon.cloud.tenantdeletion.listeners.CloudUserOperationListener;
>> import
>> org.wso2.carbon.cloud.tenantdeletion.listeners.UserStoreConfgurationContextObserver;
>> import org.wso2.carbon.registry.core.service.RegistryService;
>> import org.wso2.carbon.registry.core.service.TenantRegistryLoader;
>> import org.wso2.carbon.user.core.listener.UserOperationEventListener;
>> import org.wso2.carbon.user.core.service.RealmService;
>> import org.wso2.carbon.utils.Axis2ConfigurationContextObserver;
>> *import
>> org.wso2.carbon.appfactory.tenant.mgt.service.TenantManagementService;*
>>
>> /**
>>  * @scr.component name="wso2.carbon.cloud.tenantdeletion" immediate="true"
>>  * @scr.reference name="realm.service"
>>  * interface="org.wso2.carbon.user.core.service.RealmService"
>> cardinality="1..1"
>>  * policy="dynamic" bind="setRealmService" unbind="unsetRealmService"
>>  * @scr.reference name="registry.service"
>>  * interface="org.wso2.carbon.registry.core.service.RegistryService"
>> cardinality="1..1"
>>  * policy="dynamic" bind="setRegistryService" unbind="unsetRegistryService
>>  * @scr.reference name="tenant.registryloader"
>>  * interface="org.wso2.carbon.registry.core.service.TenantRegistryLoader"
>> cardinality="1..1"
>>  * policy="dynamic" bind="setTenantRegistryLoader"
>> unbind="unsetTenantRegistryLoader"
>>
>>
>> * * @scr.reference name="tenant.tenantManagementService" *
>> interface="org.wso2.carbon.appfactory.tenant.mgt.service.TenantManagementService"
>> cardinality="0..1" * policy="dynamic" bind="setTenantManagementService"
>> unbind="unsetTenantManagementService"*
>>  */
>>
>> public class TenantDeletionServiceComponent {
>>private final static Log logger =
>> LogFactory.getLog(TenantDeletionServiceComponent.class);
>>private ServiceRegistration userOperationEventListenerRef;
>>private ServiceRegistration contextObserverRef;
>>
>>/**
>> * Method to activate bundle.
>> * @param context OSGi component context.
>> */
>>protected void activate(ComponentContext context) {
>>   BundleContext bundleContext = context.getBundleContext();
>>   try {
>>  CloudUserOperationListener cloudUserOperationListener = new
>> CloudUserOperationListener();
>>  UserStoreConfgurationContextObserver
>> userStoreConfgurationContextObserver = new
>>UserStoreConfgurationContextObserver();
>>  this.userOperationEventListenerRef =
>> bundleContext.registerService(UserOperationEventListener.class
>>.getName(),
>>cloudUserOperationListener, null);
>>  this.contextObserverRef =
>> bundleContext.registerService(Axis2ConfigurationContextObserver.class.getName(),
>>userStoreConfgurationContextObserver, null);
>>   } catch (Exception e) {
>>  

Re: [Dev] Latency Calculation Feature in WSO2 GW

2016-01-25 Thread Chamil Elladeniya
Hi all,

Currently I'm tasked with implementing latency metrics calculation feature
according to the proposed architecture [1]. So far I have integrated
carbon-metrics and working on load testing to check if there is any
performance degradation of GW.

[1] [Architecture] Implementing Latency Metrics Calculation Feature in GW

Thank you!

On Thu, Dec 17, 2015 at 10:46 AM, Viraj Senevirathne 
wrote:

> Hi All,
>
> In ESB 4.10.0 we are introducing new statistic feature which lets user
> drill down service level statistics.
>
> So for higher level statistics we can include,
>
>- Avg,Min, Maximum Mediation times for each service
>- Statistics of each endpoints
>- Allow users to enable and disable statistics for each components
>- Faults encounters while mediation for each service
>
> These are some extra parameters that exists in current transport latency
> parameters. I think it would be better to incorporate following parameters
> too.
>
>- Parameters
>- Messages Received.
>- Requests received.
>- Responses sent
>- Fault in Receiving
>- Faults in Sending
>- Min, Max, Avg  message size sent
>- Min, Max, Avg  message size received
>- Bytes Received
>- Bytes received
>- Timeouts in Receiving
>- Timeouts in Sending
>- Active Thread Count
>- Last Reset Time
>- Statistics Views for Daily, Hourly, by minutes ( This may be
>optional)
>
>
> *Operations*
>
>- Reset Statistics
>
>
> Thank You,
>
> On Thu, Dec 17, 2015 at 10:20 AM, Kasun Indrasiri  wrote:
>
>> We may also need a bit of high level stats too.. For instance things we
>> have included in ESB 4.10.
>>
>> On Thu, Dec 17, 2015 at 10:17 AM, Nadeeshaan Gunasinghe <
>> nadeesh...@wso2.com> wrote:
>>
>>> Hi all,
>>> It has been a requirement to implement a feature for keeping track of
>>> the various types of latency metrics in WSO2 GW. At the moment I am
>>> involved in implementing this latency metrics calculation feature according
>>> to the architecture proposed at [1].
>>> As the first step I am capturing the raw data required for calculating
>>> various latency values. These raw data being collected as follows at the
>>> moment,
>>>
>>> *Server Side*
>>>
>>>- Source Connection Creation time
>>>- Source Connection life time
>>>- Request header read time
>>>- Request body read time
>>>- Request read time
>>>
>>>
>>> *Client Side*
>>>
>>>- Client connection creation time
>>>- Client Connection life time
>>>- Response header read time
>>>- Response body read time
>>>- Response read time
>>>
>>>
>>> I am going to keep track of these raw data and then transport these data
>>> through the carbon message, as the initial step. Then a latency calculation
>>> engine is going to be implemented to calculate the various types of latency
>>> values such as,
>>>
>>>- Average Throughput of a connection
>>>- Average Latency of a connection
>>>- Average jitter of a connection
>>>- Message build time
>>>- Message encoding time
>>>- Message mediation time
>>>- etc
>>>
>>> Then a data publisher component is going to be implemented for
>>> publishing data to  JMX and DAS.
>>>
>>> During the implementation additional raw data will be needed to be
>>> captured according to the type of metrics we are going to calculate. In
>>> such situation, will update with the latest status and findings.
>>>
>>> [1] [Architecture] Implementing Latency Metrics Calculation Feature in
>>> GW
>>>
>>> Regards
>>>
>>> *Nadeeshaan Gunasinghe*
>>> Software Engineer, WSO2 Inc. http://wso2.com
>>> +94770596754 | nadeesh...@wso2.com | Skype: nadeeshaan.gunasinghe
>>> <#1663256302_151ae46f9e826311_151ae43483a6d1f0_>
>>> 
>>>   
>>> 
>>> Get a signature like this: Click here!
>>> 
>>>
>>
>>
>>
>> --
>> Kasun Indrasiri
>> Software Architect
>> WSO2, Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> cell: +94 77 556 5206
>> Blog : http://kasunpanorama.blogspot.com/
>>
>
>
>
> --
> Viraj Senevirathne
> Software Engineer; WSO2, Inc.
>
> Mobile : +94 71 958 0269
> Email : vir...@wso2.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Chamil Elladeniya
*Software Engineering **Intern*
Mobile : +94 71 6181154 <%2B94%20%280%29%20773%20451194>
cham...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Issue activating osgi component with the service component reference

2016-01-25 Thread Firzhan Naqash
Hi Nipuna,

I guess you have not added themaven-bundle-plugin plugin dependency in your
pom file. [1]


[1]
https://github.com/wso2/carbon-business-process/blob/master/components/bpmn/org.wso2.carbon.bpmn.analytics.publisher/pom.xml



Regards,
Firzhan


-- 
*Firzhan Naqash*
Senior Software Engineer - Integration Platform Team
WSO2 Inc. http://wso2.com

email: firz...@wso2.com
mobile: (+94) 77 9785674 <%28%2B94%29%2071%205247551>*|
blog: http://firzhanblogger.blogspot.com/
  *
*twitter: https://twitter.com/firzhan007  |
linked-in: **https://www.linkedin.com/in/firzhan
*

On Tue, Jan 26, 2016 at 9:37 AM, Nipuna Prashan  wrote:

> Hidanushka,
>
> Yes I checked debugging. No it is not hitting active method when I add
> following reference
>
> * @scr.reference name="tenant.tenantManagementService"
> *
> interface="org.wso2.carbon.appfactory.tenant.mgt.service.TenantManagementService"
> cardinality="0..1"
> * policy="dynamic" bind="*setTenantManagementService*" unbind="
> *unsetTenantManagementService*"
>
> Service Component Class
>
>
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> import org.osgi.framework.BundleContext;
> import org.osgi.framework.ServiceRegistration;
> import org.osgi.service.component.ComponentContext;
> import org.wso2.carbon.cloud.tenantdeletion.StartDeletor;
> import
> org.wso2.carbon.cloud.tenantdeletion.listeners.CloudUserOperationListener;
> import
> org.wso2.carbon.cloud.tenantdeletion.listeners.UserStoreConfgurationContextObserver;
> import org.wso2.carbon.registry.core.service.RegistryService;
> import org.wso2.carbon.registry.core.service.TenantRegistryLoader;
> import org.wso2.carbon.user.core.listener.UserOperationEventListener;
> import org.wso2.carbon.user.core.service.RealmService;
> import org.wso2.carbon.utils.Axis2ConfigurationContextObserver;
> *import
> org.wso2.carbon.appfactory.tenant.mgt.service.TenantManagementService;*
>
> /**
>  * @scr.component name="wso2.carbon.cloud.tenantdeletion" immediate="true"
>  * @scr.reference name="realm.service"
>  * interface="org.wso2.carbon.user.core.service.RealmService"
> cardinality="1..1"
>  * policy="dynamic" bind="setRealmService" unbind="unsetRealmService"
>  * @scr.reference name="registry.service"
>  * interface="org.wso2.carbon.registry.core.service.RegistryService"
> cardinality="1..1"
>  * policy="dynamic" bind="setRegistryService" unbind="unsetRegistryService
>  * @scr.reference name="tenant.registryloader"
>  * interface="org.wso2.carbon.registry.core.service.TenantRegistryLoader"
> cardinality="1..1"
>  * policy="dynamic" bind="setTenantRegistryLoader"
> unbind="unsetTenantRegistryLoader"
>
>
> * * @scr.reference name="tenant.tenantManagementService" *
> interface="org.wso2.carbon.appfactory.tenant.mgt.service.TenantManagementService"
> cardinality="0..1" * policy="dynamic" bind="setTenantManagementService"
> unbind="unsetTenantManagementService"*
>  */
>
> public class TenantDeletionServiceComponent {
>private final static Log logger =
> LogFactory.getLog(TenantDeletionServiceComponent.class);
>private ServiceRegistration userOperationEventListenerRef;
>private ServiceRegistration contextObserverRef;
>
>/**
> * Method to activate bundle.
> * @param context OSGi component context.
> */
>protected void activate(ComponentContext context) {
>   BundleContext bundleContext = context.getBundleContext();
>   try {
>  CloudUserOperationListener cloudUserOperationListener = new
> CloudUserOperationListener();
>  UserStoreConfgurationContextObserver
> userStoreConfgurationContextObserver = new
>UserStoreConfgurationContextObserver();
>  this.userOperationEventListenerRef =
> bundleContext.registerService(UserOperationEventListener.class
>.getName(),
>cloudUserOperationListener, null);
>  this.contextObserverRef =
> bundleContext.registerService(Axis2ConfigurationContextObserver.class.getName(),
>userStoreConfgurationContextObserver, null);
>   } catch (Exception e) {
>  logger.error("Failed to activate the Tenant Deletion service.",
> e);
>   }
>   if (logger.isDebugEnabled()) {
>  logger.debug("Tenant Deletionservice component activated
> successfully.");
>   }
>   StartDeletor.getInstance().startDeletion();
>}
>
>/**
> * Method to deactivate bundle.
> * @param context OSGi component context.
> */
>protected void deactivate(ComponentContext context) {
>   this.userOperationEventListenerRef.unregister();
>   this.contextObserverRef.unregister();
>   if (logger.isDebugEnabled()) {
>  logger.debug("Tenant Deletionservice component is deactivated ");
>   }
>}
>
>/**
> * Method to set registry service.
>   

Re: [Dev] Evaluating the possibility of applying Goldmansachs ConcurrentHashMap in MB

2016-01-25 Thread Ramith Jayasinghe
Hi Malaka,
 lets report these findings on architecture group as a investigation we did.
regards
Ramtih

On Tue, Jan 26, 2016 at 8:16 AM, Malaka Gangananda  wrote:

> Hi,
>
> While profiling the MB we found out that there is a performance bottle
> neck in using util.ConcurrentSkipListMap. Because every time size call is
> made it has to loop through the data structure so it takes O(n) time. But
> looking at GC ConcurrentHashMap we found out that it only takes constant
> time (O(1) time) to make the size call.Other operations on GC
> ConcurrentHashMap are also faster than uti.ConcurrentSkipListMap.
>
> Here I have attached JMH Benchmark results which acquired by testing
> util.ConcurrentSkipListMap vs GC ConcurrentHashMap
>
> ​​​
>  ConcurrentSkipListMap Vs Goldmansachs Concurre...
> 
> ​
>
> Malaka Gangananda
> Software Engineer Intern
> mobile:0713564340
> mala...@wso2.com
> 
>



-- 
Ramith Jayasinghe
Technical Lead
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

E: ram...@wso2.com
P: +94 777542851
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Request the PRs to be merged (analytics-common & event-processing repos)

2016-01-25 Thread Ruwan Yatawara
Hi Team,

Ran in to a few OSGI issues again whilst packing DAS components in IoTS and
did some fixes. Can we get the below PRs ([1] & [2]) merged to the
respective Repos and get them released?

There is another fix that need to go in to carbon-analytics. But in order
to add that fix, the following two repos need to be released as they are
inter-dependent.

[1] - https://github.com/wso2/carbon-event-processing/pull/197
[2] - https://github.com/wso2/carbon-analytics-common/pull/174

Thanks and Regards,

Ruwan Yatawara

Senior Software Engineer,
WSO2 Inc.

email : ruw...@wso2.com
mobile : +94 77 9110413
blog : http://ruwansrants.blogspot.com/
www: :http://wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Issue activating osgi component with the service component reference

2016-01-25 Thread Nipuna Prashan
Hi sameera,

yes, service component is also active


On Mon, Jan 25, 2016 at 5:29 PM, Sameera Jayasoma  wrote:

> Just to be clear, I need service component activation status, not the
> bundle status.
>
> On Mon, Jan 25, 2016 at 5:09 PM, Sameera Jayasoma 
> wrote:
>
>> Can you check whether your service component is activated? You can type
>> the "ls" command.
>>
>>
>>
>> On Mon, Jan 25, 2016 at 4:56 PM, Nipuna Prashan  wrote:
>>
>>> Hi all,
>>>
>>> I am writing an osgi component. This same component wants to be
>>> deployed in both Appfactory and APIManager servers. Here, I have
>>> imported some of the appfactory packages such as
>>> org.wso2.carbon.appfactory.application.mgt.* which will not be
>>> resolved in APIM 1.9.1.
>>> Then I used ;resolution:=optional in the pom file for those packages
>>> and I set service component reference cardinality to "0..1"
>>>
>>> @scr.reference name="application.applicationInfoService"
>>>
>>> interface="org.wso2.carbon.appfactory.application.mgt.service.ApplicationInfoService"
>>> cardinality="0..1"
>>> policy="dynamic" bind="setApplicationInfoService"
>>> unbind="unsetApplicationInfoService"
>>>
>>> When I start the server(APIM 1.9.1) the log that gets printed when the
>>> component gets activated is not printed implying it has not been
>>> activated, but osgi console says that the bundle has activated.
>>>
>>> What would be the problem? Any suggestions would be appreciated.
>>>
>>> --
>>> Nipuna Prashan
>>> Software Engineering Intern
>>> +94711852792
>>>
>>
>>
>>
>> --
>> Sameera Jayasoma,
>> Software Architect,
>>
>> WSO2, Inc. (http://wso2.com)
>> email: same...@wso2.com
>> blog: http://blog.sameera.org
>> twitter: https://twitter.com/sameerajayasoma
>> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
>> Mobile: 0094776364456
>>
>> Lean . Enterprise . Middleware
>>
>>
>
>
> --
> Sameera Jayasoma,
> Software Architect,
>
> WSO2, Inc. (http://wso2.com)
> email: same...@wso2.com
> blog: http://blog.sameera.org
> twitter: https://twitter.com/sameerajayasoma
> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
> Mobile: 0094776364456
>
> Lean . Enterprise . Middleware
>
>


-- 
*Nipuna Prashan*
Software Engineering Intern
+94711852792
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Generating OAuth token without using WSO2 API Manager?

2016-01-25 Thread Malintha Amarasinghe
Hi Anraari,

According to the documentation [1,2] Greg 5.0.0 and 5.1.0 supports Basic
Authentication. Looks like you are referring to 4.6.0 version of Greg,
please check.

Thanks.
[1] https://docs.wso2.com/display/Governance500/Resources+with+REST+API
[2] https://docs.wso2.com/display/Governance510/Resources+with+REST+API


On Mon, Jan 25, 2016 at 6:48 PM, Anvaari Mohsen <
mohsen.anva...@trondheim.kommune.no> wrote:

> Hi,
>
>
>
> I am trying to invoke registry Rest API of WSO GREG. A part of the request
> is of course the auth and I need to generate an OAuth access token. In GREG
> documentation it is written
> 
> that I should use API manager to generate the access token. Is there any
> way to generate token without using API manager? I want to use only GREG in
> my integration platform. Is there any solution to do it without installing
> API mgr?
>
>
>
> Regards,
>
> Mohsen
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Malintha Amarasinghe
Software Engineer
*WSO2, Inc. - lean | enterprise | middleware*
http://wso2.com/

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


[Dev] Generating OAuth token without using WSO2 API Manager?

2016-01-25 Thread Anvaari Mohsen
Hi,

I am trying to invoke registry Rest API of WSO GREG. A part of the request is 
of course the auth and I need to generate an OAuth access token. In GREG 
documentation it is 
written
 that I should use API manager to generate the access token. Is there any way 
to generate token without using API manager? I want to use only GREG in my 
integration platform. Is there any solution to do it without installing API mgr?

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


[Dev] SCIM PUT/PATCH group with members in order to add a new member

2016-01-25 Thread Xavier Pegenaute M2M

Hi again,

first, thanks a lot for your previous answers. This time I had some 
problem updating a group when it has already some member. My steps are 
shown below:


*1) Create a first user*
curl -k --user admin:admin --data 
"{"schemas":[],"name":{"familyName":"John","givenName":"Doe"},"userName":'groupUSR001',"password":"testPwd123"}" 
--header "Content-Type:application/json" 
https://localhost:9443/wso2/scim/Users


{"id":"9b0585d0-646e-4eee-9d8a-342203540510","schemas":["urn:scim:schemas:core:1.0"],"name":{"familyName":"John","givenName":"Doe"},"userName":"groupUSR001","meta": 
{"lastModified":"2016-01-25T08:50:55","location":"https://localhost:9443/wso2/scim/Users/9b0585d0-646e-4eee-9d8a-342203540510","created":"2016-01-25T08:50:55"}}


*2) Create a group with a member*
curl -k --user admin:admin --data "{"displayName": 'ngioletGR', 
"members": [{"value": "9b0585d0-646e-4eee-9d8a-342203540510", "display": 
"groupUSR001"}]}" --header "Content-Type:application/json" 
https://localhost:9443/wso2/scim/Groups


{"id":"1b97b894-5cbe-4b39-b6ce-9606debc5a28","schemas":["urn:scim:schemas:core:1.0"],"displayName":"PRIMARY/ngioletGR","members":[{"value":"9b0585d0-646e-4eee-9d8a-342203540510","display":"groupUSR001"}],"meta":{"lastModified":"2016-01-25T08:59:49","created":"2016-01-25T08:59:49","location":"https://localhost:9443/wso2/scim/Groups/1b97b894-5cbe-4b39-b6ce-9606debc5a28"}}

*3) Create a second user*
curl -k --user admin:admin --data "{"displayName": 'ngioletGR2', 
"members": [{"value": "9b0585d0-646e-4eee-9d8a-342203540510", "display": 
"groupUSR001"}]}" --header "Content-Type:application/json" 
https://localhost:9443/wso2/scim/Groups


{"id":"1b97b894-5cbe-4b39-b6ce-9606debc5a28","schemas":["urn:scim:schemas:core:1.0"],"displayName":"PRIMARY/ngioletGR2","members":[{"value":"9b0585d0-646e-4eee-9d8a-342203540510","display":"groupUSR001"}],"meta":{"lastModified":"2016-01-25T08:59:49","created":"2016-01-25T08:59:49","location":"https://localhost:9443/wso2/scim/Groups/1b97b894-5cbe-4b39-b6ce-9606debc5a28"}}


*3a) PATCH group to add the last user*
curl -k -X PATCH --user admin:admin --data "{"displayName": 'ngioletGR', 
"members": [{"value": "9b0585d0-646e-4eee-9d8a-342203540510", "display": 
"groupUSR001"}, {"value": "1b97b894-5cbe-4b39-b6ce-9606debc5a28", 
"display": "groupUSR002"}]}" --header "Content-Type:application/json" 
https://localhost:9443/wso2/scim/Groups/1b97b894-5cbe-4b39-b6ce-9606debc5a28


_{"Errors":[{"description":"User: 1b97b894-5cbe-4b39-b6ce-9606debc5a28 
doesn't exist in the user store. Hence, can not update the group: 
ngioletGR","code":"500"}]}_


*3b) PUT group **to add the last user*
curl -k -X PUT --user admin:admin --data "{"displayName": 'ngioletGR', 
"members": [{"value": "9b0585d0-646e-4eee-9d8a-342203540510", "display": 
"groupUSR001"}, {"value": "1b97b894-5cbe-4b39-b6ce-9606debc5a28", 
"display": "groupUSR002"}]}" --header "Content-Type:application/json" 
https://localhost:9443/wso2/scim/Groups/1b97b894-5cbe-4b39-b6ce-9606debc5a28


_{"Errors":[{"description":"Error occurred while updating old group : 
PRIMARY/ngioletGR","code":"500"}]}_



Am I wrong in some step?, I am using IS 5.1

Best regards,
Xavi

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


[Dev] IoTServer taking much longer time to start

2016-01-25 Thread Charitha Goonetilleke
Hi all,

When we are doing developments with IoTServer, we realized that, IoTServer
takes some time to start from wso2server.sh script. Usually it takes nearly
120 seconds. I think it is much more higher than our other products. By the
way when analyzing the server logs, I found that, there is a time gap
between 1st INFO level log and last output from the startup shell script.
It is nearly around 1 minute.

WDYT about this? Is there any work around to fix this issue?

*[charitha@charithag-wso2 bin]$ ./wso2server.sh*
*JAVA_HOME environment variable is set to /usr/java/jdk1.7.0_79*
*CARBON_HOME environment variable is set to
/home/charitha/git/EMM-Merge/product-iot-server/modules/distribution/target/wso2iots-1.0.0-SNAPSHOT*

*[2016-01-25 22:31:37,285]  INFO
{org.wso2.andes.wso2.internal.QpidBundleActivator} -  Setting BundleContext
in PluginManager*
*[2016-01-25 22:31:39,747]  INFO
{org.wso2.carbon.appmgt.impl.internal.AppDiscoveryComponent} -  WebApp
Discovery component activated*
*[2016-01-25 22:31:39,772]  INFO
{org.wso2.carbon.appmgt.mobile.internal.AppManagerMobileComponent} -
 WSO2EMM MDM is bound to App Manager*
*[2016-01-25 22:31:39,772]  INFO
{org.wso2.carbon.appmgt.mobile.internal.AppManagerMobileComponent} -  App
Manger Mobile Component activated*
*[2016-01-25 22:31:39,846]  INFO
{org.wso2.carbon.core.internal.CarbonCoreActivator} -  Starting WSO2
Carbon...*
*[2016-01-25 22:31:39,846]  INFO
{org.wso2.carbon.core.internal.CarbonCoreActivator} -  Operating System :
Linux 4.3.3-300.fc23.x86_64, amd64*
*[2016-01-25 22:31:39,847]  INFO
{org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Home:
/usr/java/jdk1.7.0_79/jre*
*[2016-01-25 22:31:39,847]  INFO
{org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Version :
1.7.0_79*
*[2016-01-25 22:31:39,847]  INFO
{org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java VM  :
Java HotSpot(TM) 64-Bit Server VM 24.79-b02,Oracle Corporation*
*[2016-01-25 22:31:39,847]  INFO
{org.wso2.carbon.core.internal.CarbonCoreActivator} -  Carbon Home  :
/home/charitha/git/EMM-Merge/product-iot-server/modules/distribution/target/wso2iots-1.0.0-SNAPSHOT*
*[2016-01-25 22:31:39,847]  INFO
{org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Temp Dir:
/home/charitha/git/EMM-Merge/product-iot-server/modules/distribution/target/wso2iots-1.0.0-SNAPSHOT/tmp*
*[2016-01-25 22:31:39,847]  INFO
{org.wso2.carbon.core.internal.CarbonCoreActivator} -  User :
charitha, en-US, Asia/Colombo*
*[2016-01-25 22:31:40,122]  INFO
{org.wso2.carbon.event.output.adapter.kafka.internal.ds.KafkaEventAdapterServiceDS}
-  Successfully deployed the Kafka output event adaptor service*
*[2016-01-25 22:31:40,404]  INFO
{org.wso2.carbon.identity.authenticator.backend.oauth.internal.OauthAuthenticatorServiceComponent}
-  Initiating*
*Activating org.wso2.jaggery.scxml with RealmService enabled*
*...*
*...*
*...*
*[2016-01-25 22:32:39,155]  INFO
{org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  Server
  :  WSO2 IoT Server-1.0.0-SNAPSHOT*
*[2016-01-25 22:32:39,156]  INFO
{org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  WSO2
Carbon started in 119 sec*


Thanks & Regards,
/charithag

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

mobile: +94 77 751 3669 <%2B94777513669>
Twitter:@CharithaWs , fb: charithag
, linkedin: charithag

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


Re: [Dev] Issue activating osgi component with the service component reference

2016-01-25 Thread Danushka Fernando
Have you checked debugging? Is it hitting the activate method. And the
activated service component, does it same as your scr reference name?

Can you attach the service component code? May be its not hitting the
service component class.

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

On Mon, Jan 25, 2016 at 12:44 PM, Nipuna Prashan  wrote:

> Hi sameera,
>
> yes, service component is also active
>
>
> On Mon, Jan 25, 2016 at 5:29 PM, Sameera Jayasoma 
> wrote:
>
>> Just to be clear, I need service component activation status, not the
>> bundle status.
>>
>> On Mon, Jan 25, 2016 at 5:09 PM, Sameera Jayasoma 
>> wrote:
>>
>>> Can you check whether your service component is activated? You can type
>>> the "ls" command.
>>>
>>>
>>>
>>> On Mon, Jan 25, 2016 at 4:56 PM, Nipuna Prashan 
>>> wrote:
>>>
 Hi all,

 I am writing an osgi component. This same component wants to be
 deployed in both Appfactory and APIManager servers. Here, I have
 imported some of the appfactory packages such as
 org.wso2.carbon.appfactory.application.mgt.* which will not be
 resolved in APIM 1.9.1.
 Then I used ;resolution:=optional in the pom file for those packages
 and I set service component reference cardinality to "0..1"

 @scr.reference name="application.applicationInfoService"

 interface="org.wso2.carbon.appfactory.application.mgt.service.ApplicationInfoService"
 cardinality="0..1"
 policy="dynamic" bind="setApplicationInfoService"
 unbind="unsetApplicationInfoService"

 When I start the server(APIM 1.9.1) the log that gets printed when the
 component gets activated is not printed implying it has not been
 activated, but osgi console says that the bundle has activated.

 What would be the problem? Any suggestions would be appreciated.

 --
 Nipuna Prashan
 Software Engineering Intern
 +94711852792

>>>
>>>
>>>
>>> --
>>> Sameera Jayasoma,
>>> Software Architect,
>>>
>>> WSO2, Inc. (http://wso2.com)
>>> email: same...@wso2.com
>>> blog: http://blog.sameera.org
>>> twitter: https://twitter.com/sameerajayasoma
>>> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
>>> Mobile: 0094776364456
>>>
>>> Lean . Enterprise . Middleware
>>>
>>>
>>
>>
>> --
>> Sameera Jayasoma,
>> Software Architect,
>>
>> WSO2, Inc. (http://wso2.com)
>> email: same...@wso2.com
>> blog: http://blog.sameera.org
>> twitter: https://twitter.com/sameerajayasoma
>> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
>> Mobile: 0094776364456
>>
>> Lean . Enterprise . Middleware
>>
>>
>
>
> --
> *Nipuna Prashan*
> Software Engineering Intern
> +94711852792
>
> ___
> 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] [DAS] Spark clustering and DAS analytics cluster tuning

2016-01-25 Thread Niranda Perera
Hi,

I added 2 blog posts explaining how Spark clustering works [1] and how to
manage the resources in a DAS analytics cluster [2].

@Rukshani, some of the content should go to this doc [3]. Can we work on
that?

Best

[1]
https://pythagoreanscript.wordpress.com/2016/01/23/the-dynamics-of-a-spark-cluster-wrt-wso2-das/
[2]
https://pythagoreanscript.wordpress.com/2016/01/25/wso2-das-spark-cluster-tuning/
[3] https://docs.wso2.com/display/DAS301/Performance+Tuning

-- 
*Niranda Perera*
Software Engineer, WSO2 Inc.
Mobile: +94-71-554-8430
Twitter: @n1r44 
https://pythagoreanscript.wordpress.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [ESB] What is usage of OAuth Mediator

2016-01-25 Thread Abimaran Kugathasan
Hi,

What is the usage of OAuth Mediator [1]? What we can achive with this
mediator than with a custom OAuth Handler with Identity Server?

[1] : https://docs.wso2.com/display/ESB490/OAuth+Mediator

-- 
Thanks
Abimaran Kugathasan

Software Engineer | WSO2 Inc
Data & APIs Technologies Team
Mobile : +94 773922820


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


[Dev] Orbit bundle for membrane-soa-model

2016-01-25 Thread Hasitha Aravinda
Hi Kernel team,

I have sent a PR [1] for $Subject. Could you please review and merge. ?

[1] - https://github.com/wso2/orbit/pull/168

Thanks,
Hasitha.

-- 
--
Hasitha Aravinda,
Senior Software Engineer,
WSO2 Inc.
Email: hasi...@wso2.com
Mobile : +94 718 210 200
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Orbit bundle for membrane-soa-model

2016-01-25 Thread Jayanga Dissanayake
Hi  Hasitha,

PR is merged.

Thanks,
Jayanga.

*Jayanga Dissanayake*
Senior Software Engineer
WSO2 Inc. - http://wso2.com/
lean . enterprise . middleware
email: jaya...@wso2.com
mobile: +94772207259

On Mon, Jan 25, 2016 at 1:30 PM, Hasitha Aravinda  wrote:

> Hi Kernel team,
>
> I have sent a PR [1] for $Subject. Could you please review and merge. ?
>
> [1] - https://github.com/wso2/orbit/pull/168
>
> Thanks,
> Hasitha.
>
> --
> --
> Hasitha Aravinda,
> Senior Software Engineer,
> WSO2 Inc.
> Email: hasi...@wso2.com
> Mobile : +94 718 210 200
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Unknown attachment in ESB documentation 4.9

2016-01-25 Thread Nisrin Sheriff
Hi Indrajith,

Thank you for reporting this.

This has been fixed. You should be able to view the attachment now.

Best Regards,
Nisrin

Nisrin Sheriff
Senior Technical Writer

*WSO2, Inc.*lean.enterprise.middleware.
mobile: +94 776 24 84 56
http://wso2.com

On Mon, Jan 25, 2016 at 11:36 AM, Indrajith Udayakumara  wrote:

> To the documentation team,
> Here in the following URL, I have found an unknown attachment under
> Testing the Proxy Service.
> https://docs.wso2.com/display/ESB490/Configure+with+IBM+WebSphere+MQ
>
> Thank you.
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] US Election 2016 Tweet Analyze System

2016-01-25 Thread Thusitha Kalugamage
Hi Yudhanjaya,

1) Yes we could, but since the Image is appended dynamically I used the
same property to create its background,
If we are to use a color, we would have to parse a color property as well.
@Dinali shall we do that?

2) Yes, Already added three tabs to ticker and moved "News" as one of three
tabs in the second row [1] 

[1] http://thusithak.github.io/twitter-analytics/

Regards,

On Mon, Jan 25, 2016 at 12:23 PM, Yudhanjaya Wijeratne 
wrote:

> Thanks Thusitha for the design. That looks clean!
> Small critique:
> 1) instead of having the candidate's image stretched out for the
> background in his profile square, can we use the color we use to represent
> him in the community graph?
> 2) Is it possible to have an 'article ticker' before the sentiment
> analysis box? We can feed the headlines in there.
>
> Best,
> Yudha
>
> On Sun, Jan 24, 2016 at 7:30 PM, Thusitha Kalugamage 
> wrote:
>
>> Hi All,
>>
>> As per discussions we had previously, I came up with a quick design and
>> worked on a markup. :)
>> you can have a look at the static page here [1]
>> .
>>
>> *DInali / Yasara*: Please clone this repo [2]
>> and start working on
>> this. I will help you get the integration done.
>>
>> *Yudhanjaya* / *Srinath*,  Let me know if we can improve on this.
>>
>> Please note that some of these images are copyrighted and must be revised
>> before publishing.
>>
>>
>> [1] http://thusithak.github.io/twitter-analytics/
>> [2] https://github.com/thusithak/twitter-analytics
>>
>>
>> Regards,
>>
>> On Thu, Dec 3, 2015 at 11:05 AM, Dakshika Jayathilaka 
>> wrote:
>>
>>> Sure, I'll join for brainstorming.
>>>
>>> Regards,
>>>
>>> *Dakshika Jayathilaka*
>>> PMC Member & Committer of Apache Stratos
>>> Senior Software Engineer
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>> 0771100911
>>>
>>> On Thu, Dec 3, 2015 at 11:02 AM, Srinath Perera 
>>> wrote:
>>>
 Hi Dakshika,

 Yudhanjaya will create some mock view and meet you to brainstorm and
 get feedback. Yudhanjaya, grab me or get me via a phone to the same
 discussion.

 Thanks
 Srinath



 On Wed, Dec 2, 2015 at 12:54 PM, Dakshika Jayathilaka <
 daksh...@wso2.com> wrote:

> Hi Srinath,
>
> Seems I missed this thread. Anyway shall we meet to build some good
> story + design concept.
>
> Regards,
>
> *Dakshika Jayathilaka*
> PMC Member & Committer of Apache Stratos
> Senior Software Engineer
> WSO2, Inc.
> lean.enterprise.middleware
> 0771100911
>
> On Wed, Dec 2, 2015 at 11:49 AM, Yasara Dissanayake 
> wrote:
>
>> Hi ,
>> Left Conner:
>> Top 3 election candidates are displayed on the top and big letters
>> and other candidates are displayed in left side bar. We can visit anyones
>> page and this is the Trump page.
>>
>> Middle:
>> Community Graph:
>> Here display the Trump's community graph(that nodes represent the
>> twitter account and also color of node indicates the different
>> candidates and color shade is use to indicate the number of tweets
>> produce by that account and sized of the node indicate the re tweet count
>> of the that account gets) is at the middle. dinali is  working on this.
>>
>> Re-tweet List
>> List of top tweets displayed below the community graph based on the
>> rank which directly proportion to the re-tweet count and inversely
>> proportion to the life time of that tweets.
>>
>> Right Conner:
>>
>> Result of positive and negative sentiment analysis result is
>> displayed below the photograph of owner of that page. Indent to display
>> result using graph. Yudhanjaya is  working on this.
>>
>> Below that display the owner's(here Trump's) unique hash tags which
>> based on the popular tweets(Please consider this hashTags are updated 
>> with
>> time).
>>
>> Doughnut graph is use to display the  current winning percentage of
>> that candidate compared to other candidates. Currently have only rough
>> draft to be implemented after machine learning part .
>>
>>
>>
>> @Nirmal thank you. Still we are integrating our parts and still
>> database is not completed yet. thank you for the correction it should be
>> sentiment analysis. Hashtags are based on the popular tweets at that 
>> time.
>> It change with the list of tweets which we are selected as most popular.
>> Sentiment analysis not integrate to the dashboard yet percentage for
>> Hillary Clinton is hard code value and we'll correct it.And upload the
>> revised version soon. Thank you for the comments.
>>
>> regards,
>> Yasara
>>
>> On Wed, 

Re: [Dev] [DEV][AS] Ideas and ways to integrate with Hot Swap Agent

2016-01-25 Thread Clovis Wichoski
Hi,

In mean time devs from HotSwapAgent replied my question on github, they
give another idea to create a plugin for WSO2 on Hot Swap Agent, I will try
that way too.

Here is the post: https://github.com/HotswapProjects/HotswapAgent/issues/107

Thanks

Clóvis



2016-01-25 9:16 GMT-02:00 Clovis Wichoski :

> Hi,
>
> Its very fine that have a fix, I will try and give you some feedback if
> that works.
>
> Thanks
>
> Clóvis
>
> 2016-01-25 4:52 GMT-02:00 Thusitha Thilina Dayaratne :
>
>> Hi,
>>
>> AFAIU we can easily fix this by adding a null check to webappCC in the
>> CarbonWebappClassLoader.getResource method as follows
>>
>> public Enumeration getResources(String name) throws IOException {
>> Enumeration[] tmp = new Enumeration[2];
>> if (parent != null && webappCC != null) { // add a null check to webappCC
>>
>> .
>>
>> WDYT?
>>
>>
>> Thanks
>>
>> Thusitha
>>
>>
>> On Mon, Jan 25, 2016 at 12:04 PM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi Clovis,
>>>
>>> I've checked on the error that you have mentioned.
>>> According to the hotswapagent logic 
>>> *org.hotswap.agent.plugin.tomcat.TomcatPlugin.init()
>>> *method get called during WebappLoader.start lifecycle event. But at
>>> the time STARTING event get fired we haven't set
>>> the  WebappClassloadingContext to the WebappClassloader. Therefore when it
>>> tries to do some checks in order to load the resources it throws the NPE.
>>>
>>> *org.wso2.carbon.webapp.mgt.loader.CarbonWebappLoader*
>>>
>>> @Override
>>> protected void startInternal() throws LifecycleException {
>>>
>>> ...
>>>
>>> super.startInternal();  > In this point STARTING even get fired and so 
>>> *TomcatPlugin.init * method get called and it try to get the resource. That 
>>> called getResources method and since we haven't still set the 
>>> webappClassloadingContext it throws a NPE.
>>>
>>>
>>> //Adding the WebappClassloadingContext to the WebappClassloader
>>>
>>> ((CarbonWebappClassLoader)
>>> getClassLoader()).setWebappCC(webappClassloadingContext); // This is
>>> the point where we are setting the webappClassloadingContext
>>>
>>> Thanks
>>> Thusitha
>>>
>>> On Fri, Jan 22, 2016 at 4:54 PM, Clovis Wichoski 
>>> wrote:
>>>
 Hi Kishanthan,

 The redeploy all of a small system its ok, but for a big one, its a
 problem, just a change in one class you must redeploy, loose sessions,
 restart the system from scratch, to reach the point of test again, with the
 ideas used by HotSwapAgent they act on reloading only that one class
 changed, this way speeds the development time, these ideas are well
 defended by JRebel tool, that HotSwapAgent tends to be a choice as an open
 source solution. Please note that this feature is only needed for
 development phase, in production, the scheduled task its ok.

 I mean time I tested with AS 5.3.0, JRebel and HotSwapAgent, JRebel
 trial worked as expected, but HotSwapAgent not (see exception bellow [1]),
 I will check these problems with HotSwapAgent devs, and try to discover why
 dont works with WSO2 AS as with HotSwapAgent active none of webapps load,
 all get that exception, as we see a NPE in class CarbonWebappClassLoader
 maybe its the way they initialize the dependent class loaders.

 [1] Exception when HotSwapAgent is active:
 [2016-01-22 09:14:18,467] ERROR
 {org.apache.catalina.core.ContainerBase} -  ContainerBase.addChild: start:
 org.apache.catalina.LifecycleException: Failed to start component
 [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/example]]
 at
 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
 at
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
 at
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
 at
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
 at
 org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:344)
 at
 org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:252)
 at
 org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment(TomcatGenericWebappsDeployer.java:314)
 at
 org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWarWebappDeployment(TomcatGenericWebappsDeployer.java:212)
 at
 org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleHotDeployment(TomcatGenericWebappsDeployer.java:179)
 at
 org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.deploy(TomcatGenericWebappsDeployer.java:144)
 at
 org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deployThisWebApp(AbstractWebappDeployer.java:224)
 at
 

[Dev] Issue activating osgi component with the service component reference

2016-01-25 Thread Nipuna Prashan
Hi all,

I am writing an osgi component. This same component wants to be
deployed in both Appfactory and APIManager servers. Here, I have
imported some of the appfactory packages such as
org.wso2.carbon.appfactory.application.mgt.* which will not be
resolved in APIM 1.9.1.
Then I used ;resolution:=optional in the pom file for those packages
and I set service component reference cardinality to "0..1"

@scr.reference name="application.applicationInfoService"
interface="org.wso2.carbon.appfactory.application.mgt.service.ApplicationInfoService"
cardinality="0..1"
policy="dynamic" bind="setApplicationInfoService"
unbind="unsetApplicationInfoService"

When I start the server(APIM 1.9.1) the log that gets printed when the
component gets activated is not printed implying it has not been
activated, but osgi console says that the bundle has activated.

What would be the problem? Any suggestions would be appreciated.

-- 
Nipuna Prashan
Software Engineering Intern
+94711852792
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][AS] Ideas and ways to integrate with Hot Swap Agent

2016-01-25 Thread Clovis Wichoski
Hi,

Its very fine that have a fix, I will try and give you some feedback if
that works.

Thanks

Clóvis

2016-01-25 4:52 GMT-02:00 Thusitha Thilina Dayaratne :

> Hi,
>
> AFAIU we can easily fix this by adding a null check to webappCC in the
> CarbonWebappClassLoader.getResource method as follows
>
> public Enumeration getResources(String name) throws IOException {
> Enumeration[] tmp = new Enumeration[2];
> if (parent != null && webappCC != null) { // add a null check to webappCC
>
> .
>
> WDYT?
>
>
> Thanks
>
> Thusitha
>
>
> On Mon, Jan 25, 2016 at 12:04 PM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Clovis,
>>
>> I've checked on the error that you have mentioned.
>> According to the hotswapagent logic 
>> *org.hotswap.agent.plugin.tomcat.TomcatPlugin.init()
>> *method get called during WebappLoader.start lifecycle event. But at the
>> time STARTING event get fired we haven't set the  WebappClassloadingContext
>> to the WebappClassloader. Therefore when it tries to do some checks in
>> order to load the resources it throws the NPE.
>>
>> *org.wso2.carbon.webapp.mgt.loader.CarbonWebappLoader*
>>
>> @Override
>> protected void startInternal() throws LifecycleException {
>>
>> ...
>>
>> super.startInternal();  > In this point STARTING even get fired and so 
>> *TomcatPlugin.init * method get called and it try to get the resource. That 
>> called getResources method and since we haven't still set the 
>> webappClassloadingContext it throws a NPE.
>>
>>
>> //Adding the WebappClassloadingContext to the WebappClassloader
>>
>> ((CarbonWebappClassLoader)
>> getClassLoader()).setWebappCC(webappClassloadingContext); // This is the
>> point where we are setting the webappClassloadingContext
>>
>> Thanks
>> Thusitha
>>
>> On Fri, Jan 22, 2016 at 4:54 PM, Clovis Wichoski 
>> wrote:
>>
>>> Hi Kishanthan,
>>>
>>> The redeploy all of a small system its ok, but for a big one, its a
>>> problem, just a change in one class you must redeploy, loose sessions,
>>> restart the system from scratch, to reach the point of test again, with the
>>> ideas used by HotSwapAgent they act on reloading only that one class
>>> changed, this way speeds the development time, these ideas are well
>>> defended by JRebel tool, that HotSwapAgent tends to be a choice as an open
>>> source solution. Please note that this feature is only needed for
>>> development phase, in production, the scheduled task its ok.
>>>
>>> I mean time I tested with AS 5.3.0, JRebel and HotSwapAgent, JRebel
>>> trial worked as expected, but HotSwapAgent not (see exception bellow [1]),
>>> I will check these problems with HotSwapAgent devs, and try to discover why
>>> dont works with WSO2 AS as with HotSwapAgent active none of webapps load,
>>> all get that exception, as we see a NPE in class CarbonWebappClassLoader
>>> maybe its the way they initialize the dependent class loaders.
>>>
>>> [1] Exception when HotSwapAgent is active:
>>> [2016-01-22 09:14:18,467] ERROR {org.apache.catalina.core.ContainerBase}
>>> -  ContainerBase.addChild: start:
>>> org.apache.catalina.LifecycleException: Failed to start component
>>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/example]]
>>> at
>>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
>>> at
>>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>>> at
>>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>>> at
>>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
>>> at
>>> org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:344)
>>> at
>>> org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:252)
>>> at
>>> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment(TomcatGenericWebappsDeployer.java:314)
>>> at
>>> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWarWebappDeployment(TomcatGenericWebappsDeployer.java:212)
>>> at
>>> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleHotDeployment(TomcatGenericWebappsDeployer.java:179)
>>> at
>>> org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.deploy(TomcatGenericWebappsDeployer.java:144)
>>> at
>>> org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deployThisWebApp(AbstractWebappDeployer.java:224)
>>> at
>>> org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deploy(AbstractWebappDeployer.java:114)
>>> at
>>> org.wso2.carbon.webapp.deployer.WebappDeployer.deploy(WebappDeployer.java:42)
>>> at
>>> org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
>>> at
>>> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
>>> at
>>> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
>>> at
>>> 

Re: [Dev] Handling time-consuming processes within Carbon Metrics Gauges

2016-01-25 Thread Isuru Perera
Yes. It's better to profile and see.

I also discussed with Grainier and we think it's better to use "DEBUG" or
"TRACE" level when creating the gauge for memory consumption.

In that way, we can enable these kinds of gauges in runtime only when we
need. (The Carbon Metrics has a feature to support changing the configured
level dynamically at runtime via a JMX operation)

Thanks!

On Thu, Jan 21, 2016 at 11:40 AM, Sajith Ravindra  wrote:

> I think it will be a good idea to run several rounds of testing to see if
> this memory calculation is CPU intensive. And If this is CPU intensive then
> this might have an adverse affect the overall performance of CEP/Siddhi as
> well when executing in a limited resource setup.
>
> Thanks
> *,Sajith Ravindra*
> Senior Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 77 2273550
> blog: http://sajithr.blogspot.com/
> 
>
> On Wed, Jan 20, 2016 at 9:59 PM, Grainier Perera 
> wrote:
>
>> Hi suho,
>>
>> It does not have any impact on Siddhi's runtime performance. It just
>> affects on metrics reporting, which runs separately.
>>
>> Thanks,
>> Grainier.
>>
>> On Thu, Jan 21, 2016 at 10:09 AM, Sriskandarajah Suhothayan <
>> s...@wso2.com> wrote:
>>
>>> You have not answered my Qn
>>>
>>> whats the impact on this when it comes to Siddhi's runtime performance ?
>>>
>>> Suho
>>>
>>> On Wednesday, January 20, 2016, Sajith Ravindra 
>>> wrote:
>>>
 Hi Granier, Suho

 The memory calculation will be a time consuming issue since it has to
 traverse through the complete object tree. IMO, we should have the option
 of executing matrix calculation in a separate thread and report back to the
 caller with the result.

 I think it's a valid case to have matrices which consume time/resources
 to calculate. Therefore, it will be a good idea to make available the
 option of matrix calculation to be asynchronous and report back once done
 in carbon metrics library it self.

 WDYT?

 Thanks
 *,Sajith Ravindra*
 Senior Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 77 2273550
 blog: http://sajithr.blogspot.com/
 

 On Wed, Jan 20, 2016 at 10:32 AM, Sriskandarajah Suhothayan <
 s...@wso2.com> wrote:

> I understand that Matrics reporting it getting slow.
>
> At the meantime whats the impact on this when it comes to Siddhi
> performance ?
> If Siddhi query is also getting halted for 3 sec, then this is going
> to be a bigger problem.
>
> Suho
>
> On Wed, Jan 20, 2016 at 12:25 PM, Grainier Perera 
> wrote:
>
>> Currently, the memory usage calculation mechanism used on a Siddhi
>> query takes around 3 seconds. Therefore, when it comes to complex flow 
>> with
>> several of execution plans, it takes around (# of queries * 3) seconds.
>> Moreover, we have integrated carbon-metrics [1] (Gauges in this scenario)
>> with CEP for metrics calculation and reporting. Therefore, if we were to
>> use the same mechanism within the getValue() method of carbon-metrics
>> Gauges, it will increase the reporting time consumed by scheduled 
>> reporters
>> (per iteration) by ~(# of queries * 3) seconds. That might cause issues
>> such as reporters does not report according to the defined PollingPeriod,
>> takes a considerable amount of time to update and render Carbon Metrics 
>> UI,
>> etc. Therefore, is there a way to handle such time-consuming process 
>> within
>> Carbon Metrics Gauges?
>>
>> Gauge.getValue() Implementation:
>>
>> new Gauge() {
>> @Override
>> public Long getValue() {
>> *// Below process takes ~3 seconds.*
>> ObjectGraphMeasurer.Footprint footprint =
>> ObjectGraphMeasurer.measure(object);
>> return MemoryMeasurerUtil.footprintSizeEstimate(footprint);
>> }
>> });
>>
>> [1] https://github.com/wso2/carbon-metrics
>>
>> Thanks,
>> Grainier.
>> --
>> Grainier Perera
>> Software Engineer
>> Mobile : +94716122384
>> WSO2 Inc. | http://wso2.com
>> lean.enterprise.middleware
>>
>
>
>
> --
>
> *S. Suhothayan*
> Technical Lead & Team Lead of WSO2 Complex Event Processor
> *WSO2 Inc. *http://wso2.com
> * *
> lean . enterprise . middleware
>
>
> *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog:
> http://suhothayan.blogspot.com/ twitter:
> http://twitter.com/suhothayan  | linked-in:
> http://lk.linkedin.com/in/suhothayan 
> 

Re: [Dev] US Election 2016 Tweet Analyze System

2016-01-25 Thread Thusitha Kalugamage
Update,

   1. Added assigned colors for candidate backgrounds as suggested.
   2. With Yasara's input on News tab, moved next to the Sentiment Analysis
   Graph.

 Please visit http://thusithak.github.io/twitter-analytics/ to view changes.

On Mon, Jan 25, 2016 at 4:00 PM, Thusitha Kalugamage 
wrote:

> Hi Yudhanjaya,
>
> 1) Yes we could, but since the Image is appended dynamically I used the
> same property to create its background,
> If we are to use a color, we would have to parse a color property as well.
> @Dinali shall we do that?
>
> 2) Yes, Already added three tabs to ticker and moved "News" as one of
> three tabs in the second row [1]
> 
>
> [1] http://thusithak.github.io/twitter-analytics/
>
> Regards,
>
> On Mon, Jan 25, 2016 at 12:23 PM, Yudhanjaya Wijeratne <
> yudhanj...@wso2.com> wrote:
>
>> Thanks Thusitha for the design. That looks clean!
>> Small critique:
>> 1) instead of having the candidate's image stretched out for the
>> background in his profile square, can we use the color we use to represent
>> him in the community graph?
>> 2) Is it possible to have an 'article ticker' before the sentiment
>> analysis box? We can feed the headlines in there.
>>
>> Best,
>> Yudha
>>
>> On Sun, Jan 24, 2016 at 7:30 PM, Thusitha Kalugamage 
>> wrote:
>>
>>> Hi All,
>>>
>>> As per discussions we had previously, I came up with a quick design and
>>> worked on a markup. :)
>>> you can have a look at the static page here [1]
>>> .
>>>
>>> *DInali / Yasara*: Please clone this repo [2]
>>> and start working on
>>> this. I will help you get the integration done.
>>>
>>> *Yudhanjaya* / *Srinath*,  Let me know if we can improve on this.
>>>
>>> Please note that some of these images are copyrighted and must be
>>> revised before publishing.
>>>
>>>
>>> [1] http://thusithak.github.io/twitter-analytics/
>>> [2] https://github.com/thusithak/twitter-analytics
>>>
>>>
>>> Regards,
>>>
>>> On Thu, Dec 3, 2015 at 11:05 AM, Dakshika Jayathilaka >> > wrote:
>>>
 Sure, I'll join for brainstorming.

 Regards,

 *Dakshika Jayathilaka*
 PMC Member & Committer of Apache Stratos
 Senior Software Engineer
 WSO2, Inc.
 lean.enterprise.middleware
 0771100911

 On Thu, Dec 3, 2015 at 11:02 AM, Srinath Perera 
 wrote:

> Hi Dakshika,
>
> Yudhanjaya will create some mock view and meet you to brainstorm and
> get feedback. Yudhanjaya, grab me or get me via a phone to the same
> discussion.
>
> Thanks
> Srinath
>
>
>
> On Wed, Dec 2, 2015 at 12:54 PM, Dakshika Jayathilaka <
> daksh...@wso2.com> wrote:
>
>> Hi Srinath,
>>
>> Seems I missed this thread. Anyway shall we meet to build some good
>> story + design concept.
>>
>> Regards,
>>
>> *Dakshika Jayathilaka*
>> PMC Member & Committer of Apache Stratos
>> Senior Software Engineer
>> WSO2, Inc.
>> lean.enterprise.middleware
>> 0771100911
>>
>> On Wed, Dec 2, 2015 at 11:49 AM, Yasara Dissanayake 
>> wrote:
>>
>>> Hi ,
>>> Left Conner:
>>> Top 3 election candidates are displayed on the top and big letters
>>> and other candidates are displayed in left side bar. We can visit 
>>> anyones
>>> page and this is the Trump page.
>>>
>>> Middle:
>>> Community Graph:
>>> Here display the Trump's community graph(that nodes represent the
>>> twitter account and also color of node indicates the different
>>> candidates and color shade is use to indicate the number of tweets
>>> produce by that account and sized of the node indicate the re tweet 
>>> count
>>> of the that account gets) is at the middle. dinali is  working on this.
>>>
>>> Re-tweet List
>>> List of top tweets displayed below the community graph based on the
>>> rank which directly proportion to the re-tweet count and inversely
>>> proportion to the life time of that tweets.
>>>
>>> Right Conner:
>>>
>>> Result of positive and negative sentiment analysis result is
>>> displayed below the photograph of owner of that page. Indent to display
>>> result using graph. Yudhanjaya is  working on this.
>>>
>>> Below that display the owner's(here Trump's) unique hash tags which
>>> based on the popular tweets(Please consider this hashTags are updated 
>>> with
>>> time).
>>>
>>> Doughnut graph is use to display the  current winning percentage of
>>> that candidate compared to other candidates. Currently have only rough
>>> draft to be implemented after machine learning part .
>>>
>>>
>>>
>>> @Nirmal thank you. Still we are integrating our parts and still
>>> database is not 

Re: [Dev] Issue activating osgi component with the service component reference

2016-01-25 Thread Sameera Jayasoma
Can you check whether your service component is activated? You can type the
"ls" command.



On Mon, Jan 25, 2016 at 4:56 PM, Nipuna Prashan  wrote:

> Hi all,
>
> I am writing an osgi component. This same component wants to be
> deployed in both Appfactory and APIManager servers. Here, I have
> imported some of the appfactory packages such as
> org.wso2.carbon.appfactory.application.mgt.* which will not be
> resolved in APIM 1.9.1.
> Then I used ;resolution:=optional in the pom file for those packages
> and I set service component reference cardinality to "0..1"
>
> @scr.reference name="application.applicationInfoService"
>
> interface="org.wso2.carbon.appfactory.application.mgt.service.ApplicationInfoService"
> cardinality="0..1"
> policy="dynamic" bind="setApplicationInfoService"
> unbind="unsetApplicationInfoService"
>
> When I start the server(APIM 1.9.1) the log that gets printed when the
> component gets activated is not printed implying it has not been
> activated, but osgi console says that the bundle has activated.
>
> What would be the problem? Any suggestions would be appreciated.
>
> --
> Nipuna Prashan
> Software Engineering Intern
> +94711852792
>



-- 
Sameera Jayasoma,
Software Architect,

WSO2, Inc. (http://wso2.com)
email: same...@wso2.com
blog: http://blog.sameera.org
twitter: https://twitter.com/sameerajayasoma
flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
Mobile: 0094776364456

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


Re: [Dev] Getting ML model (1.1.0) working with DAS (3.0.0)

2016-01-25 Thread Rukshani Weerasinha
Hi all,

Now the Enabling/Disabling Selected DAS Components page [1] is updated with
a description of this property in both DAS 3.0.0 and DAS 3.0.1. Thank you
Niranda for helping to finalise the description.

[1] https://docs.wso2.com/pages/viewpage.action?pageId=48288641

Best Regards,
Rukshani.

On Mon, Jan 25, 2016 at 8:21 AM, Rukshani Weerasinha 
wrote:

> Hi all,
>
> I will update this page soon and inform you in this thread once it is done.
>
> Thank You and Best Regards,
> Rukshani.
>
> On Sat, Jan 23, 2016 at 9:19 PM, Iranga Muthuthanthri 
> wrote:
>
>> + Rukshani
>> On Jan 23, 2016 3:00 PM, "Niranda Perera"  wrote:
>>
>>> Shall we include this under another subtopic in the following page [1]?
>>> then it will be a one stop page for all the -D options for DAS
>>>
>>> [1] https://docs.wso2.com/pages/viewpage.action?pageId=45952727
>>>
>>> On Fri, Jan 22, 2016 at 3:05 PM, Nirmal Fernando 
>>> wrote:
>>>
 Hi Iranga,


 On Fri, Jan 22, 2016 at 3:00 PM, Iranga Muthuthanthri 
 wrote:

> Hi,
>
> In order to build an integrated  analytics scenario (Batch, Realtime
> and Predictive)  with DAS 3.0.0 tried the following steps in a local 
> server
> though by installing and using CEP-ML extension in DAS. The steps followed
> are below.
>
> 1.) Installed ML 1.1.0  features in DAS 3.0.0.
> 2) Created a model through ML 1.1.0 .
> 3.)  Publish model to DAS registry .
> 4.) Use the ML extention through execution plan.
>
>  The following exceptions is observed at Server startup, possibly due
> to the  issue  of "supporting multiple Spark context in a jvm"[2].  Can
> start the server with command wso2server.sh
> -DdisableAnalyticsSparkCtx=true
>

 Instead of doing this, do -DdisableMLSparkCtx=true this would disable
 ML Spark Context creation but predictions should still work.



>
> However this prevents using the batch analytics features in DAS,
>
> Is there a  solution to get all three integrated analytics with DAS
> 3.0.0?Is there a way use the ML model to overcome issue[2]
>
>
>
>
>
> [1]2016-01-22 12:09:58,193] ERROR
> {org.wso2.carbon.analytics.spark.core.internal.AnalyticsComponent} -  
> Error
> initializing analytics executor: Only one SparkContext may be running in
> this JVM (see SPARK-2243). To ignore this error, set
> spark.driver.allowMultipleContexts = true. The currently running
> SparkContext was created 
>
>
> [2]https://issues.apache.org/jira/browse/SPARK-2243
>
> --
> Thanks & Regards
>
> Iranga Muthuthanthri
> (M) -0777-255773
> Team Product Management
>
>


 --

 Thanks & regards,
 Nirmal

 Team Lead - WSO2 Machine Learner
 Associate Technical Lead - Data Technologies Team, WSO2 Inc.
 Mobile: +94715779733
 Blog: http://nirmalfdo.blogspot.com/



>>>
>>>
>>> --
>>> *Niranda Perera*
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94-71-554-8430
>>> Twitter: @n1r44 
>>> https://pythagoreanscript.wordpress.com/
>>>
>>
>
>
> --
> Rukshani Weerasinha
>
> WSO2 Inc.
> Web:http://wso2.com
> Mobile: 0777 683 738
>
>


-- 
Rukshani Weerasinha

WSO2 Inc.
Web:http://wso2.com
Mobile: 0777 683 738
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Issue activating osgi component with the service component reference

2016-01-25 Thread Sameera Jayasoma
Just to be clear, I need service component activation status, not the
bundle status.

On Mon, Jan 25, 2016 at 5:09 PM, Sameera Jayasoma  wrote:

> Can you check whether your service component is activated? You can type
> the "ls" command.
>
>
>
> On Mon, Jan 25, 2016 at 4:56 PM, Nipuna Prashan  wrote:
>
>> Hi all,
>>
>> I am writing an osgi component. This same component wants to be
>> deployed in both Appfactory and APIManager servers. Here, I have
>> imported some of the appfactory packages such as
>> org.wso2.carbon.appfactory.application.mgt.* which will not be
>> resolved in APIM 1.9.1.
>> Then I used ;resolution:=optional in the pom file for those packages
>> and I set service component reference cardinality to "0..1"
>>
>> @scr.reference name="application.applicationInfoService"
>>
>> interface="org.wso2.carbon.appfactory.application.mgt.service.ApplicationInfoService"
>> cardinality="0..1"
>> policy="dynamic" bind="setApplicationInfoService"
>> unbind="unsetApplicationInfoService"
>>
>> When I start the server(APIM 1.9.1) the log that gets printed when the
>> component gets activated is not printed implying it has not been
>> activated, but osgi console says that the bundle has activated.
>>
>> What would be the problem? Any suggestions would be appreciated.
>>
>> --
>> Nipuna Prashan
>> Software Engineering Intern
>> +94711852792
>>
>
>
>
> --
> Sameera Jayasoma,
> Software Architect,
>
> WSO2, Inc. (http://wso2.com)
> email: same...@wso2.com
> blog: http://blog.sameera.org
> twitter: https://twitter.com/sameerajayasoma
> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
> Mobile: 0094776364456
>
> Lean . Enterprise . Middleware
>
>


-- 
Sameera Jayasoma,
Software Architect,

WSO2, Inc. (http://wso2.com)
email: same...@wso2.com
blog: http://blog.sameera.org
twitter: https://twitter.com/sameerajayasoma
flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
Mobile: 0094776364456

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


[Dev] Evaluating the possibility of applying Goldmansachs ConcurrentHashMap in MB

2016-01-25 Thread Malaka Gangananda
Hi,

While profiling the MB we found out that there is a performance bottle neck
in using util.ConcurrentSkipListMap. Because every time size call is made
it has to loop through the data structure so it takes O(n) time. But
looking at GC ConcurrentHashMap we found out that it only takes constant
time (O(1) time) to make the size call.Other operations on GC
ConcurrentHashMap are also faster than uti.ConcurrentSkipListMap.

Here I have attached JMH Benchmark results which acquired by testing
util.ConcurrentSkipListMap vs GC ConcurrentHashMap

​​​
 ConcurrentSkipListMap Vs Goldmansachs Concurre...

​

Malaka Gangananda
Software Engineer Intern
mobile:0713564340
mala...@wso2.com

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


Re: [Dev] [DAS] Spark clustering and DAS analytics cluster tuning

2016-01-25 Thread Rukshani Weerasinha
Hello Niranda,

Thank you for providing this content. We will start working on this.

Best Regards,
Rukshani.

On Tue, Jan 26, 2016 at 3:34 AM, Niranda Perera  wrote:

> Hi,
>
> I added 2 blog posts explaining how Spark clustering works [1] and how to
> manage the resources in a DAS analytics cluster [2].
>
> @Rukshani, some of the content should go to this doc [3]. Can we work on
> that?
>
> Best
>
> [1]
> https://pythagoreanscript.wordpress.com/2016/01/23/the-dynamics-of-a-spark-cluster-wrt-wso2-das/
> [2]
> https://pythagoreanscript.wordpress.com/2016/01/25/wso2-das-spark-cluster-tuning/
> [3] https://docs.wso2.com/display/DAS301/Performance+Tuning
>
> --
> *Niranda Perera*
> Software Engineer, WSO2 Inc.
> Mobile: +94-71-554-8430
> Twitter: @n1r44 
> https://pythagoreanscript.wordpress.com/
>



-- 
Rukshani Weerasinha

WSO2 Inc.
Web:http://wso2.com
Mobile: 0777 683 738
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev