Re: [Dev] How to point Direct repository location (file://) for SVN based dep-sync

2014-10-11 Thread Gimantha Bandara
H Anuruddha,

Yes. backward compatible repo worked. Thanks a lot!


On Mon, Oct 6, 2014 at 1:43 PM, Anuruddha Premalal 
wrote:

> Hi,
>
> You can use the following command to create a backward compatible svn repo
> with svn 1.8.
>
> svnadmin create --compatible-version 1.6 PATHNAME
>
> Regards,
> Anuruddha.
>
> On Wed, Oct 1, 2014 at 3:42 PM, Aruna Karunarathna  wrote:
>
>> Hi Ajanthan,
>>
>> Though the svn kit bundle is updated, this might not work with svn
>> 1.7/1.8, since we need to update the svn-client-adapter_1.6.18.wso2v2.jar
>> which is in the /repository/components/plugins folder.
>>
>> Regards,
>> Aruna
>>
>> On Wed, Oct 1, 2014 at 11:22 AM, Ajanthan Balachandran > > wrote:
>>
>>>
>>>
>>> On Sat, Sep 27, 2014 at 7:55 PM, Nuwan Dias  wrote:
>>>
 I doubt whether this will work for the file:// protocol. AFAIK you
 need to expose your svn repo over http(s) so that you can access it over
 http:// for the dep-sync to work.

 Thanks,
 NuwanD.

 On Sat, Sep 27, 2014 at 7:45 PM, Gimantha Bandara 
 wrote:

>
> Hi,
>
> I have created a svn repository location in a local setup. I added the
> following configuration to carbon.xml of ESB 4.8.1
>
> 
> true
> true
> true
> svn
>
> file:///home/gimantha/Support/repo/depsyncrepo/
> repouser
> repopassword
> true
> 
>
> When I run the ESB I am getting the following error
>
  The reason  for this exception is, you may be using subversion
>>> installation 1.8.0 and the svnkit bundle that is pointed in the docs is 1.3
>>> which is  not compatible with svn 1.8.0.You need to create a new svnkit
>>> bundle with latest svnkit 1.8.6.
>>> Here I have attached a maven pom.xml to create an osgi bundle using
>>> latest svnkit.
>>>

> [2014-09-27 19:35:27,605] ERROR - SVNBasedArtifactRepository Error
> while attempting to create the directory:
> file://localhost/home/gimantha/Support/repo/depsyncrepo/-1234
> org.tigris.subversion.svnclientadapter.SVNClientException:
> org.tigris.subversion.javahl.ClientException: svn: Unable to open an
> ra_local session to URL
> svn: Unable to open repository
> 'file://localhost/home/gimantha/Support/repo/depsyncrepo'
> svn: Expected FS format between '1' and '4'; found format '6'
> at
> org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.mkdir(AbstractJhlClientAdapter.java:2524)
> at
> org.wso2.carbon.deployment.synchronizer.subversion.SVNBasedArtifactRepository.checkRemoteDirectory(SVNBasedArtifactRepository.java:240)
> at
> org.wso2.carbon.deployment.synchronizer.subversion.SVNBasedArtifactRepository.init(SVNBasedArtifactRepository.java:167)
> at
> org.wso2.carbon.deployment.synchronizer.internal.repository.CarbonRepositoryUtils.newCarbonRepositorySynchronizer(CarbonRepositoryUtils.java:71)
> at
> org.wso2.carbon.deployment.synchronizer.internal.DeploymentSynchronizerComponent.initDeploymentSynchronizerForSuperTenant(DeploymentSynchronizerComponent.java:108)
> at
> org.wso2.carbon.deployment.synchronizer.internal.DeploymentSynchronizerComponent.activate(DeploymentSynchronizerComponent.java:77)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at
> org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
> at
> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
> at
> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:347)
> at
> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
> at
> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
> at
> org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
> at
> org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
> at
> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
> at
> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
> at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged

Re: [Dev] WSO2 MB 3.0.0 - TODOs in store aspect

2014-10-11 Thread Hasitha Hiranya
Hi Devs,

Here are some more tasks we are planning to do along milestone releases of
MB.

1. Both come as coodinator when in localhost (should consider port as well
when slecting coodinator)
2. Throw necessary SQL exceptions in JDBC (handled by Asitha now I believe)
3. Need to catch exception (most generic ) and throw
CassandaDataAccessException in CQLDataAccessHelper
4. Misleading log - in-memory message store initialized when configured
with Cassandra
5. Adjust packaging and put these as debug in log4j.propeties separated as
kernel, amqp and mqtt

   log4j.logger.org.wso2.andes.server.cassandra.QueueDeliveryWorker=DEBUG
   log4j.logger.org.wso2.andes.server.cassandra.SlotDeliveryWorker=DEBUG
   log4j.logger.org.wso2.andes.server.cassandra.OnflightMessageTracker=DEBUG
   log4j.logger.org.wso2.andes.server.cluster.coordination.hazelcast=DEBUG

  We need to separate per message logs as trace logs? We did this in MB
2.2.0.

6. Make Onflight Message Tracker NOT AMQP specific.

Thanks

On Thu, Oct 2, 2014 at 11:13 AM, Sriskandarajah Suhothayan 
wrote:

>
>
> On Thu, Oct 2, 2014 at 11:06 AM, Asitha Nanayakkara 
> wrote:
>
>> Hi Hasitha,
>>
>> Concerns regarding *deleteMessageMetadataFromQueue(final String
>> queueName,List messagesToRemove)*
>>
>> This method is used to delete meta data from a specific queue *queueName
>> (Note: *queueName in actual meta data would be different*). *This
>> methods' use case is to delete messages from a DLC. Note that there are
>> methods to add meta data to DLC too. (parameter to give the specific queue
>> to be stored to)
>>
>> *public void addMetaDataToQueue(final String queueName,
>> AndesMessageMetadata metadata) throws AndesException;*
>> *public void addMetadataToQueue(final String queueName,
>> List metadata) throws AndesException;*
>>
>> For the normal use case, to delete metadata there is no separate method.
>> We use the deleteMessages() method (meta data and content is removed
>> through this method). But if we are going to avoid content duplication for
>> topics in future we will need to add a method to deleteMetadata as well
>> (without specific queue name parameter)
>>
>>
>> +1
>
> Suho
>
>
>> On Wed, Oct 1, 2014 at 8:53 PM, Pamod Sylvester  wrote:
>>
>>> I've also got started on some re factoring of MQTT related logic we've
>>> implemented to fit in with the new changes.
>>>
>>> We also might want to further abstract out ack handling logic, since in
>>> MQTT the way acks are handled are quite different. So we need to address
>>> such polymorphic behaviours as well.
>>>
>>> for ex : - in AMQP when an ack arrives we purge the message, but in MQTT
>>> in QOS level 2 we wait for a couple of ack exchanges to consider the
>>> message being delivered.
>>>
>>>
>>>
>>> On Wed, Oct 1, 2014 at 7:13 PM, Hasitha Hiranya 
>>> wrote:
>>>
 Hi,

 I am currently doing the changes suggested by Suho and the team

 1. Introducing a Strategy Class for message store
 (async/direct/hybrid).
- So far, I could make async strategy class done.
 2. remove business logics and threads from message store and make it
 plain - done
 3. remove ackReceived from store level - done
 4. removed topic delivery worker - let us rewrite or merge to queue
 delivery worker
 5. moved message counting from message store and moved to context store
 6. prevented message store access from outside

 On the way I had to make modifications and improvements to the existing
 model.
 Also cleaned up Global queues whenever I met going thro the code when
 doing above change.

 There are still changes needs to be done.

 >> what to do when last subscriber goes
 >> for topic in mbeans how to get message count
 >> for topics in mbeans for subscriptions how to get pending message
 counts
 >> queue browserdelivery worker, need to rewrite getSortedMessages()

 >> ack received moved to messaging engine. Logic resides at messaging
 engine (tracking aspect) and message store manager (store aspect)
 >> reimplement topic delivery worker

 messageStore or message store manager is never given out of message
 engine. Do not call them directly. Always use MessagingEngine for message
 operations.

 public void deleteMessages method in message store has a logic. Should
 be removed.

 public void deleteMessageMetadataFromQueue(final String
 queueName,List messagesToRemove) why there is a
 queue name? AndesRemovableMetadata has queue name inside.

 QueueSubscriptionAcknowledgementHandler need to revisit this class.
 What does this do?? It has threads etc that never stops

 Should remove all global queue related stuff from cluster manager

 should remove all zookeeper related things from whole project up to MB
 product from dependancy level

 moved all message count related stuff to Context store. Now, need to
 impl

Re: [Dev] WSO2 MB 3.0.0 - TODOs in store aspect

2014-10-11 Thread Asitha Nanayakkara
Hi Hasitha,

On Sat, Oct 11, 2014 at 2:50 PM, Hasitha Hiranya  wrote:

> Hi Devs,
>
> Here are some more tasks we are planning to do along milestone releases of
> MB.
>
> 1. Both come as coodinator when in localhost (should consider port as well
> when slecting coodinator)
> 2. Throw necessary SQL exceptions in JDBC (handled by Asitha now I believe)
>

When in clustered mode if in memory mode is used an exception is thrown and
the message stores won't get initialized. And each method in the RDBMS
store classes throws AndesException when an SQLException occur.


> 3. Need to catch exception (most generic ) and throw
> CassandaDataAccessException in CQLDataAccessHelper
> 4. Misleading log - in-memory message store initialized when configured
> with Cassandra
>

This Log  is due to the in memory message store that was there in
MessagingEngine. We have removed it. With that change integrated to the
pack this log and the initialisation of in memory message store won't
happen.

5. Adjust packaging and put these as debug in log4j.propeties separated as
> kernel, amqp and mqtt
>
>log4j.logger.org.wso2.andes.server.cassandra.QueueDeliveryWorker=DEBUG
>log4j.logger.org.wso2.andes.server.cassandra.SlotDeliveryWorker=DEBUG
>
>  log4j.logger.org.wso2.andes.server.cassandra.OnflightMessageTracker=DEBUG
>log4j.logger.org.wso2.andes.server.cluster.coordination.hazelcast=DEBUG
>
>   We need to separate per message logs as trace logs? We did this in MB
> 2.2.0.
>
> 6. Make Onflight Message Tracker NOT AMQP specific.
>
> Thanks
>
> On Thu, Oct 2, 2014 at 11:13 AM, Sriskandarajah Suhothayan 
> wrote:
>
>>
>>
>> On Thu, Oct 2, 2014 at 11:06 AM, Asitha Nanayakkara 
>> wrote:
>>
>>> Hi Hasitha,
>>>
>>> Concerns regarding *deleteMessageMetadataFromQueue(final String
>>> queueName,List messagesToRemove)*
>>>
>>> This method is used to delete meta data from a specific queue *queueName
>>> (Note: *queueName in actual meta data would be different*). *This
>>> methods' use case is to delete messages from a DLC. Note that there are
>>> methods to add meta data to DLC too. (parameter to give the specific queue
>>> to be stored to)
>>>
>>> *public void addMetaDataToQueue(final String queueName,
>>> AndesMessageMetadata metadata) throws AndesException;*
>>> *public void addMetadataToQueue(final String queueName,
>>> List metadata) throws AndesException;*
>>>
>>> For the normal use case, to delete metadata there is no separate method.
>>> We use the deleteMessages() method (meta data and content is removed
>>> through this method). But if we are going to avoid content duplication for
>>> topics in future we will need to add a method to deleteMetadata as well
>>> (without specific queue name parameter)
>>>
>>>
>>> +1
>>
>> Suho
>>
>>
>>> On Wed, Oct 1, 2014 at 8:53 PM, Pamod Sylvester  wrote:
>>>
 I've also got started on some re factoring of MQTT related logic we've
 implemented to fit in with the new changes.

 We also might want to further abstract out ack handling logic, since in
 MQTT the way acks are handled are quite different. So we need to address
 such polymorphic behaviours as well.

 for ex : - in AMQP when an ack arrives we purge the message, but in
 MQTT in QOS level 2 we wait for a couple of ack exchanges to consider the
 message being delivered.



 On Wed, Oct 1, 2014 at 7:13 PM, Hasitha Hiranya 
 wrote:

> Hi,
>
> I am currently doing the changes suggested by Suho and the team
>
> 1. Introducing a Strategy Class for message store
> (async/direct/hybrid).
>- So far, I could make async strategy class done.
> 2. remove business logics and threads from message store and make it
> plain - done
> 3. remove ackReceived from store level - done
> 4. removed topic delivery worker - let us rewrite or merge to queue
> delivery worker
> 5. moved message counting from message store and moved to context store
> 6. prevented message store access from outside
>
> On the way I had to make modifications and improvements to the
> existing model.
> Also cleaned up Global queues whenever I met going thro the code when
> doing above change.
>
> There are still changes needs to be done.
>
> >> what to do when last subscriber goes
> >> for topic in mbeans how to get message count
> >> for topics in mbeans for subscriptions how to get pending message
> counts
> >> queue browserdelivery worker, need to rewrite getSortedMessages()
>
> >> ack received moved to messaging engine. Logic resides at messaging
> engine (tracking aspect) and message store manager (store aspect)
> >> reimplement topic delivery worker
>
> messageStore or message store manager is never given out of message
> engine. Do not call them directly. Always use MessagingEngine for message
> operations.
>
> public void deleteMessages method in message

[Dev] Which is the correct username that we should set, when we start the tenant flow

2014-10-11 Thread Samith Dassanayake
Hi,

When we start the tenant flow which is the correct username that we should
set? Fully qualified or tenant aware username?

Thanks,
Samith

-- 
Best Regards

Samith Dassanayake
Software Engineer, WSO2 Inc.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] What is the standard way of handling exceptions

2014-10-11 Thread Ravindra Ranwala
Hi Dinesh,

The way you handle an Exception is subjective and depends on the context.
But there is one important thing to note. That is never ever do something
like this unless you have an extremely valid reason.

try{
 // Some code goes here
 // 
} catch (Exception ignored) {
// Do Nothing  Just IGNORE 
}

This is called as swallowing an Exception and will make your day today life
very difficult since it hides the exception. It neither logs the exception
nor throws it. So It is very difficult to find errors with these sort of
codes in your code base.


Thanks &Regards,



On Fri, Oct 10, 2014 at 10:16 AM, Waruna Perera  wrote:

> Hi Danesh,
>
> In integration tests we used to log the exception and throw it. The reason
> is the result will be included in the testng reports.
>
> Thanks
>
> On Wed, Oct 8, 2014 at 9:24 AM, Danesh Kuruppu  wrote:
>
>> One more question, why we do both log exception and throw it inside
>> handleException?. It will result in multiple log messages in log file, for
>> a single problem in the code.
>>
>> On Thu, Oct 2, 2014 at 9:32 AM, Dinesh J Weerakkody 
>> wrote:
>>
>>> Hi,
>>>
>>> I'm just curious about the stranded way of handling exceptions in WSO2
>>> products. When I go through source code, I found that we use
>>> handleException method in some places (in some places use deferent method
>>> such as create new exceptions, catch, log and ignore, etc.) Can someone
>>> explain the standard exception handling mechanism in WSO2 products and it
>>> will be very helpful for newcomers also. (use cases for each case like when
>>> to use what method).
>>>
>>>
>>> When it comes to handleException method, I have another question.
>>>
>>>
>>> *Current handle exception method*
>>> public void handleException(String msg, Exception e) throws
>>> ProductException{
>>> log.error(msg, e);
>>> throw new ProductException(msg, e);
>>> }
>>>
>>> *Problem*
>>> class One{
>>> public void methodOne() {
>>> try {
>>> Two two = new Two();
>>> two.methodTwo();
>>> } catch (WhateverException e) {
>>> handleException("Whatever exception message", e);
>>> }
>>> }
>>> }
>>>
>>> class Two{
>>> public void methodTwo() {
>>> try {
>>> // Database manipulation code goes here
>>> } catch (SQLException e) {
>>> handleException("Cannot complete the transaction", e);
>>> }
>>> }
>>> }
>>>
>>> In handleException method we always create a new Exception. When we have
>>> multiple method calls, there will be duplicate stacktraces and the actual
>>> exception is printed in very latter part of the stack trace. Sometimes it
>>> is bit difficult to trace an error. Is there any specific reason to create
>>> new exceptions inside handleException method, instead of throwing same
>>> exception object if the exceptions is an instance of ProductException like
>>> below sample.
>>>
>>> public void handleException(String msg, Exception e) throws
>>> ProductException{
>>> log.error(msg, e);
>>> if(e instanceof ProductException)
>>>throw e;
>>> throw new ProductException(msg, e);
>>> }
>>>
>>> Thank you.
>>>
>>>
>>> --
>>>
>>> *Dinesh J. Weerakkody*
>>> Software Engineer
>>> WSO2 Inc.
>>> lean | enterprise | middleware
>>> M : +94 727 361788 | E : dine...@wso2.com | W : www.wso2.com
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> Danesh Kuruppu
>> Software Engineer
>> WSO2 Inc,
>> Mobile: +94 (77) 1690552
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Waruna Perera
> Senior Software Engineer - Test Automation
> Mobile: +94 77 3867037
> WSO2, Inc.; http://wso2.com/
> lean . enterprise . middlewear.
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Ravindra Ranwala
Software Engineer
WSO2, Inc: http://wso2.com

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


Re: [Dev] WSO2 MB 3.0.0 - TODOs in store aspect

2014-10-11 Thread Hasitha Hiranya
On Sat, Oct 11, 2014 at 6:32 PM, Asitha Nanayakkara  wrote:

> Hi Hasitha,
>
> On Sat, Oct 11, 2014 at 2:50 PM, Hasitha Hiranya 
> wrote:
>
>> Hi Devs,
>>
>> Here are some more tasks we are planning to do along milestone releases
>> of MB.
>>
>> 1. Both come as coodinator when in localhost (should consider port as
>> well when slecting coodinator)
>> 2. Throw necessary SQL exceptions in JDBC (handled by Asitha now I
>> believe)
>>
>
> When in clustered mode if in memory mode is used an exception is thrown
> and the message stores won't get initialized. And each method in the RDBMS
> store classes throws AndesException when an SQLException occur.
>

   AFIR you were missing stack Trace from JDBC driver. Maybe this is fixed
now.

>
>
>> 3. Need to catch exception (most generic ) and throw
>> CassandaDataAccessException in CQLDataAccessHelper
>> 4. Misleading log - in-memory message store initialized when configured
>> with Cassandra
>>
>
> This Log  is due to the in memory message store that was there in
> MessagingEngine. We have removed it. With that change integrated to the
> pack this log and the initialisation of in memory message store won't
> happen.
>

 +1

>
> 5. Adjust packaging and put these as debug in log4j.propeties separated as
>> kernel, amqp and mqtt
>>
>>log4j.logger.org.wso2.andes.server.cassandra.QueueDeliveryWorker=DEBUG
>>log4j.logger.org.wso2.andes.server.cassandra.SlotDeliveryWorker=DEBUG
>>
>>  log4j.logger.org.wso2.andes.server.cassandra.OnflightMessageTracker=DEBUG
>>log4j.logger.org.wso2.andes.server.cluster.coordination.hazelcast=DEBUG
>>
>>   We need to separate per message logs as trace logs? We did this in MB
>> 2.2.0.
>>
>> 6. Make Onflight Message Tracker NOT AMQP specific.
>>
>> Thanks
>>
>> On Thu, Oct 2, 2014 at 11:13 AM, Sriskandarajah Suhothayan > > wrote:
>>
>>>
>>>
>>> On Thu, Oct 2, 2014 at 11:06 AM, Asitha Nanayakkara 
>>> wrote:
>>>
 Hi Hasitha,

 Concerns regarding *deleteMessageMetadataFromQueue(final String
 queueName,List messagesToRemove)*

 This method is used to delete meta data from a specific queue *queueName
 (Note: *queueName in actual meta data would be different*). *This
 methods' use case is to delete messages from a DLC. Note that there are
 methods to add meta data to DLC too. (parameter to give the specific queue
 to be stored to)

 *public void addMetaDataToQueue(final String queueName,
 AndesMessageMetadata metadata) throws AndesException;*
 *public void addMetadataToQueue(final String queueName,
 List metadata) throws AndesException;*

 For the normal use case, to delete metadata there is no separate
 method. We use the deleteMessages() method (meta data and content is
 removed through this method). But if we are going to avoid content
 duplication for topics in future we will need to add a method to
 deleteMetadata as well (without specific queue name parameter)


 +1
>>>
>>> Suho
>>>
>>>
 On Wed, Oct 1, 2014 at 8:53 PM, Pamod Sylvester  wrote:

> I've also got started on some re factoring of MQTT related logic we've
> implemented to fit in with the new changes.
>
> We also might want to further abstract out ack handling logic, since
> in MQTT the way acks are handled are quite different. So we need to 
> address
> such polymorphic behaviours as well.
>
> for ex : - in AMQP when an ack arrives we purge the message, but in
> MQTT in QOS level 2 we wait for a couple of ack exchanges to consider the
> message being delivered.
>
>
>
> On Wed, Oct 1, 2014 at 7:13 PM, Hasitha Hiranya 
> wrote:
>
>> Hi,
>>
>> I am currently doing the changes suggested by Suho and the team
>>
>> 1. Introducing a Strategy Class for message store
>> (async/direct/hybrid).
>>- So far, I could make async strategy class done.
>> 2. remove business logics and threads from message store and make it
>> plain - done
>> 3. remove ackReceived from store level - done
>> 4. removed topic delivery worker - let us rewrite or merge to queue
>> delivery worker
>> 5. moved message counting from message store and moved to context
>> store
>> 6. prevented message store access from outside
>>
>> On the way I had to make modifications and improvements to the
>> existing model.
>> Also cleaned up Global queues whenever I met going thro the code when
>> doing above change.
>>
>> There are still changes needs to be done.
>>
>> >> what to do when last subscriber goes
>> >> for topic in mbeans how to get message count
>> >> for topics in mbeans for subscriptions how to get pending message
>> counts
>> >> queue browserdelivery worker, need to rewrite getSortedMessages()
>>
>> >> ack received moved to messaging engine. Logic resides at messaging
>> engine (tracking aspect) an

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

2014-10-11 Thread Rajith Vitharana
Congratulations Denuwanthi  :)

On Thu, Oct 9, 2014 at 9:06 PM, Subash Chaturanga  wrote:

> Hi all,
> It's our pleasure to welcome Denuwanthi De Silva as a WSO2 Committer.
> Denuwanthi has contributed immensely to WSO2 Governance Registry and
> platform and shown great commitment. In recognition of her contribution,
> she has been voted as a WSO2 Commiter.
>
> Welcome aboard and keep up the good work.
>
> --
> Thanks
> /subash
>
> *Subash Chaturanga*
> Senior Software Engineer
> Platform TG; WSO2 Inc. http://wso2.com
> Contact:
> email: sub...@wso2.com
> blog:  http://subashsdm.blogspot.com/
> twitter: @subash89
> phone: +9477 2225922
> Lean . Enterprise . Middleware
>
> ___
> 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/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Committers += Sameera Kannangara

2014-10-11 Thread Rajith Vitharana
Congratulations Sameera  :)

On Thu, Oct 9, 2014 at 9:08 PM, Subash Chaturanga  wrote:

> Hi all,
> It's our pleasure to welcome Sameera Kannangara as a WSO2 Committer.
> Sameera has contributed immensely to WSO2 Governance Registry and platform
> and shown great commitment. In recognition of his contribution, he has been
> voted as a WSO2 Commiter.
>
> Welcome aboard and keep up the good work.
>
> --
> Thanks
> /subash
>
> *Subash Chaturanga*
> Senior Software Engineer
> Platform TG; WSO2 Inc. http://wso2.com
> Contact:
> email: sub...@wso2.com
> blog:  http://subashsdm.blogspot.com/
> twitter: @subash89
> phone: +9477 2225922
> Lean . Enterprise . Middleware
>
> ___
> 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/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 MB 3.0.0 - TODOs in store aspect

2014-10-11 Thread Asitha Nanayakkara
On Sat, Oct 11, 2014 at 8:52 PM, Hasitha Hiranya  wrote:

>
>
> On Sat, Oct 11, 2014 at 6:32 PM, Asitha Nanayakkara 
> wrote:
>
>> Hi Hasitha,
>>
>> On Sat, Oct 11, 2014 at 2:50 PM, Hasitha Hiranya 
>> wrote:
>>
>>> Hi Devs,
>>>
>>> Here are some more tasks we are planning to do along milestone releases
>>> of MB.
>>>
>>> 1. Both come as coodinator when in localhost (should consider port as
>>> well when slecting coodinator)
>>> 2. Throw necessary SQL exceptions in JDBC (handled by Asitha now I
>>> believe)
>>>
>>
>> When in clustered mode if in memory mode is used an exception is thrown
>> and the message stores won't get initialized. And each method in the RDBMS
>> store classes throws AndesException when an SQLException occur.
>>
>
>AFIR you were missing stack Trace from JDBC driver. Maybe this is fixed
> now.
>

 Yes. That is fixed.

>
>
>>
>>
>>> 3. Need to catch exception (most generic ) and throw
>>> CassandaDataAccessException in CQLDataAccessHelper
>>> 4. Misleading log - in-memory message store initialized when configured
>>> with Cassandra
>>>
>>
>> This Log  is due to the in memory message store that was there in
>> MessagingEngine. We have removed it. With that change integrated to the
>> pack this log and the initialisation of in memory message store won't
>> happen.
>>
>
>  +1
>
>>
>> 5. Adjust packaging and put these as debug in log4j.propeties separated
>>> as kernel, amqp and mqtt
>>>
>>>log4j.logger.org.wso2.andes.server.cassandra.QueueDeliveryWorker=DEBUG
>>>log4j.logger.org.wso2.andes.server.cassandra.SlotDeliveryWorker=DEBUG
>>>
>>>  log4j.logger.org.wso2.andes.server.cassandra.OnflightMessageTracker=DEBUG
>>>
>>>  log4j.logger.org.wso2.andes.server.cluster.coordination.hazelcast=DEBUG
>>>
>>>   We need to separate per message logs as trace logs? We did this in MB
>>> 2.2.0.
>>>
>>> 6. Make Onflight Message Tracker NOT AMQP specific.
>>>
>>> Thanks
>>>
>>> On Thu, Oct 2, 2014 at 11:13 AM, Sriskandarajah Suhothayan <
>>> s...@wso2.com> wrote:
>>>


 On Thu, Oct 2, 2014 at 11:06 AM, Asitha Nanayakkara 
 wrote:

> Hi Hasitha,
>
> Concerns regarding *deleteMessageMetadataFromQueue(final String
> queueName,List messagesToRemove)*
>
> This method is used to delete meta data from a specific queue *queueName
> (Note: *queueName in actual meta data would be different*). *This
> methods' use case is to delete messages from a DLC. Note that there are
> methods to add meta data to DLC too. (parameter to give the specific queue
> to be stored to)
>
> *public void addMetaDataToQueue(final String queueName,
> AndesMessageMetadata metadata) throws AndesException;*
> *public void addMetadataToQueue(final String queueName,
> List metadata) throws AndesException;*
>
> For the normal use case, to delete metadata there is no separate
> method. We use the deleteMessages() method (meta data and content is
> removed through this method). But if we are going to avoid content
> duplication for topics in future we will need to add a method to
> deleteMetadata as well (without specific queue name parameter)
>
>
> +1

 Suho


> On Wed, Oct 1, 2014 at 8:53 PM, Pamod Sylvester 
> wrote:
>
>> I've also got started on some re factoring of MQTT related logic
>> we've implemented to fit in with the new changes.
>>
>> We also might want to further abstract out ack handling logic, since
>> in MQTT the way acks are handled are quite different. So we need to 
>> address
>> such polymorphic behaviours as well.
>>
>> for ex : - in AMQP when an ack arrives we purge the message, but in
>> MQTT in QOS level 2 we wait for a couple of ack exchanges to consider the
>> message being delivered.
>>
>>
>>
>> On Wed, Oct 1, 2014 at 7:13 PM, Hasitha Hiranya 
>> wrote:
>>
>>> Hi,
>>>
>>> I am currently doing the changes suggested by Suho and the team
>>>
>>> 1. Introducing a Strategy Class for message store
>>> (async/direct/hybrid).
>>>- So far, I could make async strategy class done.
>>> 2. remove business logics and threads from message store and make it
>>> plain - done
>>> 3. remove ackReceived from store level - done
>>> 4. removed topic delivery worker - let us rewrite or merge to queue
>>> delivery worker
>>> 5. moved message counting from message store and moved to context
>>> store
>>> 6. prevented message store access from outside
>>>
>>> On the way I had to make modifications and improvements to the
>>> existing model.
>>> Also cleaned up Global queues whenever I met going thro the code
>>> when doing above change.
>>>
>>> There are still changes needs to be done.
>>>
>>> >> what to do when last subscriber goes
>>> >> for topic in mbeans how to get message count
>>> >> for topics in m

Re: [Dev] WSO2 Committers += Sameera Kannangara

2014-10-11 Thread Buddhima Wijeweera
Congratulations Sameera !!!

On Sat, Oct 11, 2014 at 10:58 PM, Rajith Vitharana  wrote:

> Congratulations Sameera  :)
>
> On Thu, Oct 9, 2014 at 9:08 PM, Subash Chaturanga  wrote:
>
>> Hi all,
>> It's our pleasure to welcome Sameera Kannangara as a WSO2 Committer.
>> Sameera has contributed immensely to WSO2 Governance Registry and platform
>> and shown great commitment. In recognition of his contribution, he has been
>> voted as a WSO2 Commiter.
>>
>> Welcome aboard and keep up the good work.
>>
>> --
>> Thanks
>> /subash
>>
>> *Subash Chaturanga*
>> Senior Software Engineer
>> Platform TG; WSO2 Inc. http://wso2.com
>> Contact:
>> email: sub...@wso2.com
>> blog:  http://subashsdm.blogspot.com/
>> twitter: @subash89
>> phone: +9477 2225922
>> Lean . Enterprise . Middleware
>>
>> ___
>> 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/
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Buddhima Wijeweera
Software Engineer; WSO2 Inc.; http://wso2.com ,

Email: buddh...@wso2.com
Blog:   https://buddhimawijeweera.wordpress.com
GitHub Profile: https://github.com/Buddhima
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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

2014-10-11 Thread Buddhima Wijeweera
Congratulations Denuwanthi !!!

On Sat, Oct 11, 2014 at 10:57 PM, Rajith Vitharana  wrote:

> Congratulations Denuwanthi  :)
>
> On Thu, Oct 9, 2014 at 9:06 PM, Subash Chaturanga  wrote:
>
>> Hi all,
>> It's our pleasure to welcome Denuwanthi De Silva as a WSO2 Committer.
>> Denuwanthi has contributed immensely to WSO2 Governance Registry and
>> platform and shown great commitment. In recognition of her contribution,
>> she has been voted as a WSO2 Commiter.
>>
>> Welcome aboard and keep up the good work.
>>
>> --
>> Thanks
>> /subash
>>
>> *Subash Chaturanga*
>> Senior Software Engineer
>> Platform TG; WSO2 Inc. http://wso2.com
>> Contact:
>> email: sub...@wso2.com
>> blog:  http://subashsdm.blogspot.com/
>> twitter: @subash89
>> phone: +9477 2225922
>> Lean . Enterprise . Middleware
>>
>> ___
>> 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/
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Buddhima Wijeweera
Software Engineer; WSO2 Inc.; http://wso2.com ,

Email: buddh...@wso2.com
Blog:   https://buddhimawijeweera.wordpress.com
GitHub Profile: https://github.com/Buddhima
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Fixing the WSDL of STS service

2014-10-11 Thread Malithi Edirisinghe
Hi,

I'm working on JIRA issue[1].
In order to fix this I updated the STS custom WSDL with the four
operations,(i.e issue, validate, renew and cancel) and added the soap
request body schema. Previously though the WSDL was available in META-INF
it got generated as per the service.xml. This was due to the wrong mapping
of the service name and the wrong name used with the WSDL file, which is
now fixed.

Previously the service.xml had only IssueToken operation defined, mapping
all actions for this operation as below.

http://www.w3.org/2006/01/wsdl/in-out";>


http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT
 
http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue
   
http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Renew
  
http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Cancel
 
http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT/Cancel
 
http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Validate




saml-issuer-config

http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1



saml-issuer-config

http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0





token-canceler-config




saml-issuer-config

http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1




saml-issuer-config 
http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Status





Yet this worked for all operations since the WSDL was generated. But after
I changed the WSDL and fixed the problem of loading the original WSDL I had
to define the other operations in the service.xml and add appropriate
action mappings for them because the operation defined in the WSDL such as
ValidateToken for http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Validate
action was not defined in the service.xml. Thus, this faulted with action
not supported error. In order to fix this I changed the service.xml as
below.


http://www.w3.org/2004/08/wsdl/in-out";
 class="org.apache.rahas.STSMessageReceiver"/>






saml-issuer-config

http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1



saml-issuer-config

http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0





token-canceler-config




saml-issuer-config

http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1




saml-issuer-config  
http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Status




http://www.w3.org/2006/01/wsdl/in-out";>
http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Validate


http://www.w3.org/2006/01/wsdl/in-out";>
 http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue



http://www.w3.org/2006/01/wsdl/in-out";>
 http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Cancel



http://www.w3.org/2006/01/wsdl/in-out";>
 http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Renew



Here I moved the token-dispatcher-configuration to the service level and
mapped the appropriate action mapping with each operation.
I tested this on IS 5.1.0 on SAML 1.1 and this worked as same as before.
But I noted below in both, i.e before and after my fix.

   - When I tried to cancel a token issued from STS by a Java client I got
   an unauthorized error. This is also reported in [2]

org.apache.rahas.TrustException: Error occurred while trying to
cancel token
at org.apache.rahas.client.STSClient.cancelToken(STSClient.java:207)
at org.wso2.carbon.identity.samples.sts.Client.run(Client.java:148)
at org.wso2.carbon.identity.samples.sts.Client.main(Client.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: org.apache.axis2.AxisFault: Transport error: 401 Error:
Unauthorized
at
org.apache.axis2.transport.http.HTTPS

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

2014-10-11 Thread KasunG Gajasinghe
Congratulations!!

On Sat, Oct 11, 2014 at 11:10 PM, Buddhima Wijeweera 
wrote:

> Congratulations Denuwanthi !!!
>
> On Sat, Oct 11, 2014 at 10:57 PM, Rajith Vitharana 
> wrote:
>
>> Congratulations Denuwanthi  :)
>>
>> On Thu, Oct 9, 2014 at 9:06 PM, Subash Chaturanga 
>> wrote:
>>
>>> Hi all,
>>> It's our pleasure to welcome Denuwanthi De Silva as a WSO2 Committer.
>>> Denuwanthi has contributed immensely to WSO2 Governance Registry and
>>> platform and shown great commitment. In recognition of her contribution,
>>> she has been voted as a WSO2 Commiter.
>>>
>>> Welcome aboard and keep up the good work.
>>>
>>> --
>>> Thanks
>>> /subash
>>>
>>> *Subash Chaturanga*
>>> Senior Software Engineer
>>> Platform TG; WSO2 Inc. http://wso2.com
>>> Contact:
>>> email: sub...@wso2.com
>>> blog:  http://subashsdm.blogspot.com/
>>> twitter: @subash89
>>> phone: +9477 2225922
>>> Lean . Enterprise . Middleware
>>>
>>> ___
>>> 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/
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Buddhima Wijeweera
> Software Engineer; WSO2 Inc.; http://wso2.com ,
>
> Email: buddh...@wso2.com
> Blog:   https://buddhimawijeweera.wordpress.com
> GitHub Profile: https://github.com/Buddhima
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] IntelliJ Idea Configure - [for users newer to Intellij Idea]

2014-10-11 Thread Chamila De Alwis
I constantly use ctrl+alt+F7 (show usages) shortcut, but this is the
shortcut to switch to tty7 in Linux. Changing it to ctrl+alt+7 might help.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Fri, Oct 10, 2014 at 9:09 AM, Inosh Perera  wrote:

> Hi all,
> Also this[1] is very useful.
>
> 1.
> https://docs.google.com/a/wso2.com/presentation/d/1lU0iIvjYqIMGpLZrgGk7Mx85wF3VuYvM0k2dC117flo/edit#slide=id.i0
>
> Regards,
> Inosh
>
> On Thu, Oct 9, 2014 at 8:21 PM, Manoj Gunawardena  wrote:
>
>> Hi Devs,
>>
>> Intellij Idea is a keyboard centric IDE and properly configure of the IDE is
>> increased coding efficiency. Idea has provided default short cuts for
>> most of the essential options. Users can view the default key map reference
>> in IDE, help -> Default Key Map Reference.
>>
>> User can change short cut keys in Idea, by  File - > settings. Type
>> 'keyMap'  in the search box. The key Map page will open.
>>
>> Ubuntu users conflicts few Idea short cut keys with OS short cut keys.
>> Better to disable or change OS short cut keys to avoid these conflicts.
>>
>> In Ubuntu, users can change or disable OS short cuts as follows
>>
>> System settings -> KeyBoard -> Short Cuts,
>>
>> Following link listed short cut keys which conflicts with Idea and needs
>> to change in UBUNTU.
>>
>>
>> http://askubuntu.com/questions/412046/unable-to-use-intellij-idea-keyboard-shortcuts-on-ubuntu
>>
>> How to import Copy Right Info.
>> Go to File -> Settings-> Type copy right in the search box.
>> Add copy right text and save.
>>
>> Thanks
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> Manoj Gunawardena
>> Tech Lead
>> WSO2, Inc.: http://wso2.com
>> lean.enterprise.middleware
>> Mobile : +94 77 2291643
>>
>
>
>
> --
> Inosh Perera
> Software Engineer, WSO2 Inc.
> Tel: 0785293686
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev