[Dev] WSO2 MB - To Be Dones I tracked so far

2014-11-15 Thread Hasitha Hiranya
Hi Team,

Following are tasks TBD for M2 and M3 releases of MB.
Thought of flushing my mind with the tasks that came up with last code
review and some last for some time.


1. Add a warning if parts cache is growing. (Done)
2. Make message status block capital (Done)
3. Make message status commented (TBD)

4. Remove msgId2MsgData auto removal of IDs. And make it a
concurrentHashMap. (Done)

5. Move Sent and Sent all status setting to correct places ().

6. Make send() of subscription impl logic free. If an exception came from
there, catch it and do the work within QDW class. Need to define proper
exceptions on why sending to subscriber failed (DLC sending if delivery
rules failed, if exception came when sending try another subscriber if
available, if not move them over in store with a new messageID, but keeping
the old id somehow) (This is a task. Need to assign somebody).

7. When all nodes in the cluster is gone make the index again (Done by
AsankaAb)

8. We decided to keep Acked by all and sent to all status, did not we? No
need to write what Ramith suggested now.

9. Add a delay when trying to delete slot to get over with Edge Case
brought out by Indika (Is it solved now? Problem was elsewhere?)

10. Need to run all topic test cases and make them pass.

11. Need to introduce new ack handle mechanism (QOS 0,1,2) and AMQP ack
means one of those.  AMQP transactions, client acks also come into play
here.  We need to be careful. (This is a task. Should be assigned to
somebody).

12. We still did not review purge and queue delete. Should be done soon.
Topic deletion should be integrated with it. HasithaA can you schedule a
review?

13. Hector code is committed now. We can choose hector or cql from config
level. Are we maintaining both now? WDYT?

14. Need to fix packaging someday.

15. Topic cluster wide tests needs to be written. There is a considerable
number of scenarios.

16. Topic ack and requeing should be verified with the spec. Should we
requeue topic messages if rejected by client, or if delivery failed? How
this affect to MQTT impl?

17. MQTT cluster tests needs to be written.

18. Puppetizing MB deployment? Did we make any progress?

19. Remove zookeeper, node queue, qlobal queue, queueAddress, topic
delivery worker concepts completely from the code.

20. We Must test and fix message counting. With concurrent publishers and
subscribers we still have message counting probs.

21. Apply config revamp.

Suppose we can go to M2 when these are done.

For M3

1. Fix all the UIs. This will take a considerable effort.
2. Merge remaining fixes from 2.2.0.

Thanks


-- 
*Hasitha Abeykoon*
Senior Software Engineer; WSO2, Inc.; http://wso2.com
*cell:* *+94 719363063*
*blog: **abeykoon.blogspot.com* http://abeykoon.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Axis2 deployer doesn't work for tenants

2014-11-15 Thread Firzhan Naqash
Hi Lahiru,

You can get the carbon tenant repository by
using CarbonUtils.getCarbonTenantsDirPath().

With in the the tenant repository you can get the array of folder names (
tenant ID ).

There after you can iterate the tenant id array and access the event-sinks
folder for each tenant.


Regards,
Firzhan

On Sat, Nov 15, 2014 at 1:32 PM, Lahiru Chandima lahi...@wso2.com wrote:

 Thanks Frizhan for the nice solution :)

 Do you know a way to programmatically get deployment directory path of a
 tenant?

 Thanks

 On Sat, Nov 15, 2014 at 1:12 PM, Firzhan Naqash firz...@wso2.com wrote:

 Hi Lahiru,

 On that case, you can touch(update) the artifacts of tenanat's once the
 bundle get activated :) . This is not an elegant solution.

 There might be other better proper ways to achieve this.

 Regards,
 Firzhan

 On Sat, Nov 15, 2014 at 12:35 PM, Lahiru Chandima lahi...@wso2.com
 wrote:

 Hi Frizhan,

 Thanks for the information.

 Is there any way I can automatically re-deploy artifacts for tenants on
 startup? If I log in using a tenant user to ESB, I can see the proxy
 service artifacts that were added earlier, showing that they were somehow
 re-deployed. So I think there should be a way.

 Thanks

 On Sat, Nov 15, 2014 at 10:31 AM, Firzhan Naqash firz...@wso2.com
 wrote:

 Hi Lahiru,

 Deployer's deploy() method will get trigger only when artifacts are
 being deployed.

 For super-tenant during the server start-up axis2 re-deploys the
 artifacts, thus triggering deploy(). But for tenants nothing happens like
 that unless you do it manually.



 Regards,
 Firzhan

 On Sat, Nov 15, 2014 at 7:33 AM, Lahiru Chandima lahi...@wso2.com
 wrote:

 Hi Lasantha,

 Thanks for the solution.

 logging in as a tenant user solved the problem. Now new artifacts that
 I add after tenant is loaded get deployed.

 But, the artifacts that were already there in my tenant artifact
 directory neither gets deployed at server startup nor when a tenant user 
 is
 logged in. But these artifacts get deployed if I do some change to them
 after a tenant user logs in.

 What may be the reason for this?

 Thanks


 On Sat, Nov 15, 2014 at 12:08 AM, Lasantha Fernando lasan...@wso2.com
  wrote:

 Hi Lahiru,

 Can you verify whether your tenant is loaded in the server? (If you
 simply login as a tenant user, the tenant should be loaded)

 If your tenant is not loaded, the deployment of artifacts for that
 particular tenant will not happen. AFAIK, this is the expected behaviour
 for a carbon server since we load tenants lazily.

 Thanks,
 Lasantha

 On 14 November 2014 22:58, Lahiru Chandima lahi...@wso2.com wrote:

 Hi Firzhan,

 Thanks for the reply.

 Tried your method and its working for files deployed in
 repository/deployment/server/event-sinks. But still no luck with 
 deploying
 for a tenant (in repository/tenants/1/event-sinks)

 Any idea why?

 Thanks

 On Fri, Nov 14, 2014 at 8:10 PM, Firzhan Naqash firz...@wso2.com
 wrote:

 Hi Lahiru,

 Rathern than defining them in axis2.xml, you can define them in
 compnent.xml and pom.xml file which worked for me [1]

 [1]
 http://architects.dzone.com/articles/writing-axis2-custom-deployers

 Regards,
 Firzhan

 On Fri, Nov 14, 2014 at 7:14 PM, Lahiru Chandima lahi...@wso2.com
 wrote:

 Hi All,

 I have created an Axis2 deployer to deploy an xml artifact. I have
 added following to repository/conf/axis2/axis2.xml

 deployer extension=.xml
 class=org.wso2.carbon.event.sink.EventSinkDeployer
 directory=event-sinks/

 And I have created a directory named event-sinks for my new
 artifact type in repository/deployment/server

 When I add a new xml artifact to the event-sinks directory,
 deploy(DeploymentFileData deploymentFileData) in my deployer gets 
 called
 without a problem.

 But, if I deploy an artifact for a tenant (eg: in directory
 repository/tenants/1/event-sinks for tenant 1), deploy() method of my
 deployer doesn't get called.

 What have I done wrong? Have I created event-sinks directory in
 the wrong location for tenant 1?

 Thanks

 --
 Lahiru Chandima
 *Senior Software Engineer*
 Mobile : +94 (0) 772 253283
 lahi...@wso2.com

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





 --
 Lahiru Chandima
 *Senior Software Engineer*
 Mobile : +94 (0) 772 253283
 lahi...@wso2.com

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




 --
 *Lasantha Fernando*
 Software Engineer - Data Technologies Team
 WSO2 Inc. http://wso2.com

 email: lasan...@wso2.com
 mobile: (+94) 71 5247551




 --
 Lahiru Chandima
 *Senior Software Engineer*
 Mobile : +94 (0) 772 253283
 lahi...@wso2.com





 --
 Lahiru Chandima
 *Senior Software Engineer*
 Mobile : +94 (0) 772 253283
 lahi...@wso2.com





 --
 Lahiru Chandima
 *Senior Software Engineer*
 Mobile : +94 (0) 772 253283
 lahi...@wso2.com

___
Dev mailing 

Re: [Dev] Axis2 deployer doesn't work for tenants

2014-11-15 Thread Udara Liyanage
Hi,

I don't think manually touching the artifacts is a wise solution.
As mentioned by Lasantha artifacts are not deployed until tenant is loaded.
Imagine a production setup with a large number of tenants and each tenant
has artifacts, then it will takes a long time to deploy all artifacts.
Delaying artifact deployment is called ghost deployment [1].
Try sending a request to the not deployed artifacts and check if deploy()
is get called.

[1]
http://blog.afkham.org/2011/11/lazy-loading-deployment-artifacts-in.html?m=1



Touched, not typed. Erroneous words are a feature, not a typo.
On Nov 15, 2014 1:49 PM, Firzhan Naqash firz...@wso2.com wrote:

 Hi Lahiru,

 You can get the carbon tenant repository by
 using CarbonUtils.getCarbonTenantsDirPath().

 With in the the tenant repository you can get the array of folder names (
 tenant ID ).

 There after you can iterate the tenant id array and access the event-sinks
 folder for each tenant.


 Regards,
 Firzhan

 On Sat, Nov 15, 2014 at 1:32 PM, Lahiru Chandima lahi...@wso2.com wrote:

 Thanks Frizhan for the nice solution :)

 Do you know a way to programmatically get deployment directory path of a
 tenant?

 Thanks

 On Sat, Nov 15, 2014 at 1:12 PM, Firzhan Naqash firz...@wso2.com wrote:

 Hi Lahiru,

 On that case, you can touch(update) the artifacts of tenanat's once the
 bundle get activated :) . This is not an elegant solution.

 There might be other better proper ways to achieve this.

 Regards,
 Firzhan

 On Sat, Nov 15, 2014 at 12:35 PM, Lahiru Chandima lahi...@wso2.com
 wrote:

 Hi Frizhan,

 Thanks for the information.

 Is there any way I can automatically re-deploy artifacts for tenants on
 startup? If I log in using a tenant user to ESB, I can see the proxy
 service artifacts that were added earlier, showing that they were somehow
 re-deployed. So I think there should be a way.

 Thanks

 On Sat, Nov 15, 2014 at 10:31 AM, Firzhan Naqash firz...@wso2.com
 wrote:

 Hi Lahiru,

 Deployer's deploy() method will get trigger only when artifacts are
 being deployed.

 For super-tenant during the server start-up axis2 re-deploys the
 artifacts, thus triggering deploy(). But for tenants nothing happens like
 that unless you do it manually.



 Regards,
 Firzhan

 On Sat, Nov 15, 2014 at 7:33 AM, Lahiru Chandima lahi...@wso2.com
 wrote:

 Hi Lasantha,

 Thanks for the solution.

 logging in as a tenant user solved the problem. Now new artifacts
 that I add after tenant is loaded get deployed.

 But, the artifacts that were already there in my tenant artifact
 directory neither gets deployed at server startup nor when a tenant user 
 is
 logged in. But these artifacts get deployed if I do some change to them
 after a tenant user logs in.

 What may be the reason for this?

 Thanks


 On Sat, Nov 15, 2014 at 12:08 AM, Lasantha Fernando 
 lasan...@wso2.com wrote:

 Hi Lahiru,

 Can you verify whether your tenant is loaded in the server? (If you
 simply login as a tenant user, the tenant should be loaded)

 If your tenant is not loaded, the deployment of artifacts for that
 particular tenant will not happen. AFAIK, this is the expected behaviour
 for a carbon server since we load tenants lazily.

 Thanks,
 Lasantha

 On 14 November 2014 22:58, Lahiru Chandima lahi...@wso2.com wrote:

 Hi Firzhan,

 Thanks for the reply.

 Tried your method and its working for files deployed in
 repository/deployment/server/event-sinks. But still no luck with 
 deploying
 for a tenant (in repository/tenants/1/event-sinks)

 Any idea why?

 Thanks

 On Fri, Nov 14, 2014 at 8:10 PM, Firzhan Naqash firz...@wso2.com
 wrote:

 Hi Lahiru,

 Rathern than defining them in axis2.xml, you can define them in
 compnent.xml and pom.xml file which worked for me [1]

 [1]
 http://architects.dzone.com/articles/writing-axis2-custom-deployers

 Regards,
 Firzhan

 On Fri, Nov 14, 2014 at 7:14 PM, Lahiru Chandima lahi...@wso2.com
  wrote:

 Hi All,

 I have created an Axis2 deployer to deploy an xml artifact. I
 have added following to repository/conf/axis2/axis2.xml

 deployer extension=.xml
 class=org.wso2.carbon.event.sink.EventSinkDeployer
 directory=event-sinks/

 And I have created a directory named event-sinks for my new
 artifact type in repository/deployment/server

 When I add a new xml artifact to the event-sinks directory,
 deploy(DeploymentFileData deploymentFileData) in my deployer gets 
 called
 without a problem.

 But, if I deploy an artifact for a tenant (eg: in directory
 repository/tenants/1/event-sinks for tenant 1), deploy() method of my
 deployer doesn't get called.

 What have I done wrong? Have I created event-sinks directory in
 the wrong location for tenant 1?

 Thanks

 --
 Lahiru Chandima
 *Senior Software Engineer*
 Mobile : +94 (0) 772 253283
 lahi...@wso2.com

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





 --
 Lahiru Chandima
 *Senior Software Engineer*
 Mobile : +94 (0) 772 

Re: [Dev] Axis2 deployer doesn't work for tenants

2014-11-15 Thread Lasantha Fernando
Hi Lahiru,

On 15 November 2014 14:04, Udara Liyanage ud...@wso2.com wrote:

 Hi,

 I don't think manually touching the artifacts is a wise solution.
 As mentioned by Lasantha artifacts are not deployed until tenant is
 loaded. Imagine a production setup with a large number of tenants and each
 tenant has artifacts, then it will takes a long time to deploy all
 artifacts. Delaying artifact deployment is called ghost deployment [1].
 Try sending a request to the not deployed artifacts and check if deploy()
 is get called.

 [1]
 http://blog.afkham.org/2011/11/lazy-loading-deployment-artifacts-in.html?m=1



 Touched, not typed. Erroneous words are a feature, not a typo.
 On Nov 15, 2014 1:49 PM, Firzhan Naqash firz...@wso2.com wrote:

 Hi Lahiru,

 You can get the carbon tenant repository by
 using CarbonUtils.getCarbonTenantsDirPath().

 With in the the tenant repository you can get the array of folder names (
 tenant ID ).

 There after you can iterate the tenant id array and access the
 event-sinks folder for each tenant.


 Regards,
 Firzhan

 On Sat, Nov 15, 2014 at 1:32 PM, Lahiru Chandima lahi...@wso2.com
 wrote:

 Thanks Frizhan for the nice solution :)

 Do you know a way to programmatically get deployment directory path of a
 tenant?

 Thanks

 On Sat, Nov 15, 2014 at 1:12 PM, Firzhan Naqash firz...@wso2.com
 wrote:

 Hi Lahiru,

 On that case, you can touch(update) the artifacts of tenanat's once the
 bundle get activated :) . This is not an elegant solution.

 There might be other better proper ways to achieve this.

 Regards,
 Firzhan

 On Sat, Nov 15, 2014 at 12:35 PM, Lahiru Chandima lahi...@wso2.com
 wrote:

 Hi Frizhan,

 Thanks for the information.

 Is there any way I can automatically re-deploy artifacts for tenants
 on startup? If I log in using a tenant user to ESB, I can see the proxy
 service artifacts that were added earlier, showing that they were somehow
 re-deployed. So I think there should be a way.

 Thanks

 On Sat, Nov 15, 2014 at 10:31 AM, Firzhan Naqash firz...@wso2.com
 wrote:

 Hi Lahiru,

 Deployer's deploy() method will get trigger only when artifacts are
 being deployed.

 For super-tenant during the server start-up axis2 re-deploys the
 artifacts, thus triggering deploy(). But for tenants nothing happens like
 that unless you do it manually.



 Regards,
 Firzhan

 On Sat, Nov 15, 2014 at 7:33 AM, Lahiru Chandima lahi...@wso2.com
 wrote:

 Hi Lasantha,

 Thanks for the solution.

 logging in as a tenant user solved the problem. Now new artifacts
 that I add after tenant is loaded get deployed.

 But, the artifacts that were already there in my tenant artifact
 directory neither gets deployed at server startup nor when a tenant 
 user is
 logged in. But these artifacts get deployed if I do some change to them
 after a tenant user logs in.

 What may be the reason for this?


This is actually strange. When ghost deployment is not enabled (which is
the  default AFAIK), when the tenant is loaded all the related artifacts
should get deployed (as explained in the blog post by Azeez which was
suggested by Udara above). I assume you are testing this on a Carbon-4.3.0
based server (ESB-4.9.0?). I tested this scenario for CEP 4.0.0-SNAPSHOT
build which is also based on Carbon 4.3.0 and tenant artifacts that were
previously there in the directory get deployed fine after the tenant is
loaded.

Can you share the configs (axis2.xml, carbon.xml) related to your test
setup? Also, do you have any source location where your deployer code is
committed? Maybe we can go through that and see if there is any config
issue or similar.


 Thanks


 On Sat, Nov 15, 2014 at 12:08 AM, Lasantha Fernando 
 lasan...@wso2.com wrote:

 Hi Lahiru,

 Can you verify whether your tenant is loaded in the server? (If you
 simply login as a tenant user, the tenant should be loaded)

 If your tenant is not loaded, the deployment of artifacts for that
 particular tenant will not happen. AFAIK, this is the expected 
 behaviour
 for a carbon server since we load tenants lazily.

 Thanks,
 Lasantha

 On 14 November 2014 22:58, Lahiru Chandima lahi...@wso2.com
 wrote:

 Hi Firzhan,

 Thanks for the reply.

 Tried your method and its working for files deployed in
 repository/deployment/server/event-sinks. But still no luck with 
 deploying
 for a tenant (in repository/tenants/1/event-sinks)

 Any idea why?

 Thanks

 On Fri, Nov 14, 2014 at 8:10 PM, Firzhan Naqash firz...@wso2.com
 wrote:

 Hi Lahiru,

 Rathern than defining them in axis2.xml, you can define them in
 compnent.xml and pom.xml file which worked for me [1]

 [1]
 http://architects.dzone.com/articles/writing-axis2-custom-deployers

 Regards,
 Firzhan

 On Fri, Nov 14, 2014 at 7:14 PM, Lahiru Chandima 
 lahi...@wso2.com wrote:

 Hi All,

 I have created an Axis2 deployer to deploy an xml artifact. I
 have added following to repository/conf/axis2/axis2.xml

 deployer extension=.xml
 class=org.wso2.carbon.event.sink.EventSinkDeployer
 

Re: [Dev] Axis2 deployer doesn't work for tenants

2014-11-15 Thread Lahiru Chandima
Thanks Frizhan, Udara, Lasantha for replies.

Hi Lasantha,

I am using ESB 4.8.1, which is the latest available through WSO2 website.

I have attached the axis2.xml and carbon.xml here. And following is git my
deployer class in Github.

https://github.com/lahiruchandima/event-sink/blob/master/org.wso2.carbon.event.sink/4.2.0/src/main/java/org/wso2/carbon/event/sink/EventSinkDeployer.java

Can you please have a look?

Thanks


On Sat, Nov 15, 2014 at 2:54 PM, Lasantha Fernando lasan...@wso2.com
wrote:

 Hi Lahiru,

 On 15 November 2014 14:04, Udara Liyanage ud...@wso2.com wrote:

 Hi,

 I don't think manually touching the artifacts is a wise solution.
 As mentioned by Lasantha artifacts are not deployed until tenant is
 loaded. Imagine a production setup with a large number of tenants and each
 tenant has artifacts, then it will takes a long time to deploy all
 artifacts. Delaying artifact deployment is called ghost deployment [1].
 Try sending a request to the not deployed artifacts and check if deploy()
 is get called.

 [1]
 http://blog.afkham.org/2011/11/lazy-loading-deployment-artifacts-in.html?m=1



 Touched, not typed. Erroneous words are a feature, not a typo.
 On Nov 15, 2014 1:49 PM, Firzhan Naqash firz...@wso2.com wrote:

 Hi Lahiru,

 You can get the carbon tenant repository by
 using CarbonUtils.getCarbonTenantsDirPath().

 With in the the tenant repository you can get the array of folder names
 ( tenant ID ).

 There after you can iterate the tenant id array and access the
 event-sinks folder for each tenant.


 Regards,
 Firzhan

 On Sat, Nov 15, 2014 at 1:32 PM, Lahiru Chandima lahi...@wso2.com
 wrote:

 Thanks Frizhan for the nice solution :)

 Do you know a way to programmatically get deployment directory path of
 a tenant?

 Thanks

 On Sat, Nov 15, 2014 at 1:12 PM, Firzhan Naqash firz...@wso2.com
 wrote:

 Hi Lahiru,

 On that case, you can touch(update) the artifacts of tenanat's once
 the bundle get activated :) . This is not an elegant solution.

 There might be other better proper ways to achieve this.

 Regards,
 Firzhan

 On Sat, Nov 15, 2014 at 12:35 PM, Lahiru Chandima lahi...@wso2.com
 wrote:

 Hi Frizhan,

 Thanks for the information.

 Is there any way I can automatically re-deploy artifacts for tenants
 on startup? If I log in using a tenant user to ESB, I can see the proxy
 service artifacts that were added earlier, showing that they were somehow
 re-deployed. So I think there should be a way.

 Thanks

 On Sat, Nov 15, 2014 at 10:31 AM, Firzhan Naqash firz...@wso2.com
 wrote:

 Hi Lahiru,

 Deployer's deploy() method will get trigger only when artifacts are
 being deployed.

 For super-tenant during the server start-up axis2 re-deploys the
 artifacts, thus triggering deploy(). But for tenants nothing happens 
 like
 that unless you do it manually.



 Regards,
 Firzhan

 On Sat, Nov 15, 2014 at 7:33 AM, Lahiru Chandima lahi...@wso2.com
 wrote:

 Hi Lasantha,

 Thanks for the solution.

 logging in as a tenant user solved the problem. Now new artifacts
 that I add after tenant is loaded get deployed.

 But, the artifacts that were already there in my tenant artifact
 directory neither gets deployed at server startup nor when a tenant 
 user is
 logged in. But these artifacts get deployed if I do some change to them
 after a tenant user logs in.

 What may be the reason for this?


 This is actually strange. When ghost deployment is not enabled (which is
 the  default AFAIK), when the tenant is loaded all the related artifacts
 should get deployed (as explained in the blog post by Azeez which was
 suggested by Udara above). I assume you are testing this on a Carbon-4.3.0
 based server (ESB-4.9.0?). I tested this scenario for CEP 4.0.0-SNAPSHOT
 build which is also based on Carbon 4.3.0 and tenant artifacts that were
 previously there in the directory get deployed fine after the tenant is
 loaded.

 Can you share the configs (axis2.xml, carbon.xml) related to your test
 setup? Also, do you have any source location where your deployer code is
 committed? Maybe we can go through that and see if there is any config
 issue or similar.


 Thanks


 On Sat, Nov 15, 2014 at 12:08 AM, Lasantha Fernando 
 lasan...@wso2.com wrote:

 Hi Lahiru,

 Can you verify whether your tenant is loaded in the server? (If
 you simply login as a tenant user, the tenant should be loaded)

 If your tenant is not loaded, the deployment of artifacts for that
 particular tenant will not happen. AFAIK, this is the expected 
 behaviour
 for a carbon server since we load tenants lazily.

 Thanks,
 Lasantha

 On 14 November 2014 22:58, Lahiru Chandima lahi...@wso2.com
 wrote:

 Hi Firzhan,

 Thanks for the reply.

 Tried your method and its working for files deployed in
 repository/deployment/server/event-sinks. But still no luck with 
 deploying
 for a tenant (in repository/tenants/1/event-sinks)

 Any idea why?

 Thanks

 On Fri, Nov 14, 2014 at 8:10 PM, Firzhan Naqash firz...@wso2.com
  wrote:

 Hi 

Re: [Dev] Axis2 deployer doesn't work for tenants

2014-11-15 Thread Afkham Azeez
Tenants are lazy loaded. Tenants mainly get loaded only if a request for
that tenant was received, and after 15 minutes of inactivity, the tenant
will get unloaded again. When a tenant is not loaded, its deployers will
not get triggered.

On Sat, Nov 15, 2014 at 12:20 PM, Lahiru Chandima lahi...@wso2.com wrote:

 Hi Frizhan,

 Thanks for the information.

 Is there any way I can automatically re-deploy artifacts for tenants on
 startup? If I log in using a tenant user to ESB, I can see the proxy
 service artifacts that were added earlier, showing that they were somehow
 re-deployed. So I think there should be a way.

 Thanks

 On Sat, Nov 15, 2014 at 10:31 AM, Firzhan Naqash firz...@wso2.com wrote:

 Hi Lahiru,

 Deployer's deploy() method will get trigger only when artifacts are being
 deployed.

 For super-tenant during the server start-up axis2 re-deploys the
 artifacts, thus triggering deploy(). But for tenants nothing happens like
 that unless you do it manually.



 Regards,
 Firzhan

 On Sat, Nov 15, 2014 at 7:33 AM, Lahiru Chandima lahi...@wso2.com
 wrote:

 Hi Lasantha,

 Thanks for the solution.

 logging in as a tenant user solved the problem. Now new artifacts that I
 add after tenant is loaded get deployed.

 But, the artifacts that were already there in my tenant artifact
 directory neither gets deployed at server startup nor when a tenant user is
 logged in. But these artifacts get deployed if I do some change to them
 after a tenant user logs in.

 What may be the reason for this?

 Thanks


 On Sat, Nov 15, 2014 at 12:08 AM, Lasantha Fernando lasan...@wso2.com
 wrote:

 Hi Lahiru,

 Can you verify whether your tenant is loaded in the server? (If you
 simply login as a tenant user, the tenant should be loaded)

 If your tenant is not loaded, the deployment of artifacts for that
 particular tenant will not happen. AFAIK, this is the expected behaviour
 for a carbon server since we load tenants lazily.

 Thanks,
 Lasantha

 On 14 November 2014 22:58, Lahiru Chandima lahi...@wso2.com wrote:

 Hi Firzhan,

 Thanks for the reply.

 Tried your method and its working for files deployed in
 repository/deployment/server/event-sinks. But still no luck with deploying
 for a tenant (in repository/tenants/1/event-sinks)

 Any idea why?

 Thanks

 On Fri, Nov 14, 2014 at 8:10 PM, Firzhan Naqash firz...@wso2.com
 wrote:

 Hi Lahiru,

 Rathern than defining them in axis2.xml, you can define them in
 compnent.xml and pom.xml file which worked for me [1]

 [1]
 http://architects.dzone.com/articles/writing-axis2-custom-deployers

 Regards,
 Firzhan

 On Fri, Nov 14, 2014 at 7:14 PM, Lahiru Chandima lahi...@wso2.com
 wrote:

 Hi All,

 I have created an Axis2 deployer to deploy an xml artifact. I have
 added following to repository/conf/axis2/axis2.xml

 deployer extension=.xml
 class=org.wso2.carbon.event.sink.EventSinkDeployer
 directory=event-sinks/

 And I have created a directory named event-sinks for my new artifact
 type in repository/deployment/server

 When I add a new xml artifact to the event-sinks directory,
 deploy(DeploymentFileData deploymentFileData) in my deployer gets called
 without a problem.

 But, if I deploy an artifact for a tenant (eg: in directory
 repository/tenants/1/event-sinks for tenant 1), deploy() method of my
 deployer doesn't get called.

 What have I done wrong? Have I created event-sinks directory in the
 wrong location for tenant 1?

 Thanks

 --
 Lahiru Chandima
 *Senior Software Engineer*
 Mobile : +94 (0) 772 253283
 lahi...@wso2.com

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





 --
 Lahiru Chandima
 *Senior Software Engineer*
 Mobile : +94 (0) 772 253283
 lahi...@wso2.com

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




 --
 *Lasantha Fernando*
 Software Engineer - Data Technologies Team
 WSO2 Inc. http://wso2.com

 email: lasan...@wso2.com
 mobile: (+94) 71 5247551




 --
 Lahiru Chandima
 *Senior Software Engineer*
 Mobile : +94 (0) 772 253283
 lahi...@wso2.com





 --
 Lahiru Chandima
 *Senior Software Engineer*
 Mobile : +94 (0) 772 253283
 lahi...@wso2.com

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




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

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


[Dev] Whats bam-data-publishers git repo for ?

2014-11-15 Thread Sriskandarajah Suhothayan
HI

I found there is a new repo created for bam-data-publishers[1]. And I also
see the content in that is also not relevant.  What is that purpose of this
repo ?

Regards
Suho

[1]https://github.com/wso2-dev/bam-data-publishers

-- 

*S. Suhothayan*
Technical Lead  Team Lead of WSO2 Complex Event Processor
 *WSO2 Inc. *http://wso2.com
* http://wso2.com/*
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
http://suhothayan.blogspot.com/twitter: http://twitter.com/suhothayan
http://twitter.com/suhothayan | linked-in:
http://lk.linkedin.com/in/suhothayan http://lk.linkedin.com/in/suhothayan*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 MB - To Be Dones I tracked so far

2014-11-15 Thread Ramith Jayasinghe
On Sat, Nov 15, 2014 at 1:40 PM, Hasitha Hiranya hasit...@wso2.com wrote:

 Hi Team,

 Following are tasks TBD for M2 and M3 releases of MB.
 Thought of flushing my mind with the tasks that came up with last code
 review and some last for some time.


 1. Add a warning if parts cache is growing. (Done)
 2. Make message status block capital (Done)
 3. Make message status commented (TBD)

 4. Remove msgId2MsgData auto removal of IDs. And make it a
 concurrentHashMap. (Done)

 5. Move Sent and Sent all status setting to correct places ().

 6. Make send() of subscription impl logic free. If an exception came from
 there, catch it and do the work within QDW class. Need to define proper
 exceptions on why sending to subscriber failed (DLC sending if delivery
 rules failed, if exception came when sending try another subscriber if
 available, if not move them over in store with a new messageID, but keeping
 the old id somehow) (This is a task. Need to assign somebody).


 7. When all nodes in the cluster is gone make the index again (Done by
 AsankaAb)

 8. We decided to keep Acked by all and sent to all status, did not we? No
 need to write what Ramith suggested now.

 yes.

 9. Add a delay when trying to delete slot to get over with Edge Case
 brought out by Indika (Is it solved now? Problem was elsewhere?)

 after the last perf tests we did, problem doesn't occur on H2, only with
Cassandra ( CQL and Hector both). This is a real and Massive L1


 10. Need to run all topic test cases and make them pass.

 11. Need to introduce new ack handle mechanism (QOS 0,1,2) and AMQP ack
 means one of those.  AMQP transactions, client acks also come into play
 here.  We need to be careful. (This is a task. Should be assigned to
 somebody).



 12. We still did not review purge and queue delete. Should be done soon.
 Topic deletion should be integrated with it. HasithaA can you schedule a
 review?

 +1

 13. Hector code is committed now. We can choose hector or cql from config
 level. Are we maintaining both now? WDYT?

 My Opinion is we can keep both (atleast at this stage)

 14. Need to fix packaging someday.

 I suggest one of us do this and commit (big bang).


 15. Topic cluster wide tests needs to be written. There is a considerable
 number of scenarios.

 Shall we come up with scenarios (in a doc may be). the distribute.

 16. Topic ack and requeing should be verified with the spec. Should we
 requeue topic messages if rejected by client, or if delivery failed? How
 this affect to MQTT impl?


+1 lets check with the spec, and then chat

 17. MQTT cluster tests needs to be written.

 Again lets see what are the scenarios and decide on a scope


 18. Puppetizing MB deployment? Did we make any progress?

 We haven't done anything here. I checked with our cloud team there some
puppet template written for 2.2.0 also. However, we are waiting on the
initiative from automation team.


 19. Remove zookeeper, node queue, qlobal queue, queueAddress, topic
 delivery worker concepts completely from the code.



 20. We Must test and fix message counting. With concurrent publishers and
 subscribers we still have message counting probs.

 Lets open L2s for these to keep track.

 21. Apply config revamp.

 Hasitha Amal can comment on this

 Suppose we can go to M2 when these are done.



 For M3

 1. Fix all the UIs. This will take a considerable effort.



 2. Merge remaining fixes from 2.2.0.


And we need to keep on testing end to end fix issues ( M3 should have been
all about bring stability, BUT  given that there could be some other
features/requirements we might have to deliver with v 3.0.0 - something we
will decide next week)





 Thanks


 --
 *Hasitha Abeykoon*
 Senior Software Engineer; WSO2, Inc.; http://wso2.com
 *cell:* *+94 719363063*
 *blog: **abeykoon.blogspot.com* http://abeykoon.blogspot.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


Re: [Dev] [ES] Value not getting stored in registry

2014-11-15 Thread Rajith Vitharana
Hi Himasha,

Yes I tried with ES-2.0.0-SNAPSHOT. It seems, the content comes as a
stream. As you have mentioned, it gets stored correctly in the registry.
When you read it, although you can't see it in the json output you have
seen in the browser, the content is there. I tried reading the content
separately and convert it to string, and it worked for me. Read the content
and convert it to string as below,

var output = ''+result.content;

Thanks,

On Fri, Nov 14, 2014 at 8:57 PM, Himasha Guruge himas...@wso2.com wrote:

 Hi,

 A small addition, though following code gives above output, when i check
 for path location using management console, the value is stored.

 var result = userReg.get(path);

 print(result);


 Thanks  Regards,

 On Sat, Nov 15, 2014 at 10:18 AM, Himasha Guruge himas...@wso2.com
 wrote:

 Hi Rajitha,

 Did you try it with ES -2.0.0-SNAPSHOT ? I tried the exact sample that is
 provided here, but still the content and properties fields are passed as
 empty as shown below.

 Retrived Resource : {created : {author : admin, time :
 1416026845474}, content : {}, id : /_system/config/wso2/sample,
 version : 3885, uuid : 0123, path : /_system/config/wso2/sample,
 name : sample, description : This is a sample description,
 updated : {author : admin, time : 1416026845474}, mediaType :
 text/plain, properties : {}, aspects : {}}

 Thanks,

 On Sat, Nov 15, 2014 at 3:30 AM, Rajith Vitharana raji...@wso2.com
 wrote:

 Hi Himasha,

 You can try creating the resource as below

 var resource ={
 content: 'This is a sample text.',
 mediaType: 'text/plain',
 description: 'This is a sample description',
 uuid: '0123',
 properties:{prop1: 'val1', prop2: 'val2'}
 };
 userReg.put(path,resource);

 you can add the content you are retrieving from the request, inside this
 resource. I tried out this and it worked fine for me. Resource is correctly
 stored in registry. You can look in to [1] for more info.

 [1] - http://jaggeryjs.org/documentation.jag?api=registry

 Thanks,

 On Fri, Nov 14, 2014 at 3:04 AM, Himasha Guruge himas...@wso2.com
 wrote:

 Hi All,

 For one of the tasks in my training project, I need to save xml content
 in the registry. I have created a .jag file [1] under apis folder, and
 trying to store the content in registry under a given path as follows.

 var path = '/_system/governance/'+processName; // path of content
 var content=req.getParameter('content');  //actual xml content to be
 stored
 userReg.put(path,content);

 When I try to log the path[2], for attribute 'content' it is shown as
 empty. Also when I check content  for the respective path using Management
 console , no value is stored. But when I try to log the  content variable(
 value I get from req.getParameter('content') )  value is shown which means
 that  the variable has the required value in it. Just that it is not stored
 in registry.

 I'm using ES-2.0.0-SNAPSHOT. Any idea  on the reason behind this?


 [1]​​​
  chevronxml.jag
 https://docs.google.com/a/wso2.com/file/d/0B2gZ09XLMRjKMkFQc1ZJckJMNFE/edit?usp=drive_web
 ​
 [2]
 ​
  valueOfPath
 https://docs.google.com/a/wso2.com/file/d/0B2gZ09XLMRjKMm1aTW9CcnpLMDg/edit?usp=drive_web
 ​

 --
 Himasha Guruge
 *Software Engineer*
 WS*O2* *Inc.*
 Mobile: +94 777459299
 himas...@wso2.com

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




 --
 Rajith Vitharana

 Software Engineer,
 WSO2 Inc. : wso2.com
 Mobile : +94715883223
 Blog : http://lankavitharana.blogspot.com/




 --
 Himasha Guruge
 *Software Engineer*
 WS*O2* *Inc.*
 Mobile: +94 777459299
 himas...@wso2.com




 --
 Himasha Guruge
 *Software Engineer*
 WS*O2* *Inc.*
 Mobile: +94 777459299
 himas...@wso2.com




-- 
Rajith Vitharana

Software Engineer,
WSO2 Inc. : wso2.com
Mobile : +94715883223
Blog : http://lankavitharana.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 MB - To Be Dones I tracked so far

2014-11-15 Thread Indika Sampath
On Sat, Nov 15, 2014 at 10:01 PM, Ramith Jayasinghe ram...@wso2.com wrote:


 On Sat, Nov 15, 2014 at 1:40 PM, Hasitha Hiranya hasit...@wso2.com
 wrote:

 Hi Team,

 Following are tasks TBD for M2 and M3 releases of MB.
 Thought of flushing my mind with the tasks that came up with last code
 review and some last for some time.


 1. Add a warning if parts cache is growing. (Done)
 2. Make message status block capital (Done)
 3. Make message status commented (TBD)

 4. Remove msgId2MsgData auto removal of IDs. And make it a
 concurrentHashMap. (Done)

 5. Move Sent and Sent all status setting to correct places ().

 6. Make send() of subscription impl logic free. If an exception came from
 there, catch it and do the work within QDW class. Need to define proper
 exceptions on why sending to subscriber failed (DLC sending if delivery
 rules failed, if exception came when sending try another subscriber if
 available, if not move them over in store with a new messageID, but keeping
 the old id somehow) (This is a task. Need to assign somebody).


 7. When all nodes in the cluster is gone make the index again (Done by
 AsankaAb)

 8. We decided to keep Acked by all and sent to all status, did not we? No
 need to write what Ramith suggested now.

 yes.

 9. Add a delay when trying to delete slot to get over with Edge Case
 brought out by Indika (Is it solved now? Problem was elsewhere?)

 after the last perf tests we did, problem doesn't occur on H2, only with
 Cassandra ( CQL and Hector both). This is a real and Massive L1


This is fixed in cql. Problem with range query. Will do change in hector
too.



 10. Need to run all topic test cases and make them pass.

 11. Need to introduce new ack handle mechanism (QOS 0,1,2) and AMQP ack
 means one of those.  AMQP transactions, client acks also come into play
 here.  We need to be careful. (This is a task. Should be assigned to
 somebody).



 12. We still did not review purge and queue delete. Should be done soon.
 Topic deletion should be integrated with it. HasithaA can you schedule a
 review?

 +1

 13. Hector code is committed now. We can choose hector or cql from config
 level. Are we maintaining both now? WDYT?


 My Opinion is we can keep both (atleast at this stage)


This is config level option. Only need is enable necessary datasource and
provider in master-datasources.xml and messageStore and
andesContextStore in andes-virtualhosts.xml. Shall we come to conclusion
after doing performance comparison ?



 14. Need to fix packaging someday.

 I suggest one of us do this and commit (big bang).


 15. Topic cluster wide tests needs to be written. There is a considerable
 number of scenarios.

 Shall we come up with scenarios (in a doc may be). the distribute.

 16. Topic ack and requeing should be verified with the spec. Should we
 requeue topic messages if rejected by client, or if delivery failed? How
 this affect to MQTT impl?


 +1 lets check with the spec, and then chat

 17. MQTT cluster tests needs to be written.

 Again lets see what are the scenarios and decide on a scope


 18. Puppetizing MB deployment? Did we make any progress?

 We haven't done anything here. I checked with our cloud team there some
 puppet template written for 2.2.0 also. However, we are waiting on the
 initiative from automation team.


 19. Remove zookeeper, node queue, qlobal queue, queueAddress, topic
 delivery worker concepts completely from the code.



 20. We Must test and fix message counting. With concurrent publishers and
 subscribers we still have message counting probs.

 Lets open L2s for these to keep track.

 21. Apply config revamp.

 Hasitha Amal can comment on this

 Suppose we can go to M2 when these are done.



 For M3

 1. Fix all the UIs. This will take a considerable effort.



 2. Merge remaining fixes from 2.2.0.


 And we need to keep on testing end to end fix issues ( M3 should have been
 all about bring stability, BUT  given that there could be some other
 features/requirements we might have to deliver with v 3.0.0 - something we
 will decide next week)





 Thanks


 --
 *Hasitha Abeykoon*
 Senior Software Engineer; WSO2, Inc.; http://wso2.com
 *cell:* *+94 719363063*
 *blog: **abeykoon.blogspot.com* http://abeykoon.blogspot.com




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

 E: ram...@wso2.com
 P: +94 777542851




-- 
Indika Sampath
Software Engineer
WSO2 Inc.
http://wso2.com

Phone: +94 716 424 744
Blog: http://indikasampath.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to restrict accessing web application

2014-11-15 Thread Danesh Kuruppu
Thanks Johann, I will check

On Sat, Nov 15, 2014 at 7:37 AM, Johann Nallathamby joh...@wso2.com wrote:



 On Sat, Nov 15, 2014 at 7:32 AM, Johann Nallathamby joh...@wso2.com
 wrote:

 Carbon products follow a fine-grained permission based approach. So first
 you should define relevant set of permissions for your webapp. Then you
 should be able to enforce access control using the authentication and
 authorization facilities provided by the OSGi realm service.


 Actually not the OSGi service, but you can get it from CarbonConext as
 follows.

 CarbonContext.getThreadLocalCarbonContext().getUserRealm()


 On Fri, Nov 14, 2014 at 8:08 AM, Danesh Kuruppu dan...@wso2.com wrote:

 Hi all,

 I am currently working on upgrading the solr in registry indexing. with
 the proposed design, we are going to deploy solr webapp in the carbon
 server and use it for registry indexing and we need to allow accessing solr
 web app only for admin users.

 What is the best way I could follow to restrict the web app access in
 carbon server.

 Thanks
 --

 Danesh Kuruppu
 Software Engineer
 WSO2 Inc,
 Mobile: +94 (77) 1690552

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




 --
 Thanks  Regards,

 *Johann Dilantha Nallathamby*
 Associate Technical Lead  Product Lead of WSO2 Identity Server
 Integration Technologies Team
 WSO2, Inc.
 lean.enterprise.middleware

 Mobile - *+9476950*
 Blog - *http://nallaa.wordpress.com http://nallaa.wordpress.com*




 --
 Thanks  Regards,

 *Johann Dilantha Nallathamby*
 Associate Technical Lead  Product Lead of WSO2 Identity Server
 Integration Technologies Team
 WSO2, Inc.
 lean.enterprise.middleware

 Mobile - *+9476950*
 Blog - *http://nallaa.wordpress.com http://nallaa.wordpress.com*




-- 

Danesh Kuruppu
Software Engineer
WSO2 Inc,
Mobile: +94 (77) 1690552
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ES] Value not getting stored in registry

2014-11-15 Thread Himasha Guruge
Hi Rajith,

Thanks a lot, it worked.

Thanks  Regards,

On Sun, Nov 16, 2014 at 3:49 AM, Rajith Vitharana raji...@wso2.com wrote:

 Hi Himasha,

 Yes I tried with ES-2.0.0-SNAPSHOT. It seems, the content comes as a
 stream. As you have mentioned, it gets stored correctly in the registry.
 When you read it, although you can't see it in the json output you have
 seen in the browser, the content is there. I tried reading the content
 separately and convert it to string, and it worked for me. Read the content
 and convert it to string as below,

 var output = ''+result.content;

 Thanks,

 On Fri, Nov 14, 2014 at 8:57 PM, Himasha Guruge himas...@wso2.com wrote:

 Hi,

 A small addition, though following code gives above output, when i check
 for path location using management console, the value is stored.

 var result = userReg.get(path);

 print(result);


 Thanks  Regards,

 On Sat, Nov 15, 2014 at 10:18 AM, Himasha Guruge himas...@wso2.com
 wrote:

 Hi Rajitha,

 Did you try it with ES -2.0.0-SNAPSHOT ? I tried the exact sample that
 is provided here, but still the content and properties fields are passed as
 empty as shown below.

 Retrived Resource : {created : {author : admin, time :
 1416026845474}, content : {}, id : /_system/config/wso2/sample,
 version : 3885, uuid : 0123, path : /_system/config/wso2/sample,
 name : sample, description : This is a sample description,
 updated : {author : admin, time : 1416026845474}, mediaType :
 text/plain, properties : {}, aspects : {}}

 Thanks,

 On Sat, Nov 15, 2014 at 3:30 AM, Rajith Vitharana raji...@wso2.com
 wrote:

 Hi Himasha,

 You can try creating the resource as below

 var resource ={
 content: 'This is a sample text.',
 mediaType: 'text/plain',
 description: 'This is a sample description',
 uuid: '0123',
 properties:{prop1: 'val1', prop2: 'val2'}
 };
 userReg.put(path,resource);

 you can add the content you are retrieving from the request, inside
 this resource. I tried out this and it worked fine for me. Resource is
 correctly stored in registry. You can look in to [1] for more info.

 [1] - http://jaggeryjs.org/documentation.jag?api=registry

 Thanks,

 On Fri, Nov 14, 2014 at 3:04 AM, Himasha Guruge himas...@wso2.com
 wrote:

 Hi All,

 For one of the tasks in my training project, I need to save xml
 content in the registry. I have created a .jag file [1] under apis folder,
 and trying to store the content in registry under a given path as follows.

 var path = '/_system/governance/'+processName; // path of content
 var content=req.getParameter('content');  //actual xml content to be
 stored
 userReg.put(path,content);

 When I try to log the path[2], for attribute 'content' it is shown as
 empty. Also when I check content  for the respective path using Management
 console , no value is stored. But when I try to log the  content variable(
 value I get from req.getParameter('content') )  value is shown which means
 that  the variable has the required value in it. Just that it is not 
 stored
 in registry.

 I'm using ES-2.0.0-SNAPSHOT. Any idea  on the reason behind this?


 [1]​​​
  chevronxml.jag
 https://docs.google.com/a/wso2.com/file/d/0B2gZ09XLMRjKMkFQc1ZJckJMNFE/edit?usp=drive_web
 ​
 [2]
 ​
  valueOfPath
 https://docs.google.com/a/wso2.com/file/d/0B2gZ09XLMRjKMm1aTW9CcnpLMDg/edit?usp=drive_web
 ​

 --
 Himasha Guruge
 *Software Engineer*
 WS*O2* *Inc.*
 Mobile: +94 777459299
 himas...@wso2.com

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




 --
 Rajith Vitharana

 Software Engineer,
 WSO2 Inc. : wso2.com
 Mobile : +94715883223
 Blog : http://lankavitharana.blogspot.com/




 --
 Himasha Guruge
 *Software Engineer*
 WS*O2* *Inc.*
 Mobile: +94 777459299
 himas...@wso2.com




 --
 Himasha Guruge
 *Software Engineer*
 WS*O2* *Inc.*
 Mobile: +94 777459299
 himas...@wso2.com




 --
 Rajith Vitharana

 Software Engineer,
 WSO2 Inc. : wso2.com
 Mobile : +94715883223
 Blog : http://lankavitharana.blogspot.com/




-- 
Himasha Guruge
*Software Engineer*
WS*O2* *Inc.*
Mobile: +94 777459299
himas...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 MB - To Be Dones I tracked so far

2014-11-15 Thread Hasitha Hiranya
Hi Team,

I Removed

1. nodeQueues
2. GlobalQueues
3. QueueAddress
4. TopicDeliveryWorker
5. Unnecessary column families created by CQL Message store.

and committed. A few things to note:

1. MessageDeliveryThreadHandler has some unused methods now as
TopicDeliveryWorker was removed. Need to review. (@HasithaA, any ideas?)
2. ClusterManager's globalQueueSyncId now renamed to nodeSyncID. Actually
do we need it now? (@Sajini, WDYT?)

Thanks

On Sun, Nov 16, 2014 at 6:45 AM, Indika Sampath indi...@wso2.com wrote:

 On Sat, Nov 15, 2014 at 10:01 PM, Ramith Jayasinghe ram...@wso2.com
 wrote:


 On Sat, Nov 15, 2014 at 1:40 PM, Hasitha Hiranya hasit...@wso2.com
 wrote:

 Hi Team,

 Following are tasks TBD for M2 and M3 releases of MB.
 Thought of flushing my mind with the tasks that came up with last code
 review and some last for some time.


 1. Add a warning if parts cache is growing. (Done)
 2. Make message status block capital (Done)
 3. Make message status commented (TBD)

 4. Remove msgId2MsgData auto removal of IDs. And make it a
 concurrentHashMap. (Done)

 5. Move Sent and Sent all status setting to correct places ().

 6. Make send() of subscription impl logic free. If an exception came
 from there, catch it and do the work within QDW class. Need to define
 proper exceptions on why sending to subscriber failed (DLC sending if
 delivery rules failed, if exception came when sending try another
 subscriber if available, if not move them over in store with a new
 messageID, but keeping the old id somehow) (This is a task. Need to assign
 somebody).


 7. When all nodes in the cluster is gone make the index again (Done by
 AsankaAb)

 8. We decided to keep Acked by all and sent to all status, did not we?
 No need to write what Ramith suggested now.

 yes.

 9. Add a delay when trying to delete slot to get over with Edge Case
 brought out by Indika (Is it solved now? Problem was elsewhere?)

 after the last perf tests we did, problem doesn't occur on H2, only with
 Cassandra ( CQL and Hector both). This is a real and Massive L1


 This is fixed in cql. Problem with range query. Will do change in hector
 too.



 10. Need to run all topic test cases and make them pass.

 11. Need to introduce new ack handle mechanism (QOS 0,1,2) and AMQP ack
 means one of those.  AMQP transactions, client acks also come into play
 here.  We need to be careful. (This is a task. Should be assigned to
 somebody).



 12. We still did not review purge and queue delete. Should be done soon.
 Topic deletion should be integrated with it. HasithaA can you schedule a
 review?

 +1

 13. Hector code is committed now. We can choose hector or cql from
 config level. Are we maintaining both now? WDYT?


 My Opinion is we can keep both (atleast at this stage)


 This is config level option. Only need is enable necessary datasource
 and provider in master-datasources.xml and messageStore and
 andesContextStore in andes-virtualhosts.xml. Shall we come to conclusion
 after doing performance comparison ?



 14. Need to fix packaging someday.

 I suggest one of us do this and commit (big bang).


 15. Topic cluster wide tests needs to be written. There is a
 considerable number of scenarios.

 Shall we come up with scenarios (in a doc may be). the distribute.

 16. Topic ack and requeing should be verified with the spec. Should we
 requeue topic messages if rejected by client, or if delivery failed? How
 this affect to MQTT impl?


 +1 lets check with the spec, and then chat

 17. MQTT cluster tests needs to be written.

 Again lets see what are the scenarios and decide on a scope


 18. Puppetizing MB deployment? Did we make any progress?

 We haven't done anything here. I checked with our cloud team there some
 puppet template written for 2.2.0 also. However, we are waiting on the
 initiative from automation team.


 19. Remove zookeeper, node queue, qlobal queue, queueAddress, topic
 delivery worker concepts completely from the code.



 20. We Must test and fix message counting. With concurrent publishers
 and subscribers we still have message counting probs.

 Lets open L2s for these to keep track.

 21. Apply config revamp.

 Hasitha Amal can comment on this

 Suppose we can go to M2 when these are done.



 For M3

 1. Fix all the UIs. This will take a considerable effort.



 2. Merge remaining fixes from 2.2.0.


 And we need to keep on testing end to end fix issues ( M3 should have
 been all about bring stability, BUT  given that there could be some other
 features/requirements we might have to deliver with v 3.0.0 - something we
 will decide next week)





 Thanks


 --
 *Hasitha Abeykoon*
 Senior Software Engineer; WSO2, Inc.; http://wso2.com
 *cell:* *+94 719363063*
 *blog: **abeykoon.blogspot.com* http://abeykoon.blogspot.com




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

 E: ram...@wso2.com
 P: +94 777542851




 --
 Indika Sampath
 Software Engineer
 WSO2 Inc.
 

Re: [Dev] WSO2 MB - To Be Dones I tracked so far

2014-11-15 Thread Hasitha Hiranya
Hi Sewwandi,

Noticed that you have moved CQL related things to a package called cql.

Please make sure you update andes-virtualhost.xml file with correct fully
qualified class name. Update Asitha's store configuration doc as well. If
you have already done, please ignore :)

Configuration revamp by HasithaA should capture this as well.

Thanks

On Sun, Nov 16, 2014 at 10:36 AM, Hasitha Hiranya hasit...@wso2.com wrote:

 Hi Team,

 I Removed

 1. nodeQueues
 2. GlobalQueues
 3. QueueAddress
 4. TopicDeliveryWorker
 5. Unnecessary column families created by CQL Message store.

 and committed. A few things to note:

 1. MessageDeliveryThreadHandler has some unused methods now as
 TopicDeliveryWorker was removed. Need to review. (@HasithaA, any ideas?)
 2. ClusterManager's globalQueueSyncId now renamed to nodeSyncID. Actually
 do we need it now? (@Sajini, WDYT?)

 Thanks

 On Sun, Nov 16, 2014 at 6:45 AM, Indika Sampath indi...@wso2.com wrote:

 On Sat, Nov 15, 2014 at 10:01 PM, Ramith Jayasinghe ram...@wso2.com
 wrote:


 On Sat, Nov 15, 2014 at 1:40 PM, Hasitha Hiranya hasit...@wso2.com
 wrote:

 Hi Team,

 Following are tasks TBD for M2 and M3 releases of MB.
 Thought of flushing my mind with the tasks that came up with last code
 review and some last for some time.


 1. Add a warning if parts cache is growing. (Done)
 2. Make message status block capital (Done)
 3. Make message status commented (TBD)

 4. Remove msgId2MsgData auto removal of IDs. And make it a
 concurrentHashMap. (Done)

 5. Move Sent and Sent all status setting to correct places ().

 6. Make send() of subscription impl logic free. If an exception came
 from there, catch it and do the work within QDW class. Need to define
 proper exceptions on why sending to subscriber failed (DLC sending if
 delivery rules failed, if exception came when sending try another
 subscriber if available, if not move them over in store with a new
 messageID, but keeping the old id somehow) (This is a task. Need to assign
 somebody).


 7. When all nodes in the cluster is gone make the index again (Done by
 AsankaAb)

 8. We decided to keep Acked by all and sent to all status, did not we?
 No need to write what Ramith suggested now.

 yes.

 9. Add a delay when trying to delete slot to get over with Edge Case
 brought out by Indika (Is it solved now? Problem was elsewhere?)

 after the last perf tests we did, problem doesn't occur on H2, only
 with Cassandra ( CQL and Hector both). This is a real and Massive L1


 This is fixed in cql. Problem with range query. Will do change in hector
 too.



 10. Need to run all topic test cases and make them pass.

 11. Need to introduce new ack handle mechanism (QOS 0,1,2) and AMQP ack
 means one of those.  AMQP transactions, client acks also come into play
 here.  We need to be careful. (This is a task. Should be assigned to
 somebody).



 12. We still did not review purge and queue delete. Should be done
 soon. Topic deletion should be integrated with it. HasithaA can you
 schedule a review?

 +1

 13. Hector code is committed now. We can choose hector or cql from
 config level. Are we maintaining both now? WDYT?


 My Opinion is we can keep both (atleast at this stage)


 This is config level option. Only need is enable necessary datasource
 and provider in master-datasources.xml and messageStore and
 andesContextStore in andes-virtualhosts.xml. Shall we come to conclusion
 after doing performance comparison ?



 14. Need to fix packaging someday.

 I suggest one of us do this and commit (big bang).


 15. Topic cluster wide tests needs to be written. There is a
 considerable number of scenarios.

 Shall we come up with scenarios (in a doc may be). the distribute.

 16. Topic ack and requeing should be verified with the spec. Should we
 requeue topic messages if rejected by client, or if delivery failed? How
 this affect to MQTT impl?


 +1 lets check with the spec, and then chat

 17. MQTT cluster tests needs to be written.

 Again lets see what are the scenarios and decide on a scope


 18. Puppetizing MB deployment? Did we make any progress?

 We haven't done anything here. I checked with our cloud team there some
 puppet template written for 2.2.0 also. However, we are waiting on the
 initiative from automation team.


 19. Remove zookeeper, node queue, qlobal queue, queueAddress, topic
 delivery worker concepts completely from the code.



 20. We Must test and fix message counting. With concurrent publishers
 and subscribers we still have message counting probs.

 Lets open L2s for these to keep track.

 21. Apply config revamp.

 Hasitha Amal can comment on this

 Suppose we can go to M2 when these are done.



 For M3

 1. Fix all the UIs. This will take a considerable effort.



 2. Merge remaining fixes from 2.2.0.


 And we need to keep on testing end to end fix issues ( M3 should have
 been all about bring stability, BUT  given that there could be some other
 features/requirements we might have to deliver 

Re: [Dev] [ES] Value not getting stored in registry

2014-11-15 Thread Himasha Guruge
Hi Rajith,

Just a quick note in case it worked for you. When I try to retrieve the
content using another ajax GET call, the print() doesn't display anything.
But the value is logged as expected. The code is as follows.

if(type==GET)
{
var path = '/_system/governance/'+processName;
var result=userReg.get(path);
 var output= result.content;

print(output);
log.info('RESULT'+ result.content);



}

Also I tried to print other properties of the resource such as
'result.description' and the value gets printed. Please find the attached
.jag file. Am I doing something wrong here?

Thanks,  Regards,
Himasha

On Sun, Nov 16, 2014 at 8:35 AM, Himasha Guruge himas...@wso2.com wrote:

 Hi Rajith,

 Thanks a lot, it worked.

 Thanks  Regards,

 On Sun, Nov 16, 2014 at 3:49 AM, Rajith Vitharana raji...@wso2.com
 wrote:

 Hi Himasha,

 Yes I tried with ES-2.0.0-SNAPSHOT. It seems, the content comes as a
 stream. As you have mentioned, it gets stored correctly in the registry.
 When you read it, although you can't see it in the json output you have
 seen in the browser, the content is there. I tried reading the content
 separately and convert it to string, and it worked for me. Read the content
 and convert it to string as below,

 var output = ''+result.content;

 Thanks,

 On Fri, Nov 14, 2014 at 8:57 PM, Himasha Guruge himas...@wso2.com
 wrote:

 Hi,

 A small addition, though following code gives above output, when i check
 for path location using management console, the value is stored.

 var result = userReg.get(path);

 print(result);


 Thanks  Regards,

 On Sat, Nov 15, 2014 at 10:18 AM, Himasha Guruge himas...@wso2.com
 wrote:

 Hi Rajitha,

 Did you try it with ES -2.0.0-SNAPSHOT ? I tried the exact sample that
 is provided here, but still the content and properties fields are passed as
 empty as shown below.

 Retrived Resource : {created : {author : admin, time :
 1416026845474}, content : {}, id : /_system/config/wso2/sample,
 version : 3885, uuid : 0123, path : /_system/config/wso2/sample,
 name : sample, description : This is a sample description,
 updated : {author : admin, time : 1416026845474}, mediaType :
 text/plain, properties : {}, aspects : {}}

 Thanks,

 On Sat, Nov 15, 2014 at 3:30 AM, Rajith Vitharana raji...@wso2.com
 wrote:

 Hi Himasha,

 You can try creating the resource as below

 var resource ={
 content: 'This is a sample text.',
 mediaType: 'text/plain',
 description: 'This is a sample description',
 uuid: '0123',
 properties:{prop1: 'val1', prop2: 'val2'}
 };
 userReg.put(path,resource);

 you can add the content you are retrieving from the request, inside
 this resource. I tried out this and it worked fine for me. Resource is
 correctly stored in registry. You can look in to [1] for more info.

 [1] - http://jaggeryjs.org/documentation.jag?api=registry

 Thanks,

 On Fri, Nov 14, 2014 at 3:04 AM, Himasha Guruge himas...@wso2.com
 wrote:

 Hi All,

 For one of the tasks in my training project, I need to save xml
 content in the registry. I have created a .jag file [1] under apis 
 folder,
 and trying to store the content in registry under a given path as 
 follows.

 var path = '/_system/governance/'+processName; // path of content
 var content=req.getParameter('content');  //actual xml content to be
 stored
 userReg.put(path,content);

 When I try to log the path[2], for attribute 'content' it is shown as
 empty. Also when I check content  for the respective path using 
 Management
 console , no value is stored. But when I try to log the  content 
 variable(
 value I get from req.getParameter('content') )  value is shown which 
 means
 that  the variable has the required value in it. Just that it is not 
 stored
 in registry.

 I'm using ES-2.0.0-SNAPSHOT. Any idea  on the reason behind this?


 [1]​​​
  chevronxml.jag
 https://docs.google.com/a/wso2.com/file/d/0B2gZ09XLMRjKMkFQc1ZJckJMNFE/edit?usp=drive_web
 ​
 [2]
 ​
  valueOfPath
 https://docs.google.com/a/wso2.com/file/d/0B2gZ09XLMRjKMm1aTW9CcnpLMDg/edit?usp=drive_web
 ​

 --
 Himasha Guruge
 *Software Engineer*
 WS*O2* *Inc.*
 Mobile: +94 777459299
 himas...@wso2.com

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




 --
 Rajith Vitharana

 Software Engineer,
 WSO2 Inc. : wso2.com
 Mobile : +94715883223
 Blog : http://lankavitharana.blogspot.com/




 --
 Himasha Guruge
 *Software Engineer*
 WS*O2* *Inc.*
 Mobile: +94 777459299
 himas...@wso2.com




 --
 Himasha Guruge
 *Software Engineer*
 WS*O2* *Inc.*
 Mobile: +94 777459299
 himas...@wso2.com




 --
 Rajith Vitharana

 Software Engineer,
 WSO2 Inc. : wso2.com
 Mobile : +94715883223
 Blog : http://lankavitharana.blogspot.com/




 --
 Himasha Guruge
 *Software Engineer*
 WS*O2* *Inc.*
 Mobile: +94 777459299
 himas...@wso2.com




-- 
Himasha Guruge
*Software Engineer*
WS*O2* *Inc.*