Re: [Dev] [DAS] Line chart y-axis scale and range problems

2015-09-25 Thread Thanuja Uruththirakodeeswaran
Hi Tharik,

Yes as you said vega chart is drawing the y axis by considering the first
column (here in my case CreatedInstanceCount) as shown in the below image
[1]. As we discussed in offline, in my case I can't define the max value to
some constant as with time interval, member count will vary. Thanks a lot
for the help Tharik.

Thanks.

On Fri, Sep 25, 2015 at 5:53 PM, Thanuja Uruththirakodeeswaran <
thanu...@wso2.com> wrote:

> Hi Nipuna, Tharik,
>
> Thanks a lot for the suggestions. I'll follow your suggestions and let you
> know.
>
> Thanks.
>
> On Fri, Sep 25, 2015 at 5:05 PM, Tharik Kanaka  wrote:
>
>> Hi Thanuja,
>>
>> I have already noticed this in CEP and reported in a JIRA  [1]. This only
>> happens when you multiple lines to chart. Root cause for this is that Vega
>> chart will draw the Y axis by considering only first column values. In your
>> case it has considered "CreatedInstanceCount" where as other lines are
>> plotted outside.
>>
>> You will see decimals since Y axis meant to plot 10 points since maximum
>> value is 5, it is plotted by 0.5. It will not happen if maximum value
>> becomes large number such as 50 where as plotting will happen by 5, 10, 15
>> and so on.
>>
>> [1] https://wso2.org/jira/browse/CEP-1387
>>
>> On Fri, Sep 25, 2015 at 4:27 PM, Nipuna Chandradasa 
>> wrote:
>>
>>> Hi Thanuja,
>>>
>>> Quick fix for few of these problems.
>>>
>>> For the 1st one check the domain which define the range of the y scale.
>>>  may be they are given in decimals.
>>>
>>> most of the time y axis value range is mapped with the height of the SVG
>>> element. if you can quickly look in to it and just adjust the width of the
>>> SVG element or change the range mapping value in y scale u may be able to
>>> solve 2nd issue.
>>>
>>>
>>> Thanks.
>>>
>>>
>>> On Fri, Sep 25, 2015 at 4:05 PM, Thanuja Uruththirakodeeswaran <
>>> thanu...@wso2.com> wrote:
>>>
 Hi All,

 I'm generating a line chart to show details with DAS analytics
 dashboard using Line Chart Gadgets as below. ​This line chart uses D3
 library and Vega.



 Here I'm facing following problems:
 1. Even though member count values (Y axis values) are integers, in
 this chart axis values are populated as decimals and I tried to use 'round'
 property for y axis configuration and couldn't fix it.

 2. Also y axis value range is also limited to 5 as shown above

 3. As shown in the below image, tool-tip pop y axis value shown as
 undefined and sometimes tool-tips are not removed.



 I discussed these issues with Dunith also. It will be helpful if these
 issues are fixed.

 Thanks.

 --
 Thanuja Uruththirakodeeswaran
 Software Engineer
 WSO2 Inc.;http://wso2.com
 lean.enterprise.middleware

 mobile: +94 774363167

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


>>>
>>>
>>> --
>>> Nipuna Marcus
>>> *Software Engineer*
>>> WSO2 Inc.
>>> http://wso2.com/ - "lean . enterprise . middleware"
>>> Mobile : +94 (0) 713 667906
>>> nipu...@wso2.com
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> *Tharik Kanaka*
>>
>> WSO2, Inc |#20, Palm Grove, Colombo 03, Sri Lanka
>>
>> Email: tha...@wso2.com | Web: www.wso2.com
>>
>
>
>
> --
> Thanuja Uruththirakodeeswaran
> Software Engineer
> WSO2 Inc.;http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 774363167
>



-- 
Thanuja Uruththirakodeeswaran
Software Engineer
WSO2 Inc.;http://wso2.com
lean.enterprise.middleware

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


[Dev] WSO2 Developer Studio 3.8.0 Beta Released!

2015-09-25 Thread Gayan Yalpathwala
Hi All,

We have WSO2 Developer Studio 3.8.0 Beta ready to be downloaded at [1] and
installed eclipse distributions available at [2]. This release includes
following tasks, sub-tasks, improvements and bug fixes.

*Tasks*

   - [TOOLS-2786 ] - A new maven
   plugin to pre-prepare for package goal
   - [TOOLS-3083 ] - Update "WSO2
   Classpath Libraries" properly after adding ESB 4.9.0 released Jars.
   - [TOOLS-3180 ] - Remove CEP
   Project from Developer Studio


*Sub-tasks*

   - [TOOLS-1778 ] - Remove the
   default connection arrows


*Improvements*

   - [TOOLS-2785 ] - Refactoring
   maven-tools repository
   - [TOOLS-2927 ] - JDBC and
   RabbitMQ message store types are not available in message store types
   dropdown.
   - [TOOLS-3074 ] - Connector
   Project - Add connector file path improvement
   - [TOOLS-3103 ] - List
   available properties for Property mediator's Property name
   - [TOOLS-3143 ] - AF
   Perspective UI Improvements


*Bugs*

   - [TOOLS-1954 ] - DevStudio -
   GReg Project fails to commit changes
   - [TOOLS-2176 ] - Provide zoom
   in zoom out feature in ESB Graphical editor
   - [TOOLS-2208 ] -
   AccountServiceSampleProject contains build-path issues
   - [TOOLS-2307 ] - When
   importing a 'template' and 'REST API artifact' the Specified configuration
   file location is not validating properly
   - [TOOLS-2475 ] - In Local
   Entry the value is not validating properly in when Local entry type is
   "In-Lined XML"
   - [TOOLS-2555 ] - Closing a
   project does not close it's child projects. Have to close each and every
   project individually even if they are belong to one parent project (Maven
   Multi Module Project)
   - [TOOLS-2581 ] - Mac
   installation of Dev Studio needs to work out-of-box
   - [TOOLS-2642 ] - Give a UI
   menu to remove installed connector
   - [TOOLS-2654 ] - Unable to
   delete registry resource on first attempt
   - [TOOLS-2665 ] - Call mediator
   graphical view wont change on endpoint type changing from property window
   - [TOOLS-2667 ] - XQuery
   mediator Target source path attributes added from property window not shown
   in the source view
   - [TOOLS-2673 ] - Typo in XPath
   - [TOOLS-2691 ] - When
   deserializing the security scenarios, security scenario option button is
   not getting updated properly
   - [TOOLS-2698 ] - Unable to see
   project dependencies when creating a CApp project in Mac OS X Yosemite
   - [TOOLS-2710 ] - Unable to
   save HTTP endpoint with an expression for a Property.
   - [TOOLS-2733 ] - Support Maven
   Artifact Token Replacement in wso2-esb-task-plugin
   - [TOOLS-2746 ] - Deleting the
   default child endpoint of Load-balancer endpoint will create unexpected
   behaviors in Dev Studio.
   - [TOOLS-2747 ] - Imported
   endpoint templates in dev studio, are picked up as sequence templates once
   CAR is deployed.
   - [TOOLS-2755 ] - Maven -
   Incorrect folder structure created when building the Data Service Project
   - [TOOLS-2756 ] - Eclipse
   doesn't save the Endpoint Template with parameters
   - [TOOLS-2778 ] - DevStudio
   3.7.1 rewrites project pom file when adding new resource
   - [TOOLS-2798 ] - Inline WSDL
   does not get persisted
   - [TOOLS-2832 ] - Named
   endpoint and sequence double click event doesn't work in registry projects.
   - [TOOLS-2833 ] - Duplicate
   warning messages for kerberos authentication validation in security form
   editor
   - [TOOLS-2834 ] - Persistence
   issues in service principal name on page change event
   - [TOOLS-2835 ] - Security form
   editor 

Re: [Dev] [DAS] Line chart y-axis scale and range problems

2015-09-25 Thread Nipuna Chandradasa
Hi Thanuja,

Quick fix for few of these problems.

For the 1st one check the domain which define the range of the y scale.
 may be they are given in decimals.

most of the time y axis value range is mapped with the height of the SVG
element. if you can quickly look in to it and just adjust the width of the
SVG element or change the range mapping value in y scale u may be able to
solve 2nd issue.


Thanks.


On Fri, Sep 25, 2015 at 4:05 PM, Thanuja Uruththirakodeeswaran <
thanu...@wso2.com> wrote:

> Hi All,
>
> I'm generating a line chart to show details with DAS analytics dashboard
> using Line Chart Gadgets as below. ​This line chart uses D3 library and
> Vega.
>
>
>
> Here I'm facing following problems:
> 1. Even though member count values (Y axis values) are integers, in this
> chart axis values are populated as decimals and I tried to use 'round'
> property for y axis configuration and couldn't fix it.
>
> 2. Also y axis value range is also limited to 5 as shown above
>
> 3. As shown in the below image, tool-tip pop y axis value shown as
> undefined and sometimes tool-tips are not removed.
>
>
>
> I discussed these issues with Dunith also. It will be helpful if these
> issues are fixed.
>
> Thanks.
>
> --
> Thanuja Uruththirakodeeswaran
> Software Engineer
> WSO2 Inc.;http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 774363167
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Nipuna Marcus
*Software Engineer*
WSO2 Inc.
http://wso2.com/ - "lean . enterprise . middleware"
Mobile : +94 (0) 713 667906
nipu...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Architecture] WSO2 Message Broker 3.0.0 Alpha-3 Released !

2015-09-25 Thread Sasikala Kottegoda
Hi All,

WSO2 MB Team is pleased to announce the release of WSO2 Message Broker
3.0.0-Alpha3. You can now download the distribution which is available at
[1].

This version adds the following feature apart from the bugs and fixes:

   - Implement/Test multi tenancy for MQTT

Following are the bug fixes, improvements and tasks that have been fixed
along with this release.
Bugs:

   - [MB-762 ] - Messages are not sent
   to dead letter channel when a JMS session is recovered.
   - [MB-1023 ] - Generate h2
   in-memory database tables from h2-mb.sql
   - [MB-1076 ] - User with no
   publish rights for a queue will see a popup "published successfully" if
   messages are published via console
   - [MB-1131 ] - Add a queue after a
   delay of 2 minutes in add queue section shows an error message
   - [MB-1158 ] - H2 in-memory
   exception when shutting down server
   - [MB-1172 ] - Clean up all non
   durable topic/queue subscriptions when starting cluster
   - [MB-1180 ] - Messaging using
   MQTT using tenant users work only after login to the management console
   - [MB-1183 ] - MB Stops working if
   2 or more subscribers join with same client ID in MQTT
   - [MB-1191 ] - UI Message Browser
   not showing all messages
   - [MB-1200 ] - Error publishing
   topic messages through UI
   - [MB-1203 ] - Subscriber cannot
   receive messages after a MB failover
   - [MB-1205 ] - Build test fails
   with an NPE in DurableTopicServerRestartTestCase
   - [MB-1211 ] - ValueEvent
   exception on disruptor if multiple MQTT publishers with same client id
   start publish messages
   - [MB-1218 ] - DLCQueueTestCase
   fails with a message ID mismatch
   - [MB-1220 ] - Retrieving large
   messages from cache throws an exception
   - [MB-1221 ] - MQTT publishers can
   use the same client ID
   - [MB-1223 ] -
   ConcurrentModificationException when publisher/subscriber create and close
   connection on each message
   - [MB-1224 ] - Create a database
   script for Oracle RAC
   - [MB-1225 ] - Null displayed for
   Topic Name for Topic Subscriptions in MC
   - [MB-1226 ] - A message added via
   MC to a Queue is displayed as non persistent when it is persistent
   - [MB-1227 ] - "Queue added
   successfully" is displayed when you Update a queue
   - [MB-1228 ] - Intermittent
   message loss in MQTT subscriber (QOS 0, clean session false)
   - [MB-1229 ] -
   "AndesAdminServiceBrokerManagerAdminException" text is displayed in an
   error message
   - [MB-1233 ] - UI test failure on
   java 8
   - [MB-1238 ] - Force Restart
   doesn't work with java8
   - [MB-1242 ] - Add cluster test
   cases for MQTT
   - [MB-1243 ] - Cannot add a Queue
   with role permission with java8
   - [MB-1246 ] - Durable subscriber
   unable to fail-over when nodeID is set in broker.xml
   - [MB-1247 ] - Cannot start MB
   instances with Oracle 12c - Error occurred while executing : CREATE TABLE
   MB_METADATA
   - [MB-1250 ] - upgrade to
   carbon-identity 4.5.6
   - [MB-1254 ] - NPE when deleting
   messages from DLC
   - [MB-1260 ] -
   NullPointerException thrown when starting the MB pack
   - [MB-1265 ] - Hyphen is getting
   append to the role name when add topic via topic browser
   - [MB-1269 ] - Tenant Topic/Queue
   roles creating method is not consistent
   - [MB-1270 ] - Cannot access the
   entire Queues section when only a selected permission set is enabled in
   permission tree
   - [MB-1274 ] - When update the
   permission, duplicate role is getting created
   - [MB-1277 ] -
   DurableTopicsSubscribtion gets permanently active when shutdown the server
   

Re: [Dev] [DAS] Line chart y-axis scale and range problems

2015-09-25 Thread Tharik Kanaka
Hi Thanuja,

I have already noticed this in CEP and reported in a JIRA  [1]. This only
happens when you multiple lines to chart. Root cause for this is that Vega
chart will draw the Y axis by considering only first column values. In your
case it has considered "CreatedInstanceCount" where as other lines are
plotted outside.

You will see decimals since Y axis meant to plot 10 points since maximum
value is 5, it is plotted by 0.5. It will not happen if maximum value
becomes large number such as 50 where as plotting will happen by 5, 10, 15
and so on.

[1] https://wso2.org/jira/browse/CEP-1387

On Fri, Sep 25, 2015 at 4:27 PM, Nipuna Chandradasa 
wrote:

> Hi Thanuja,
>
> Quick fix for few of these problems.
>
> For the 1st one check the domain which define the range of the y scale.
>  may be they are given in decimals.
>
> most of the time y axis value range is mapped with the height of the SVG
> element. if you can quickly look in to it and just adjust the width of the
> SVG element or change the range mapping value in y scale u may be able to
> solve 2nd issue.
>
>
> Thanks.
>
>
> On Fri, Sep 25, 2015 at 4:05 PM, Thanuja Uruththirakodeeswaran <
> thanu...@wso2.com> wrote:
>
>> Hi All,
>>
>> I'm generating a line chart to show details with DAS analytics dashboard
>> using Line Chart Gadgets as below. ​This line chart uses D3 library and
>> Vega.
>>
>>
>>
>> Here I'm facing following problems:
>> 1. Even though member count values (Y axis values) are integers, in this
>> chart axis values are populated as decimals and I tried to use 'round'
>> property for y axis configuration and couldn't fix it.
>>
>> 2. Also y axis value range is also limited to 5 as shown above
>>
>> 3. As shown in the below image, tool-tip pop y axis value shown as
>> undefined and sometimes tool-tips are not removed.
>>
>>
>>
>> I discussed these issues with Dunith also. It will be helpful if these
>> issues are fixed.
>>
>> Thanks.
>>
>> --
>> Thanuja Uruththirakodeeswaran
>> Software Engineer
>> WSO2 Inc.;http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 774363167
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Nipuna Marcus
> *Software Engineer*
> WSO2 Inc.
> http://wso2.com/ - "lean . enterprise . middleware"
> Mobile : +94 (0) 713 667906
> nipu...@wso2.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Tharik Kanaka*

WSO2, Inc |#20, Palm Grove, Colombo 03, Sri Lanka

Email: tha...@wso2.com | Web: www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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

2015-09-25 Thread Chanaka Fernando
Hi AmilaD,

After merging this change, we have seen that there are 3 integration test
failures in product-esb[1] . Please check these failures and resend the PR.
I'll revert the fix for the moment.

[1] https://wso2.org/jenkins/job/product-esb/lastBuild/testReport/

On Fri, Sep 25, 2015 at 3:13 PM, Chanaka Fernando  wrote:

> Hi Amila,
>
> PR[1] is merged.
>
> [1]
> https://github.com/wso2/wso2-synapse/commit/d5815b2afcf7f2d9c8e5e5858e8cc45427a07ce0
>
> On Fri, Sep 25, 2015 at 2:43 PM, Amila De Silva  wrote:
>
>> Hi,
>>
>> Tested RoleBased Throttling on a two node APIM cluster after applying new
>> changes. Counts are properly getting replicated across all the nodes.
>>
>> On Tue, Sep 15, 2015 at 5:05 PM, Amila De Silva  wrote:
>>
>>> Hi,
>>>
>>> Created the PR[1], by merging latest throttling fixes with
>>> synapse-commons. After doing the changes, was able to successfully build
>>> wso2-synapse and carbon-mediation with unit tests. Ran all the integration
>>> tests in product-esb, after building the product on top of latest synapse
>>> and carbon-mediation changes.
>>>
>>> Please review and merge the PR.
>>>
>>> [1] https://github.com/wso2/wso2-synapse/pull/360
>>>
>>> On Mon, Sep 14, 2015 at 5:07 PM, Amila De Silva  wrote:
>>>
 Hi Isuru,

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

 Let me clarify a bit what these changes are;

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

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


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



 On Mon, Sep 14, 2015 at 3:54 PM, Isuru Udana  wrote:

> Hi AmilaD,
>
> Can you please point us the changes need to be merged in synapse (in
> MEPClient and SynapseCallbackReceiver) ?
>
> On Mon, Sep 14, 2015 at 2:58 PM, Amila De Silva 
> wrote:
>
>> Hi All,
>>
>> While carrying out this task, came to a point where certain classes
>> cannot be moved out of synapse.
>>
>> For some of the improvements done recently,
>> ConcurrentAccessController (which is one of the classes that originally
>> resided in throttle core) has been used from SynapseCallbackReceiver
>> and Axis2FlexibleMEPClient. So now either ConcurrentAccessController has 
>> to
>> reside inside synapse, or else it has to go into another
>> different component on which synapse would have to depend on. The whole
>> point of moving throttling related code out of synapse is to prevent
>> synapse depending on any carbon components.
>>
>> Since synapse depending on Hazelcast is not something that can be
>> eliminated completely, is it fine to keep throttle.core inside synapse 
>> and
>> merge new changes? When merging throttling fixes, either we have to
>> introduce a service component to synapse, which would
>> consume hazelcast.instance.service or we have to provide a method to set
>> the HazelcastInstance that will be used for replicating throttling 
>> counts.
>>
>> On Fri, Sep 11, 2015 at 9:01 PM, Amila De Silva 
>> wrote:
>>
>>> Hi Chanaka,
>>>
>>> Since throttle core can be used on its own, thought of creating a
>>> separate feature out of that - so a new place to put throttle 
>>> component. If
>>> we put it under mediation-throttle, that would imply two components 
>>> have to
>>> be used together, isn't it?
>>>
>>> On Fri, Sep 11, 2015 at 6:45 PM, Chanaka Fernando >> > wrote:
>>>
 Hi Amila,

 You can find [1] which already has the throttle policy editor
 related 

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

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


On Saturday, September 26, 2015, Chanaka Fernando  wrote:

> Hi AmilaD,
>
> After merging this change, we have seen that there are 3 integration test
> failures in product-esb[1] . Please check these failures and resend the PR.
> I'll revert the fix for the moment.
>
> [1] https://wso2.org/jenkins/job/product-esb/lastBuild/testReport/
>
> On Fri, Sep 25, 2015 at 3:13 PM, Chanaka Fernando  > wrote:
>
>> Hi Amila,
>>
>> PR[1] is merged.
>>
>> [1]
>> https://github.com/wso2/wso2-synapse/commit/d5815b2afcf7f2d9c8e5e5858e8cc45427a07ce0
>>
>> On Fri, Sep 25, 2015 at 2:43 PM, Amila De Silva > > wrote:
>>
>>> Hi,
>>>
>>> Tested RoleBased Throttling on a two node APIM cluster after applying
>>> new changes. Counts are properly getting replicated across all the nodes.
>>>
>>> On Tue, Sep 15, 2015 at 5:05 PM, Amila De Silva >> > wrote:
>>>
 Hi,

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

 Please review and merge the PR.

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

 On Mon, Sep 14, 2015 at 5:07 PM, Amila De Silva > wrote:

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

Re: [Dev] [Vote] Release WSO2 Carbon Kernel 4.4.2 RC1

2015-09-25 Thread Johann Nallathamby
On Fri, Sep 25, 2015 at 11:16 AM, Darshana Gunawardana 
wrote:

> Hi Indunil,
>
> On Fri, Sep 25, 2015 at 10:15 AM, Indunil Upeksha Rathnayake <
> indu...@wso2.com> wrote:
>
>> Hi,
>>
>> The deadlock issue(https://wso2.org/jira/browse/MB-1326) come up in
>> oracle and mssql when clearResourceAuthorizations where permissions are
>> deleted in UM_ROLE_PERMISSIONS, UM_USER_PERMISSIONS and UM_PERMISSION
>> tables through one transaction. The fix would be using cascade delete for
>> above tables.
>>
>
> +1
>
>
>> But I think another issue(foreign key constraint violation) may come up
>> when addAuthorizationForRole, as following example scenario. Ex: Node1 may
>> be retrieve the permission entry in UM_PERMISSION table (in
>> addAuthorizationForRole()) and just after that node2 may delete the entry
>> (in clearResourceAuthorizations()) and after that when node1 trying to
>> delete & add permissions in UM_ROLE_PERMISSIONS (in
>> addAuthorizationForRole()) will return the above exception since the entry
>> in UM_PERMISSION is already deleted.
>>
> I think the fix need to be, if UM_ROLE_PERMISSIONS and UM_PERMISSION
>> tables are going to update, first have to lock both tables, until all the
>> required operations are finished. Then meanwhile another node can't delete
>> any entries.
>>
>
> Have you able to reproduce this behavior? I guess we cannot lock those
> tables from the java code in db in dependent manner. Please check with our
> db experts.
>
> In worst case we could handle IntegrityConstraintViolationException since
> its ok to avoiding addAuthorization for a permission which got deleted
> later.
>

Yes, lets not go into locking tables. As much as possible try to avoid it
or recover gracefully.

>
> Thanks,
>
>
>> Please provide your opinions regarding this.
>>
>> Thanks and Regards
>> --
>> Indunil Upeksha Rathnayake
>> Software Engineer | WSO2 Inc
>> Emailindu...@wso2.com
>>
>
>
>
> --
> Regards,
>
>
> *Darshana Gunawardana*Senior Software Engineer
> WSO2 Inc.; http://wso2.com
>
> *E-mail: darsh...@wso2.com *
> *Mobile: +94718566859 <%2B94718566859>*Lean . Enterprise . Middleware
>



-- 
Thanks & Regards,

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

Mobile - *+9476950*
Blog - *http://nallaa.wordpress.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Vote] Release WSO2 Carbon Kernel 4.4.2 RC1

2015-09-25 Thread Ramith Jayasinghe
Hi,
If you are hoping to handle/catch
'IntegrityConstraintViolationException' consider following:

'IntegrityConstraintViolationException' is only thrown in Oracle and
mysql database drivers ( check their driver source code and you will
see). from what I know MSSQL drivers doesn't throw these. I have seen
similar approach has been adapted in Hibernate (ORM) framework code as
well.

therefore, if you go down this path you need to check SQLState [1].
You might find[2] useful as reference.

[1] 
http://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html#getSQLState()
[2] 
https://github.com/wso2/andes/blob/master/modules/andes-core/broker/src/main/java/org/wso2/andes/store/rdbms/RDBMSStoreUtils.java#115

On Fri, Sep 25, 2015 at 11:16 AM, Darshana Gunawardana
 wrote:
> Hi Indunil,
>
> On Fri, Sep 25, 2015 at 10:15 AM, Indunil Upeksha Rathnayake
>  wrote:
>>
>> Hi,
>>
>> The deadlock issue(https://wso2.org/jira/browse/MB-1326) come up in oracle
>> and mssql when clearResourceAuthorizations where permissions are deleted in
>> UM_ROLE_PERMISSIONS, UM_USER_PERMISSIONS and UM_PERMISSION tables through
>> one transaction. The fix would be using cascade delete for above tables.
>
>
> +1
>
>>
>> But I think another issue(foreign key constraint violation) may come up
>> when addAuthorizationForRole, as following example scenario. Ex: Node1 may
>> be retrieve the permission entry in UM_PERMISSION table (in
>> addAuthorizationForRole()) and just after that node2 may delete the entry
>> (in clearResourceAuthorizations()) and after that when node1 trying to
>> delete & add permissions in UM_ROLE_PERMISSIONS (in
>> addAuthorizationForRole()) will return the above exception since the entry
>> in UM_PERMISSION is already deleted.
>>
>> I think the fix need to be, if UM_ROLE_PERMISSIONS and UM_PERMISSION
>> tables are going to update, first have to lock both tables, until all the
>> required operations are finished. Then meanwhile another node can't delete
>> any entries.
>
>
> Have you able to reproduce this behavior? I guess we cannot lock those
> tables from the java code in db in dependent manner. Please check with our
> db experts.
>
> In worst case we could handle IntegrityConstraintViolationException since
> its ok to avoiding addAuthorization for a permission which got deleted
> later.
>
> Thanks,
>
>>
>> Please provide your opinions regarding this.
>>
>> Thanks and Regards
>> --
>> Indunil Upeksha Rathnayake
>> Software Engineer | WSO2 Inc
>> Emailindu...@wso2.com
>
>
>
>
> --
> Regards,
>
> Darshana Gunawardana
> Senior Software Engineer
> WSO2 Inc.; http://wso2.com
> E-mail: darsh...@wso2.com
> Mobile: +94718566859
> Lean . Enterprise . Middleware



-- 
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] WSO2 Developer Studio 3.8.0 Beta Released!

2015-09-25 Thread Sriskandarajah Suhothayan
On Fri, Sep 25, 2015 at 4:26 PM, Gayan Yalpathwala  wrote:

> Hi All,
>
> We have WSO2 Developer Studio 3.8.0 Beta ready to be downloaded at [1] and
> installed eclipse distributions available at [2]. This release includes
> following tasks, sub-tasks, improvements and bug fixes.
>
> *Tasks*
>
>- [TOOLS-2786 ] - A new maven
>plugin to pre-prepare for package goal
>- [TOOLS-3083 ] - Update
>"WSO2 Classpath Libraries" properly after adding ESB 4.9.0 released Jars.
>- [TOOLS-3180 ] - Remove CEP
>Project from Developer Studio
>
>
We are done with the new version of the CEP plugin[1]. Will it be possible
to add that to this release ?

[1]https://github.com/wso2/developer-studio/pull/102

Suho

>
> *Sub-tasks*
>
>- [TOOLS-1778 ] - Remove the
>default connection arrows
>
>
> *Improvements*
>
>- [TOOLS-2785 ] - Refactoring
>maven-tools repository
>- [TOOLS-2927 ] - JDBC and
>RabbitMQ message store types are not available in message store types
>dropdown.
>- [TOOLS-3074 ] - Connector
>Project - Add connector file path improvement
>- [TOOLS-3103 ] - List
>available properties for Property mediator's Property name
>- [TOOLS-3143 ] - AF
>Perspective UI Improvements
>
>
> *Bugs*
>
>- [TOOLS-1954 ] - DevStudio -
>GReg Project fails to commit changes
>- [TOOLS-2176 ] - Provide
>zoom in zoom out feature in ESB Graphical editor
>- [TOOLS-2208 ] -
>AccountServiceSampleProject contains build-path issues
>- [TOOLS-2307 ] - When
>importing a 'template' and 'REST API artifact' the Specified configuration
>file location is not validating properly
>- [TOOLS-2475 ] - In Local
>Entry the value is not validating properly in when Local entry type is
>"In-Lined XML"
>- [TOOLS-2555 ] - Closing a
>project does not close it's child projects. Have to close each and every
>project individually even if they are belong to one parent project (Maven
>Multi Module Project)
>- [TOOLS-2581 ] - Mac
>installation of Dev Studio needs to work out-of-box
>- [TOOLS-2642 ] - Give a UI
>menu to remove installed connector
>- [TOOLS-2654 ] - Unable to
>delete registry resource on first attempt
>- [TOOLS-2665 ] - Call
>mediator graphical view wont change on endpoint type changing from property
>window
>- [TOOLS-2667 ] - XQuery
>mediator Target source path attributes added from property window not shown
>in the source view
>- [TOOLS-2673 ] - Typo in
>XPath
>- [TOOLS-2691 ] - When
>deserializing the security scenarios, security scenario option button is
>not getting updated properly
>- [TOOLS-2698 ] - Unable to
>see project dependencies when creating a CApp project in Mac OS X Yosemite
>- [TOOLS-2710 ] - Unable to
>save HTTP endpoint with an expression for a Property.
>- [TOOLS-2733 ] - Support
>Maven Artifact Token Replacement in wso2-esb-task-plugin
>- [TOOLS-2746 ] - Deleting
>the default child endpoint of Load-balancer endpoint will create unexpected
>behaviors in Dev Studio.
>- [TOOLS-2747 ] - Imported
>endpoint templates in dev studio, are picked up as sequence templates once
>CAR is deployed.
>- [TOOLS-2755 ] - Maven -
>Incorrect folder structure created when building the Data Service Project
>- [TOOLS-2756 ] - Eclipse
>doesn't save the Endpoint Template with parameters
>- [TOOLS-2778 ] - DevStudio
>3.7.1 rewrites project pom file when adding new resource
>- [TOOLS-2798 ] - Inline WSDL
>does not get persisted
>- [TOOLS-2832 ] - Named
>endpoint and sequence 

Re: [Dev] [DAS] Line chart y-axis scale and range problems

2015-09-25 Thread Thanuja Uruththirakodeeswaran
Hi Nipuna, Tharik,

Thanks a lot for the suggestions. I'll follow your suggestions and let you
know.

Thanks.

On Fri, Sep 25, 2015 at 5:05 PM, Tharik Kanaka  wrote:

> Hi Thanuja,
>
> I have already noticed this in CEP and reported in a JIRA  [1]. This only
> happens when you multiple lines to chart. Root cause for this is that Vega
> chart will draw the Y axis by considering only first column values. In your
> case it has considered "CreatedInstanceCount" where as other lines are
> plotted outside.
>
> You will see decimals since Y axis meant to plot 10 points since maximum
> value is 5, it is plotted by 0.5. It will not happen if maximum value
> becomes large number such as 50 where as plotting will happen by 5, 10, 15
> and so on.
>
> [1] https://wso2.org/jira/browse/CEP-1387
>
> On Fri, Sep 25, 2015 at 4:27 PM, Nipuna Chandradasa 
> wrote:
>
>> Hi Thanuja,
>>
>> Quick fix for few of these problems.
>>
>> For the 1st one check the domain which define the range of the y scale.
>>  may be they are given in decimals.
>>
>> most of the time y axis value range is mapped with the height of the SVG
>> element. if you can quickly look in to it and just adjust the width of the
>> SVG element or change the range mapping value in y scale u may be able to
>> solve 2nd issue.
>>
>>
>> Thanks.
>>
>>
>> On Fri, Sep 25, 2015 at 4:05 PM, Thanuja Uruththirakodeeswaran <
>> thanu...@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> I'm generating a line chart to show details with DAS analytics dashboard
>>> using Line Chart Gadgets as below. ​This line chart uses D3 library and
>>> Vega.
>>>
>>>
>>>
>>> Here I'm facing following problems:
>>> 1. Even though member count values (Y axis values) are integers, in this
>>> chart axis values are populated as decimals and I tried to use 'round'
>>> property for y axis configuration and couldn't fix it.
>>>
>>> 2. Also y axis value range is also limited to 5 as shown above
>>>
>>> 3. As shown in the below image, tool-tip pop y axis value shown as
>>> undefined and sometimes tool-tips are not removed.
>>>
>>>
>>>
>>> I discussed these issues with Dunith also. It will be helpful if these
>>> issues are fixed.
>>>
>>> Thanks.
>>>
>>> --
>>> Thanuja Uruththirakodeeswaran
>>> Software Engineer
>>> WSO2 Inc.;http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: +94 774363167
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Nipuna Marcus
>> *Software Engineer*
>> WSO2 Inc.
>> http://wso2.com/ - "lean . enterprise . middleware"
>> Mobile : +94 (0) 713 667906
>> nipu...@wso2.com
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> *Tharik Kanaka*
>
> WSO2, Inc |#20, Palm Grove, Colombo 03, Sri Lanka
>
> Email: tha...@wso2.com | Web: www.wso2.com
>



-- 
Thanuja Uruththirakodeeswaran
Software Engineer
WSO2 Inc.;http://wso2.com
lean.enterprise.middleware

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


[Dev] [DAS] Line chart y-axis scale and range problems

2015-09-25 Thread Thanuja Uruththirakodeeswaran
Hi All,

I'm generating a line chart to show details with DAS analytics dashboard
using Line Chart Gadgets as below. ​This line chart uses D3 library and
Vega.



Here I'm facing following problems:
1. Even though member count values (Y axis values) are integers, in this
chart axis values are populated as decimals and I tried to use 'round'
property for y axis configuration and couldn't fix it.

2. Also y axis value range is also limited to 5 as shown above

3. As shown in the below image, tool-tip pop y axis value shown as
undefined and sometimes tool-tips are not removed.



I discussed these issues with Dunith also. It will be helpful if these
issues are fixed.

Thanks.

-- 
Thanuja Uruththirakodeeswaran
Software Engineer
WSO2 Inc.;http://wso2.com
lean.enterprise.middleware

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


Re: [Dev] [Vote] Release WSO2 Carbon Kernel 4.4.2 RC1

2015-09-25 Thread Sasikala Kottegoda
Hi all,

We applied the patch given by Indunil which had cascade delete on the
tables. However, it gave a dead lock in 'DELETE FROM UM_PERMISSION WHERE
UM_RESOURCE_ID = ? AND UM_TENANT_ID=?' and 'DELETE FROM UM_HYBRID_ROLE
WHERE UM_ROLE_NAME = ? AND UM_TENANT_ID=?'(The stack trace is attached).
Following are the code lines which give the error:

dbConnection = DatabaseUtil.getDBConnection(this.dataSource);

DatabaseUtil.updateDatabase(dbConnection, "DELETE FROM UM_HYBRID_ROLE
WHERE UM_ROLE_NAME = ? AND UM_TENANT_ID=?", new Object[]{roleName,
Integer.valueOf(this.tenantId)});
dbConnection.commit();

and

dbConnection1 = this.getDBConnection();

DatabaseUtil.updateDatabase(dbConnection1, "DELETE FROM UM_PERMISSION
WHERE UM_RESOURCE_ID = ? AND UM_TENANT_ID=?", new Object[]{resourceId,
Integer.valueOf(this.tenantId)});

this.permissionTree.clearResourceAuthorizations(resourceId);
dbConnection1.commit();


Also when I looked at the script, I found out the following
information regarding foreign key relationships:


   1. UM_ROLE_PERMISSION has 2 parent tables, UM_PERMISSION and UM_DOMAIN
   2. UM_HYBRID_USER_ROLE has 2 parent tables, UM HYBRID_ROLE and UM_DOMAIN


One possible reason for the deadlock is if oracle locks the parent
table when deleting from a child table. A similar issue is reported
at[1]

[1] 
http://stackoverflow.com/questions/9373843/meet-deadlock-when-deleting-different-records-from-same-table-in-different-trans


On Fri, Sep 25, 2015 at 1:06 PM, Ramith Jayasinghe  wrote:

> Hi,
> If you are hoping to handle/catch
> 'IntegrityConstraintViolationException' consider following:
>
> 'IntegrityConstraintViolationException' is only thrown in Oracle and
> mysql database drivers ( check their driver source code and you will
> see). from what I know MSSQL drivers doesn't throw these. I have seen
> similar approach has been adapted in Hibernate (ORM) framework code as
> well.
>
> therefore, if you go down this path you need to check SQLState [1].
> You might find[2] useful as reference.
>
> [1]
> http://docs.oracle.com/javase/7/docs/api/java/sql/SQLException.html#getSQLState()
> [2]
> https://github.com/wso2/andes/blob/master/modules/andes-core/broker/src/main/java/org/wso2/andes/store/rdbms/RDBMSStoreUtils.java#115
>
> On Fri, Sep 25, 2015 at 11:16 AM, Darshana Gunawardana
>  wrote:
> > Hi Indunil,
> >
> > On Fri, Sep 25, 2015 at 10:15 AM, Indunil Upeksha Rathnayake
> >  wrote:
> >>
> >> Hi,
> >>
> >> The deadlock issue(https://wso2.org/jira/browse/MB-1326) come up in
> oracle
> >> and mssql when clearResourceAuthorizations where permissions are
> deleted in
> >> UM_ROLE_PERMISSIONS, UM_USER_PERMISSIONS and UM_PERMISSION tables
> through
> >> one transaction. The fix would be using cascade delete for above tables.
> >
> >
> > +1
> >
> >>
> >> But I think another issue(foreign key constraint violation) may come up
> >> when addAuthorizationForRole, as following example scenario. Ex: Node1
> may
> >> be retrieve the permission entry in UM_PERMISSION table (in
> >> addAuthorizationForRole()) and just after that node2 may delete the
> entry
> >> (in clearResourceAuthorizations()) and after that when node1 trying to
> >> delete & add permissions in UM_ROLE_PERMISSIONS (in
> >> addAuthorizationForRole()) will return the above exception since the
> entry
> >> in UM_PERMISSION is already deleted.
> >>
> >> I think the fix need to be, if UM_ROLE_PERMISSIONS and UM_PERMISSION
> >> tables are going to update, first have to lock both tables, until all
> the
> >> required operations are finished. Then meanwhile another node can't
> delete
> >> any entries.
> >
> >
> > Have you able to reproduce this behavior? I guess we cannot lock those
> > tables from the java code in db in dependent manner. Please check with
> our
> > db experts.
> >
> > In worst case we could handle IntegrityConstraintViolationException since
> > its ok to avoiding addAuthorization for a permission which got deleted
> > later.
> >
> > Thanks,
> >
> >>
> >> Please provide your opinions regarding this.
> >>
> >> Thanks and Regards
> >> --
> >> Indunil Upeksha Rathnayake
> >> Software Engineer | WSO2 Inc
> >> Emailindu...@wso2.com
> >
> >
> >
> >
> > --
> > Regards,
> >
> > Darshana Gunawardana
> > Senior Software Engineer
> > WSO2 Inc.; http://wso2.com
> > E-mail: darsh...@wso2.com
> > Mobile: +94718566859
> > Lean . Enterprise . Middleware
>
>
>
> --
> Ramith Jayasinghe
> Technical Lead
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> E: ram...@wso2.com
> P: +94 777542851
>



-- 
Sasikala Kottegoda
*Software Engineer*
WSO2 Inc., http://wso2.com/
lean. enterprise. middleware
Mobile: +94 774835928/712792401


ORA-00060_
Description: Binary data
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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

2015-09-25 Thread Chanaka Fernando
Hi Amila,

PR[1] is merged.

[1]
https://github.com/wso2/wso2-synapse/commit/d5815b2afcf7f2d9c8e5e5858e8cc45427a07ce0

On Fri, Sep 25, 2015 at 2:43 PM, Amila De Silva  wrote:

> Hi,
>
> Tested RoleBased Throttling on a two node APIM cluster after applying new
> changes. Counts are properly getting replicated across all the nodes.
>
> On Tue, Sep 15, 2015 at 5:05 PM, Amila De Silva  wrote:
>
>> Hi,
>>
>> Created the PR[1], by merging latest throttling fixes with
>> synapse-commons. After doing the changes, was able to successfully build
>> wso2-synapse and carbon-mediation with unit tests. Ran all the integration
>> tests in product-esb, after building the product on top of latest synapse
>> and carbon-mediation changes.
>>
>> Please review and merge the PR.
>>
>> [1] https://github.com/wso2/wso2-synapse/pull/360
>>
>> On Mon, Sep 14, 2015 at 5:07 PM, Amila De Silva  wrote:
>>
>>> Hi Isuru,
>>>
>>> There aren't any changes to be merged on MEPClient and
>>> SynapseCallbackReceiver. Changes that need merging are done on classes
>>> residing under [1].
>>>
>>> Let me clarify a bit what these changes are;
>>>
>>> While fixing some throttling issues in AM 1.6.0, certain changes were
>>> done on the part that replicates throttling counters. Earlier these
>>> counters were replicated using a ClusterMessage, but after the fixes
>>> counters are replicated using  Hazelcast AtomicLongs. The fixes were
>>> done on org.wso2.carbon.throttle.core_4.2.0, which is maintained in svn
>>> and after fixes were done, throttle.core needs depending on
>>> com.hazelcast.wso2 component.
>>>
>>> When moving synapse code on to Git, throttle.core has been absorbed into
>>> synapse, and now it is kept under [1]. Parallel to the changes mentioned
>>> above, some other fixes have been done on the throttling & synapse (which
>>> now is on Git) and it's those changes that make synapse depend on throttle
>>> core. The change is MEPClient and SynapseCallbackReceiver using a reference
>>> of ConcurrentAccessController (you can find the specific code changes at
>>> [2])
>>>
>>>
>>> [1]
>>> https://github.com/wso2/wso2-synapse/tree/master/modules/commons/src/main/java/org/apache/synapse/commons/throttle
>>> [2]
>>> https://github.com/wso2/wso2-synapse/blob/master/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java#L497-L515
>>>
>>>
>>>
>>> On Mon, Sep 14, 2015 at 3:54 PM, Isuru Udana  wrote:
>>>
 Hi AmilaD,

 Can you please point us the changes need to be merged in synapse (in
 MEPClient and SynapseCallbackReceiver) ?

 On Mon, Sep 14, 2015 at 2:58 PM, Amila De Silva 
 wrote:

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


 On Fri, Sep 11, 2015 at 5:20 PM, Amila De Silva 
 wrote:

> Will be moving 

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

2015-09-25 Thread Amila De Silva
Hi,

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

On Tue, Sep 15, 2015 at 5:05 PM, Amila De Silva  wrote:

> Hi,
>
> Created the PR[1], by merging latest throttling fixes with
> synapse-commons. After doing the changes, was able to successfully build
> wso2-synapse and carbon-mediation with unit tests. Ran all the integration
> tests in product-esb, after building the product on top of latest synapse
> and carbon-mediation changes.
>
> Please review and merge the PR.
>
> [1] https://github.com/wso2/wso2-synapse/pull/360
>
> On Mon, Sep 14, 2015 at 5:07 PM, Amila De Silva  wrote:
>
>> Hi Isuru,
>>
>> There aren't any changes to be merged on MEPClient and
>> SynapseCallbackReceiver. Changes that need merging are done on classes
>> residing under [1].
>>
>> Let me clarify a bit what these changes are;
>>
>> While fixing some throttling issues in AM 1.6.0, certain changes were
>> done on the part that replicates throttling counters. Earlier these
>> counters were replicated using a ClusterMessage, but after the fixes
>> counters are replicated using  Hazelcast AtomicLongs. The fixes were
>> done on org.wso2.carbon.throttle.core_4.2.0, which is maintained in svn
>> and after fixes were done, throttle.core needs depending on
>> com.hazelcast.wso2 component.
>>
>> When moving synapse code on to Git, throttle.core has been absorbed into
>> synapse, and now it is kept under [1]. Parallel to the changes mentioned
>> above, some other fixes have been done on the throttling & synapse (which
>> now is on Git) and it's those changes that make synapse depend on throttle
>> core. The change is MEPClient and SynapseCallbackReceiver using a reference
>> of ConcurrentAccessController (you can find the specific code changes at
>> [2])
>>
>>
>> [1]
>> https://github.com/wso2/wso2-synapse/tree/master/modules/commons/src/main/java/org/apache/synapse/commons/throttle
>> [2]
>> https://github.com/wso2/wso2-synapse/blob/master/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java#L497-L515
>>
>>
>>
>> On Mon, Sep 14, 2015 at 3:54 PM, Isuru Udana  wrote:
>>
>>> Hi AmilaD,
>>>
>>> Can you please point us the changes need to be merged in synapse (in
>>> MEPClient and SynapseCallbackReceiver) ?
>>>
>>> On Mon, Sep 14, 2015 at 2:58 PM, Amila De Silva  wrote:
>>>
 Hi All,

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

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

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

 On Fri, Sep 11, 2015 at 9:01 PM, Amila De Silva 
 wrote:

> Hi Chanaka,
>
> Since throttle core can be used on its own, thought of creating a
> separate feature out of that - so a new place to put throttle component. 
> If
> we put it under mediation-throttle, that would imply two components have 
> to
> be used together, isn't it?
>
> On Fri, Sep 11, 2015 at 6:45 PM, Chanaka Fernando 
> wrote:
>
>> Hi Amila,
>>
>> You can find [1] which already has the throttle policy editor related
>> packages and named as mediation-throttle. You can move the throttle-core
>> packages to this component.
>>
>> [1]
>> https://github.com/wso2/carbon-mediation/tree/master/components/mediation-throttle
>>
>> On Fri, Sep 11, 2015 at 6:23 PM, Sanjeewa Malalgoda <
>> sanje...@wso2.com> wrote:
>>
>>> +1.
>>>
>>>
>>> On Fri, Sep 11, 2015 at 5:20 PM, Amila De Silva 
>>> wrote:
>>>
 Will be moving throttle.core to a new component under
 carbon-mediation. The new component name will be throttle-core and a 
 new
 feature with the same name will be created. Planning to do these 
 changes on
 carbon-mediation 4.4.11-SNAPSHOT and synapse 2.1.3-wso2v12-SNAPSHOT.

 On