Re: [Dev] OSGi bundle in `RESOLVED` state until manually activated

2019-02-13 Thread KasunG Gajasinghe
Can you check the bundles.info to see what's the start level of this bundle
is?

On Wed, Feb 13, 2019 at 3:46 PM Kaveen Rodrigo  wrote:

> Hey all,
>
> I'm having a bit of mind-bending issue, we have a common OSGi module that
> is running on both WSO2 IS and WSO2 APIM, the module consumes common
> services and registers a service.
>
> In the case of IS, it works perfectly it is active and registers and
> consumes services, but in the case of APIM, the bundle is in  `RESOLVED`
> state and not auto started until manually activated through the console
> using `start ` where it activates with no errors and works perfectly.
>
> Why doesn't this autostart? Any thoughts?
>
> *We tried*
>
>- Console `diag` - no unresolved dependencies.
>- Added a Breakpoint and logs in component activation - doesn't invoke
>the activate method unless manually started from the console.
>
> Thanks in advance,
> Kaveen Rodrig
>
> --
> *Kaveen Rodrigo *
> Software Engineer | WSO2
>
> Personal Web : https://kaveenrodrigo.com/
> Email : kav...@wso2.com
> Mobile : +94779684740
> WSO2 Web : http://www.wso2.com
>
> 
> [image: http://wso2.com/signature]
> 
>


-- 
*Kasun Gajasinghe* | Technical Lead | WSO2 Inc.
(w) +94 11 214 5345 | (e) kasung AT spamfree wso2.com
GET INTEGRATION AGILE
Integration Agility for Digitally Driven Business
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 product with MYSQL 8

2018-11-15 Thread KasunG Gajasinghe
I don't think we did.

What's the adoption of MySQL 8? Has it come by default in any Linux distros?

On Thu, Nov 15, 2018 at 4:41 PM Ishara Cooray  wrote:

> Hi,
>
> Have we tested the $Subject?
>
> *Mysql 8* has major changes such as [1], [2] and that leads to some
> errors running wso2 products with it.
>
> *[1] Character set support. * The default character set has changed from
> latin1 to utf8mb4. The utf8mb4 character set has several new collations,
> including utf8mb4_ja_0900_as_cs, the first Japanese language-specific
> collation available for Unicode in MySQL. For more information, see Section 
> 10.10.1,
> “Unicode Character Sets”
> .
>
> [2] https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html
> Thanks & Regards,
> Ishara Cooray
> Senior Software Engineer
> Mobile : +9477 262 9512
> WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>


-- 
*Kasun Gajasinghe* | Technical Lead | WSO2 Inc.
(w) +94 11 214 5345 | (e) kasung AT spamfree wso2.com
GET INTEGRATION AGILE
Integration Agility for Digitally Driven Business
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Communication Error between Active and Passive nodes.

2018-10-01 Thread KasunG Gajasinghe
Hi Vasanth,

Do you know whether this is a product bug, or an issue in the test case
level?

On Mon, Oct 1, 2018 at 6:20 PM Vasanthan Sivalingam 
wrote:

> Hi All,
>
> Thanks for the information. Now the communication between Active and
> passive nodes are successfully made.
> Currently i am facing failures while trying to run mvn clean install in
> tests-kubernetes-integration module in product-sp repo.
> Below are the errors which are produced with different ha-patterns,
>
> ha-pattern
>
>   PassiveNodeIT.testHaInit:146 expected
> [{"testCase":"com.sp.test.TwoNodeH","eventCount":20}] but found
> [{"testCase":"com.sp.test.TwoNodeH","eventCount":15}]
>
> ha-pattern-3
>
>   StateSyncIT.testHaInit:107 expected
> [{"value":150.0,"message":"message","method":"POST","headers":"cclassName:com.sp.test.StateSync"}]
> but found [{"message":"No events found for the index: 4"}]
>
> ha-pattern-4
>
>   StateSyncAfterGracePeriodIT.testHaInit:91 expected
> [{"value":150.0,"message":"message","method":"POST","headers":"cclassName:com.sp.test.StateSync"}]
> but found [{"message":"No events found for the index: 3"}]
>
> As per the discussion with the SP folks, i have raised an issue[1]
> regarding on these failures.
>
> [1] https://github.com/wso2/product-sp/issues/836
>
>
>
> Thanks,
> Vasanth
>
> On Tue, Sep 25, 2018 at 12:02 PM Nisala Nanayakkara 
> wrote:
>
>> Hi Mohan,
>>
>> As discussed offline, I will do the improvement to print the error trace
>> here.
>>
>> Thanks,
>> Nisala
>>
>> On Mon, Sep 24, 2018 at 8:59 PM Mohanadarshan Vivekanandalingam <
>> mo...@wso2.com> wrote:
>>
>>> Hi Damith/Nisala,
>>>
>>> I think, we could improve the error handling bit more. Seems like we are
>>> not printing the error trace here. Shall we improve that?
>>>
>>> Thanks,
>>> Mohan
>>>
>>> On Fri, Sep 21, 2018 at 7:38 PM, Damith Wickramasinghe >> > wrote:
>>>
 Hi vasanthan,

 It seems active node cannot create a tcp connection to passive node.
 Please make sure above advertisedHost value should be the host of own node.
 Not the host of other node.  If they are correct then try to telnet to
 passive node {passive node host} 9893 from active node.  I think you may
 need a host mapping too.

 Adding thilina since he did a same setup with new HA.


 Regards,
 Damith.

 On Fri, Sep 21, 2018 at 1:35 PM Vasanthan Sivalingam <
 vasant...@wso2.com> wrote:

>
> Hi Sp team,
>
> With the latest 4.3.0 release an HA deployment was done with
> kubernetes. the deployment configurations has been done as [1] and [2]. It
> was noticed that the active node is not communicating with the passive 
> node
> with the following logs.
>
> ...
> [2018-09-21 11:54:32,435]  INFO
> {org.wso2.carbon.stream.processor.core.internal.StreamProcessorService} -
> Setting SinksHandlers of TestSiddhiApp to Active
> [2018-09-21 11:54:32,436]  INFO
> {org.wso2.carbon.stream.processor.core.internal.StreamProcessorService} -
> Setting RecordTableHandlers of TestSiddhiApp to Active
> [2018-09-21 11:54:32,436]  INFO
> {org.wso2.carbon.stream.processor.core.internal.StreamProcessorService} -
> Siddhi App TestSiddhiApp deployed successfully
> [2018-09-21 11:54:32,446]  INFO
> {org.wso2.carbon.kernel.internal.CarbonStartupHandler} - WSO2 Stream
> Processor started in 6.922 sec
> [*2018-09-21 11:54:33,377] ERROR
> {org.wso2.carbon.stream.processor.core.persistence.PersistenceManager} -
> Error in getting a connection to the Passive node. null*
> [2018-09-21 11:54:33,379] DEBUG
> {org.wso2.carbon.stream.processor.core.ha.HACoordinationSourceHandler} -
> Active Node: Saving state of Source Handler with Id TestSiddhiApp-1 with
> timestamp 0
> [2018-09-21 11:54:33,395] ERROR
> {org.wso2.carbon.stream.processor.core.persistence.PersistenceManager} -
> Error in getting the TCP connection to the passive node. Hence not sending
> the control message to the passive node
> [2018-09-21 11:55:31,531]  INFO
> {org.wso2.carbon.stream.processor.core.persistence.PersistenceManager} -
> siddhi Apps are persisted successfully.
> ...
>
> The deployment config was done as below,
>
> deployment.config:
>   type: ha
>   eventSyncServer:
> host: localhost
> port: 9893
> advertisedHost: sp-ha-node-1
> advertisedPort: 9893
> bossThreads: 10
> workerThreads: 10
>   eventSyncClientPool:
> maxActive: 10
> maxTotal: 10
> maxIdle: 10
> maxWait: 6
> minEvictableIdleTimeMillis: 12
>
> Attached the log file.
> Can you please suggest a method to make this communication work
> between active node and the passive node.
>
> [1]
> 

Re: [Dev] [Architecture] [VOTE] Release WSO2 Identity Server 5.7.0 RC3

2018-09-14 Thread KasunG Gajasinghe
Hi Pasindu, Sentha,

On Fri, Sep 14, 2018 at 11:10 AM Pasindu Jayaweera 
wrote:

> Hi all,
> TestGrid team has executed integration-tests with the RC and please find
> the effort in [1].
> We have observed bunch of test cases failing in our automated runs.
> However when re-executing the failed ones and also doing the manual
> testing, we observed the amount of failing test cases were reduced further.
> Given that the team has tested the same set of test cases in same hardware
> combinations and since they are passing, it could be an environment related
> issue, which might need more time to investigate.
>

Yes, sure. If there are any minor test-level failures, we can skip them for
this vote. I think IS folks can analyze and investigate this report better
by themselves as well. :)


We are doing more investigation to make sure that the intermittent issues
> we see are product-level issues, or intg-test case level issues.
> So, please allow some time for Testgrid to cast the vote.
>
> Thanks.
> Regards,
>
> [1] - Testgrid effort on testing IS 5.7.0 RCs
>
> Thanks.
> Regards,
> On Fri, Sep 14, 2018 at 10:08 AM Thumilan Mikunthan 
> wrote:
>
>> Hi all,
>> I have test the following scenarios on IS 5.7.0 RC3 pack and did not
>> encounter any issues.
>>   UMA 2.0 Flow
>>
>>- Obtain access token using password grant.
>>- Entitlement policy creation using write policy in xml and
>>publishing.
>>- Create,delete update nad view  resources and read description of
>>resource by invoking UMA registration endpoint.
>>
>> [+] Stable - Go ahead and release
>>
>> Best Regards,
>> M.Thumilan
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> *Pasindu Jayaweera*
> Software Engineer | WSO2 Inc
> Mobile: +94 718187375
> Blog: blog.pasindujayaweera.com
> 
>
> --

*Kasun Gajasinghe*Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-09-03 Thread KasunG Gajasinghe
On Mon, Sep 3, 2018 at 11:38 AM Tharindu Wijewardane 
wrote:

> Hi all,
>
> An update on the previous email.
>
> In order to automatically generate osgi metadata xmls during the maven
> build either of following annotation schemas can be used.
>
>
>- Felix SCR annotations
>- OSGi declarative services (DS) annotations
>
> Older versions of maven scr plugin has used felix scr annotations but
> later on its mentioned on the documentations that it has started to support
> both felix scr annotations and DS annotations from osgi which is the
> standard set of annotations for generating osgi meta data xmls. This is
> done by adding the relevant dependency to pom with the scr plugin. However
> newer versions of scr plugin do not seem to be supporting felix scr
> annotations and what i found from the community is that the scr plugin is
> in maintenance mode and it is better to use maven bundle plugin (without
> the scr plugin) which only supports osgi ds annotations.
>
> Since felix scr annotations are used in C4 I had 2 options to proceed.
> Either to fix java 10 compatibility issues in the older version (1.7.4) of
> scr plugin or to convert existing scr annotations in C4 into osgi ds
> annotations so that I can avoid using the scr plugin. I decided its better
> to try and keep the existing annotation schema because changing it affects
> those who use C4 with their own osgi bundles.
> I could fix some compatibility issues in felix.scr.generator-1.1.4 library
> which is a dependency for scr plugin 1.7.4.
> Now OSGI-INF folder structure is generated with the modified felix scr
> generator and felix scr plugin.
>

This is great. Are you going to send this fix to upstream Felix folks?
Where can we find the current fix?


>
> However there are other compatibility issues when building C4 with java 10
> which I am currently trying to fix.
>
>
I think building C4 products with Java 10 is a secondary effort. I think
the priority is to get the product runtime to work in Java 10. This is what
we did with Java 7 -> 8 migration as well afair. So, can we run the
products built with Java 8 on Java 10 now?


> Thanks
>
>
> On Wed, Aug 29, 2018 at 5:17 PM, Tharindu Wijewardane 
> wrote:
>
>> Hi all,
>>
>> registry.xboot module has 3 java interfaces (SQLXML, RowId and NClob)
>> they were empty and has the comment: Dummy implementation for jdk6.
>> I removed that module and went ahead.
>>
>> However I'm facing issues getting the maven-scr-plugin to generate the
>> "scr-plugin-generated" folder which contains the serviceComponents.xml etc.
>>
>> Following error occurs if I use the existing scr plugin version with java
>> 10.
>>
>> [ERROR] Failed to execute goal
>> org.apache.felix:maven-scr-plugin:1.7.4:scr (generate-scr-scrdescriptor) on
>> project carbon-kernel: Execution generate-scr-scrdescriptor of goal
>> org.apache.felix:maven-scr-plugin:1.7.4:scr failed:
>> org.apache.felix.scrplugin.tags.annotation.AnnotationTagProvider is not an
>> ImageIO SPI class
>>
>>
>> When I upgrade the maven scr plugin version to 1.26.0 (latest) it
>> complains that "No annotation processors found in classpath"
>> So I added org.apache.felix.scr.annotations as an dependency according to
>> instructions in Apache Felix documentation.
>>
>> Now i am getting the following error because scr-plugin-generated folder
>> structure is still not generated.
>>
>> [ERROR] Manifest
>> org.wso2.carbon:org.wso2.carbon.registry.core:bundle:4.4.34-SNAPSHOT :
>> Input file does not exist:
>> target/scr-plugin-generated/OSGI-INF/serviceComponents.xml
>>
>> I have tried this with multiple scr plugin versions and with and without
>> upgrading the equinox version.
>>
>> No information is available on this issue in the community. Nobody seems
>> to be using java 10 for OSGI stuff.
>> I have asked about this issue on stackoverflow and apache felix users'
>> mailing list.
>> I am posting this in this thread as an update.
>>
>> Any help is appreciated.
>>
>>
>> On Mon, Aug 27, 2018 at 1:25 PM, Praminda Jayawardana 
>> wrote:
>>
>>> Yes, even if we get passed this error now, this will be problematic
>>> later at the startup.
>>>
>>> On Mon, Aug 27, 2018 at 1:19 PM KasunG Gajasinghe 
>>> wrote:
>>>
>>>>
>>>> Why a java.* package classes are added to our source tree?
>>>>
>>>> carbon-kernel/core/org.wso2.ca
>>>> rbon.registry.xboot/src/main/java/java/sql/SQLXML.java
>>>>
>>>>
>>>> O

Re: [Dev] Upgrading C4 OSGi to support Java 10

2018-08-27 Thread KasunG Gajasinghe
Why a java.* package classes are added to our source tree?

carbon-kernel/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/SQLXML.java


On Mon, Aug 27, 2018 at 1:13 PM Tharindu Wijewardane 
wrote:

>
> Thanks Praminda.
> I used sisu_ artifacts to build carbon p2 plugin.
>
> As for the equinox, since eclipse does not publish newer versions of the
> equinox through maven repository I downloaded the latest version (Photon)
> and manually installed all the jars in my local maven repo using "wso2" as
> a prefix for the group ids of the artifacts. Then I updated the poms in
> carbon kernal (C4) to use the new jars and fixed compilation issues due to
> class movements.
>
> However I could not solve the following issue yet.
>
> [ERROR] Failed to execute goal
> org.apache.felix:maven-scr-plugin:1.26.0:scr (generate-scr-scrdescriptor)
> on project org.wso2.carbon.registry.xboot:
> /Users/tharindu/IdeaProjects/carbon-kernel/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/SQLXML.java
> : Unable to scan class files: java.sql.SQLXML (Class file format probably
> not supported by ASM ?): IllegalArgumentException
>
> I used the latest version of maven-scr-plugin.
>
>
> On Thu, Aug 23, 2018 at 4:37 PM, Praminda Jayawardana 
> wrote:
>
>> import for P2applicationlauncher should be changed from *import
>> org.eclipse.tycho.p2.facade.in
>> ternal.P2ApplicationLauncher *to 
>> *import
>> org.eclipse.sisu.equinox.launching.internal.P2ApplicationLauncher*
>> aswell.
>>
>> On Thu, Aug 23, 2018 at 4:20 PM Praminda Jayawardana 
>> wrote:
>>
>>> Hi Tharindu,
>>>
>>> Tycho plugin we are using at the moment is not compatible with Java 10
>>> as I know.
>>> Using following dependencies,
>>>
>>> 
>>> org.eclipse.tycho
>>> sisu-equinox-embedder
>>> 1.2.0
>>> 
>>> 
>>> org.eclipse.tycho
>>> sisu-equinox-launching
>>> 1.2.0
>>> 
>>> 
>>> org.eclipse.tycho
>>> tycho-p2-facade
>>> 1.2.0
>>> 
>>>
>>> in place of below old tycho dependencies should work. These changes are
>>> to be made in maven-tools/carbon-p2-plugin/pom.xml
>>>
>>> 
>>> org.eclipse.tycho
>>> tycho-equinox
>>> ${tycho.version}
>>> 
>>> 
>>> org.eclipse.tycho
>>> tycho-equinox-launching
>>> ${tycho.version}
>>> 
>>> 
>>> org.eclipse.tycho
>>> tycho-p2-facade
>>> ${tycho.version}
>>> 
>>>
>>> Thanks,
>>> Praminda
>>>
>>> On Thu, Aug 23, 2018 at 3:26 PM Afkham Azeez  wrote:
>>>
 May be the latest plugin after the upgrade requires additional
 configuration. Please check why the NPE is thrown and we can figure out
 what is missing from there.

 On Thu, Aug 23, 2018 at 9:03 AM Tharindu Wijewardane <
 tharin...@wso2.com> wrote:

> Hi all,
>
> Following is what I have done so far. I have sent an email to
> dev@wso2.org earlier but its still being held with the reason "Post
> by non-member to a members-only list".
>
> First I tried to build the 2.5.0 release of product-apim as it is with
> java 10 and the build of p2-profile module failed with the following jar
>
>
>
> .m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110725-1610.jar
>
> Since it is included through carbon-p2-plugin module of the
> maven-tools project I built the module using java 10 and use it to build
> product-apim. Then the issue with the jar resolved but I got the following
> issue when building p2-profile module.
>
> [ERROR] java.lang.NullPointerException
> java.lang.RuntimeException: java.lang.NullPointerException
> at org.eclipse.tycho.p2.facade.internal.P2ApplicationLauncher.execute
> (P2ApplicationLauncher.java:132)
> at org.wso2.maven.p2.RepositoryGenMojo.generateRepository
> (RepositoryGenMojo.java:253)
> at org.wso2.maven.p2.RepositoryGenMojo.createRepo
> (RepositoryGenMojo.java:204)
> at org.wso2.maven.p2.RepositoryGenMojo.execute
> (RepositoryGenMojo.java:191)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> (DefaultBuildPluginManager.java:137)
>
> Furthermore, I was able to build tycho-equinox, tycho-p2-facade and
> tycho-equinox-launching packages individually with jdk 10 but with the
> maven compiler plugin release config as 8.
>
> 
>
> org.apache.maven.plugins
>
> maven-compiler-plugin
>
>  3.7.0
>
>  
>
>   8
>
>  
>
>  
>
>
> I have tried building carbon-kernel with java 10 and failed due to the
> following error.
>
> [ERROR] Failed to execute goal
> org.apache.felix:maven-scr-plugin:1.7.4:scr (generate-scr-scrdescriptor) 
> on
> project carbon-kernel: Execution generate-scr-scrdescriptor of goal
> org.apache.felix:maven-scr-plugin:1.7.4:scr failed:
> 

Re: [Dev] [APIM 2.x.y] Can I plug a Custom File System Provider ?

2018-08-24 Thread KasunG Gajasinghe
Hi Youcef,


On Fri, Aug 24, 2018 at 5:11 PM Youcef HILEM 
wrote:

> Thank you very much.
> We will therfore implement two solutions:
> - One based on S3 with a Cassandra back-end
> (https://github.com/exoscale/pithos)
>

Interesting. I'm curious why not use AWS S3 for storage as well? Data
confidentiality concerns?

Does this also mean the ArtifactoryRepository is written independently of
data storage? For people who are already on AWS, using AWS S3 object
storage would make more sense.


> - Another based on kafka with compacted topics
> (http://cloudurable.com/blog/kafka-architecture-log-compaction/index.html)
> and Kafka mirroring (MirrorMaker)
> (https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=27846330
> )
>
> The implementation is less complex with kafka. Moreover the updates will be
> in "real time".
>
>
The deployment task runs every 15seconds, and that's when the manager node
will check for local changes, and check-in/commit the changes to the
external repo. If there were indeed local file changes, carbon sends a
depsync cluster message to rest of the nodes asking to update themselves.
The cluster message is sent almost real-time.

Btw, with S3 sync, you can just commit and retrieve the file diffs. This is
important because you don't want to update the timestamps of unchanged
files. That'll lead to carbon deploying all the depl artifacts again and
again.

How do you plan to send just file diffs with Kafka?

[1]
https://github.com/kasunbg/carbon-kernel-4.x/blob/master/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/deployment/CarbonDeploymentSchedulerTask.java#L141-L147


> Regards
> Youcef HILEM
>
>
>
> --
> Sent from:
> http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Development-f3.html
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 

*Kasun Gajasinghe*Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM 2.x.y] Can I plug a Custom File System Provider ?

2018-08-24 Thread KasunG Gajasinghe
Here it is -
https://github.com/wso2/carbon-commons/blob/master/components/deployment-synchronizer/org.wso2.carbon.deployment.synchronizer/src/main/java/org/wso2/carbon/deployment/synchronizer/ArtifactRepository.java

A reference impl can be found here -
https://github.com/wso2/carbon-commons/blob/master/components/deployment-synchronizer/org.wso2.carbon.deployment.synchronizer.subversion/src/main/java/org/wso2/carbon/deployment/synchronizer/subversion/SVNBasedArtifactRepository.java

Important methods are #init, #commit, #checkout, #getRepositoryType.


On Fri, Aug 24, 2018 at 11:36 AM Nuwan Dias  wrote:

> The Deployment Synchronizer has an interface which could be implemented.
> We could write an S3 implementation for the Deployment Synchronizer.
>
> Can someone point to the Dep-Sync interface and one of the implementations
> please? We had a Registry Based Dep-Sync implementation and a SVN based dep
> sync implementation.
>
> On Thu, Aug 16, 2018 at 10:55 AM Youcef HILEM 
> wrote:
>
>> Hi,
>>
>> I complete my question by specifying my need.
>>
>> As described here
>> (
>> http://sanjeewamalalgoda.blogspot.com/2015/06/deploy-wso2-api-manager-across-multiple.html
>> ),
>> we want to push API published in Master Datacenter to a shaared server and
>> let Read Only nodes pick API config from there (we may not be able to use
>> deployment synchronizer here).
>>
>> How to deposit and read this artifacts from the shared server?
>>
>> Thanks
>> Youcef
>>
>>
>>
>> --
>> Sent from:
>> http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Development-f3.html
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> Nuwan Dias
>
> Director - WSO2, Inc. http://wso2.com
> email : nuw...@wso2.com
> Phone : +94 777 775 729
>


-- 

*Kasun Gajasinghe*Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 Committers += Asma Jabir

2018-05-17 Thread KasunG Gajasinghe
Hi all,

It's my pleasure to announce Asma Jabir as a WSO2 Committer. She has been a
valuable contributor to WSO2 Testgrid and Carbon platform.

Congratulations Asma and keep up the good work!!.

Thanks,
KasunG

-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 DAS Analytics

2018-03-14 Thread KasunG Gajasinghe
Please check this one.. [1] Each wso2 product has a user-mgt.xml. So, you
can add your userstore into that file. This duplicates the userstore
configuration.

Other option is to enable single-sign-on, and use an identity provider like
WSO2 IS for that purpose.

[1] https://docs.wso2.com/display/IS541/Configuring+the+Primary+User+Store

On Wed, Mar 14, 2018 at 3:12 PM, Pendekal Sanketh <
pendekal.sank...@bridgesgi.com> wrote:

> Thank you,
>
>  If there's any tutorial for that please do share.
> ------
> *From:* KasunG Gajasinghe <kas...@wso2.com>
> *Sent:* Wednesday, March 14, 2018 3:11:05 PM
> *To:* Pendekal Sanketh
>
> *Cc:* WSO2 Developers' List
> *Subject:* Re: [Dev] WSO2 DAS Analytics
>
>
> Yes, you can share the userstores across any WSO2 Carbon products.
>
> On Wed, Mar 14, 2018 at 2:58 PM, Pendekal Sanketh <
> pendekal.sank...@bridgesgi.com> wrote:
>
>  I need to know if we can share the user store between WSO2 DAS and
> WSO2 EI?
> --
> *From:* Pendekal Sanketh
> *Sent:* Thursday, March 8, 2018 3:18:38 PM
> *To:* kas...@wso2.com
> *Cc:* WSO2 Developers' List
>
> *Subject:* Re: [Dev] WSO2 DAS Analytics
>
>
> Thank you.
>
>
> And on last thing I need to know if we can share the user store between
> DAS and EI?
>
>
>
> --
> *From:* KasunG Gajasinghe <kas...@wso2.com>
> *Sent:* Thursday, March 8, 2018 3:09 PM
> *To:* Gihan Anuruddha
> *Cc:* Yohanna Fernando; Pendekal Sanketh; WSO2 Developers' List
> *Subject:* Re: [Dev] WSO2 DAS Analytics
>
> Hi Pendekal,
>
> Usage Plan Information only taken into consideration if you do a
> on-premise Stratos Cloud deployment. This is not the case for you.
> Therefore, you can disregard that part of the configuration. I think the
> usage plan should have been called something like 'default'.
>
>
> On Thu, Mar 8, 2018 at 2:36 PM, Gihan Anuruddha <gi...@wso2.com> wrote:
>
> EI analytics do not support any customization. You need to use DAS for all
> the customization use cases.
>
> On Mon, Mar 5, 2018 at 2:47 PM, Yohanna Fernando <yoha...@wso2.com> wrote:
>
> Hi Sanketh,
>
> I have forwarded your query to dev@wso2.org.
>
> Thanks,
>
> Yohanna
>
>
>
> On Thu, Mar 1, 2018 at 11:10 PM, Pendekal Sanketh <
> pendekal.sank...@bridgesgi.com> wrote:
>
> Hey,
>
> I have been going through WSO2 das analytics session. I found an tab
> for 'mutlitenancy' in DAS console. Under this section I found Usage Plan
> Information which had only DEMO option, are there any other plans
> available? If so, please notify me about it.
>
> And in EI analytics console, I found it's not possible to simulate events
> outside EI,i.e, I was unable to send the payload info to my custom created
> datasource and I was unable to generate my custom widget in EI analytics
> console dashboard. I would like to know why is that and what would be
> possible solution?
>
>
> Thank you,
>
> Regards
>
> Sanketh
> --
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> It may also be privileged or otherwise protected by work product immunity
> or other legal rules. If you have received it by mistake, please let us
> know by e-mail reply and delete it from your system; you may not copy this
> message or disclose its contents to anyone.
>
>
>
>
> --
> Yohanna Fernando
> Training & Certification
> WSO2 Inc.
> http://wso2.com
>
> E-mail: yoha...@wso2.com
> Cell: +94779021159 <077%20902%201159>
> <http://wso2con.com/>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
> --
> W.G. Gihan Anuruddha
> Associate Technical Lead | WSO2, Inc.
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
> --
>
> *Kasun Gajasinghe *Associate Technical Lead, WSO2 Inc.
> email: kasung AT spamfree wso2.com
> linked-in: http://lk.linkedin.com/in/gajasinghe
> <http://lk.linkedin.com/in/gajasinghe>
> Kasun Gajasinghe - Associate Technical Lead - Identity & Access Management
> - WSO2 | LinkedIn <http://lk.linkedin.com/in/gajasinghe>
> lk.linkedin.com
> View Kasun Gajasinghe’s professional profile on LinkedIn. LinkedIn is the
> world's largest business network, helping professionals like Kasun
> Gajasinghe discover inside connections to recommended job candidates,
&

Re: [Dev] WSO2 DAS Analytics

2018-03-14 Thread KasunG Gajasinghe
Yes, you can share the userstores across any WSO2 Carbon products.

On Wed, Mar 14, 2018 at 2:58 PM, Pendekal Sanketh <
pendekal.sank...@bridgesgi.com> wrote:

>  I need to know if we can share the user store between WSO2 DAS and
> WSO2 EI?
> --
> *From:* Pendekal Sanketh
> *Sent:* Thursday, March 8, 2018 3:18:38 PM
> *To:* kas...@wso2.com
> *Cc:* WSO2 Developers' List
>
> *Subject:* Re: [Dev] WSO2 DAS Analytics
>
>
> Thank you.
>
>
> And on last thing I need to know if we can share the user store between
> DAS and EI?
>
>
>
> --
> *From:* KasunG Gajasinghe <kas...@wso2.com>
> *Sent:* Thursday, March 8, 2018 3:09 PM
> *To:* Gihan Anuruddha
> *Cc:* Yohanna Fernando; Pendekal Sanketh; WSO2 Developers' List
> *Subject:* Re: [Dev] WSO2 DAS Analytics
>
> Hi Pendekal,
>
> Usage Plan Information only taken into consideration if you do a
> on-premise Stratos Cloud deployment. This is not the case for you.
> Therefore, you can disregard that part of the configuration. I think the
> usage plan should have been called something like 'default'.
>
>
> On Thu, Mar 8, 2018 at 2:36 PM, Gihan Anuruddha <gi...@wso2.com> wrote:
>
> EI analytics do not support any customization. You need to use DAS for all
> the customization use cases.
>
> On Mon, Mar 5, 2018 at 2:47 PM, Yohanna Fernando <yoha...@wso2.com> wrote:
>
> Hi Sanketh,
>
> I have forwarded your query to dev@wso2.org.
>
> Thanks,
>
> Yohanna
>
>
>
> On Thu, Mar 1, 2018 at 11:10 PM, Pendekal Sanketh <
> pendekal.sank...@bridgesgi.com> wrote:
>
> Hey,
>
> I have been going through WSO2 das analytics session. I found an tab
> for 'mutlitenancy' in DAS console. Under this section I found Usage Plan
> Information which had only DEMO option, are there any other plans
> available? If so, please notify me about it.
>
> And in EI analytics console, I found it's not possible to simulate events
> outside EI,i.e, I was unable to send the payload info to my custom created
> datasource and I was unable to generate my custom widget in EI analytics
> console dashboard. I would like to know why is that and what would be
> possible solution?
>
>
> Thank you,
>
> Regards
>
> Sanketh
> --
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> It may also be privileged or otherwise protected by work product immunity
> or other legal rules. If you have received it by mistake, please let us
> know by e-mail reply and delete it from your system; you may not copy this
> message or disclose its contents to anyone.
>
>
>
>
> --
> Yohanna Fernando
> Training & Certification
> WSO2 Inc.
> http://wso2.com
>
> E-mail: yoha...@wso2.com
> Cell: +94779021159 <077%20902%201159>
> <http://wso2con.com/>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
> --
> W.G. Gihan Anuruddha
> Associate Technical Lead | WSO2, Inc.
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
> --
>
> *Kasun Gajasinghe *Associate Technical Lead, WSO2 Inc.
> email: kasung AT spamfree wso2.com
> linked-in: http://lk.linkedin.com/in/gajasinghe
> <http://lk.linkedin.com/in/gajasinghe>
> Kasun Gajasinghe - Associate Technical Lead - Identity & Access Management
> - WSO2 | LinkedIn <http://lk.linkedin.com/in/gajasinghe>
> lk.linkedin.com
> View Kasun Gajasinghe’s professional profile on LinkedIn. LinkedIn is the
> world's largest business network, helping professionals like Kasun
> Gajasinghe discover inside connections to recommended job candidates,
> industry experts, and business partners.
>
>
> blog: http://kasunbg.org
> phone: +1 650-745-4499 <+1%20650-745-4499>, 77 678 0813
>
> --
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> It may also be privileged or otherwise protected by work product immunity
> or other legal rules. If you have received it by mistake, please let us
> know by e-mail reply and delete it from your system; you may not copy this
> message or disclose its contents to anyone.
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 DAS Analytics

2018-03-08 Thread KasunG Gajasinghe
Hi Pendekal,

Usage Plan Information only taken into consideration if you do a on-premise
Stratos Cloud deployment. This is not the case for you. Therefore, you can
disregard that part of the configuration. I think the usage plan should
have been called something like 'default'.


On Thu, Mar 8, 2018 at 2:36 PM, Gihan Anuruddha  wrote:

> EI analytics do not support any customization. You need to use DAS for all
> the customization use cases.
>
> On Mon, Mar 5, 2018 at 2:47 PM, Yohanna Fernando  wrote:
>
>> Hi Sanketh,
>>
>> I have forwarded your query to dev@wso2.org.
>>
>> Thanks,
>>
>> Yohanna
>>
>>
>>
>> On Thu, Mar 1, 2018 at 11:10 PM, Pendekal Sanketh <
>> pendekal.sank...@bridgesgi.com> wrote:
>>
>>> Hey,
>>>
>>> I have been going through WSO2 das analytics session. I found an tab
>>> for 'mutlitenancy' in DAS console. Under this section I found Usage Plan
>>> Information which had only DEMO option, are there any other plans
>>> available? If so, please notify me about it.
>>>
>>> And in EI analytics console, I found it's not possible to simulate
>>> events outside EI,i.e, I was unable to send the payload info to my
>>> custom created datasource and I was unable to generate my custom widget in
>>> EI analytics console dashboard. I would like to know why is that and what
>>> would be possible solution?
>>>
>>>
>>> Thank you,
>>>
>>> Regards
>>>
>>> Sanketh
>>> --
>>> This email and any files transmitted with it are confidential and
>>> intended solely for the use of the individual or entity to whom they are
>>> addressed. It may also be privileged or otherwise protected by work product
>>> immunity or other legal rules. If you have received it by mistake, please
>>> let us know by e-mail reply and delete it from your system; you may not
>>> copy this message or disclose its contents to anyone.
>>>
>>
>>
>>
>> --
>> Yohanna Fernando
>> Training & Certification
>> WSO2 Inc.
>> http://wso2.com
>>
>> E-mail: yoha...@wso2.com
>> Cell: +94779021159 <077%20902%201159>
>> 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> W.G. Gihan Anuruddha
> Associate Technical Lead | WSO2, Inc.
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [OAuth2.0] [Token Binding] Need delimiter for security tokens

2017-11-20 Thread KasunG Gajasinghe
+dev

On Tue, Nov 21, 2017 at 9:14 AM, Inthirakumaaran Tharmakulasingham <
inthirakumaa...@wso2.com> wrote:

> ya with bas64 it will look like
>
> Access-Token = BASE64ENCODE(SHA256-Hash(TokenBindingID) + 

Re: [Dev] [OAuth2.0] [Token Binding] Need delimiter for security tokens

2017-11-20 Thread KasunG Gajasinghe
OK... So, following is the syntax right? I take it you base64 encode this
as well?

Access-Token = SHA256-Hash(TokenBindingID) + 

[Dev] WSO2 Committers += Dinali Dabarera

2017-11-15 Thread KasunG Gajasinghe
Hi All,

It's my pleasure to announce Dinali Dabarera as a WSO2 Committer.

She has made a great contribution to IS by developing multiple features,
and in recognition of her contribution, dedication and commitment she has
been voted as a WSO2 committer.

Congratulations Dinali and keep up the good work...!

Thanks,
KasunG

-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Extending BCJSSE for Token binding

2017-11-13 Thread KasunG Gajasinghe
On Mon, Nov 13, 2017 at 1:03 PM, Inthirakumaaran Tharmakulasingham <
inthirakumaa...@wso2.com> wrote:

> I think there is a signature verification problem when using bouncy castle
> provider.You can find the details of the past problem in the link[1].(got
> this problem 3 years ago)
>
>
Alright, and there is a fix as well. So, this is not really an issue. :-)


> I started the conversation with BC developers and they're not going to
> implement token binding extension by them self in near future.The new
> extension, they added on user request was a small one and they already
> had implemented it but commented out for some reason.Details about that
> extension are in this link[2].But they are okay with sending PR for token
> binding implementation.If it is merged then we can reach java community
> easily.More details about the conversation can be found at this link[3].
>

Yes. Do keep them engaged, and send an early draft PR to BC community for
reviewing. This is going good. :)

Thanks,
KasunG


>
> When I talked to BC providers they mentioned about an extension API which
> can be used to add a new extension in the handshake.I did some digging into
> that and it seems is possible to create a token binding extension and have
> to put that into that API.Rest of the negotiations will be done by that
> API.So currently I am in the process of developing an extension that could
> fit into that API.
>
> Reference:
>   [1]Bouncy castle issue mail thread
> <http://wso2-oxygen-tank.10903.n7.nabble.com/Error-bcprov-jdk15on-1-49-0-wso2v1-jar-has-unsigned-entries-org-bouncycastle-LICENSE-class-td103606.html>
>   [2]https://github.com/bcgit/bc-java/issues/234
>   [3]https://github.com/bcgit/bc-java/issues/250
>
>
>
> On Fri, Nov 10, 2017 at 8:34 AM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>> Hi Indra,
>>
>> Can you find out exactly what issues we faced before? I'm assuming it has
>> something to do with jar signing.
>>
>> The work we are doing is not specific to wso2 but applies to entire Java
>> community and bouncycastle users. So, our end goal should be get this
>> merged into bouncycastle project.
>>
>> Please start a dialogue with BC developers asap. They are on GitHub now I
>> suppose.
>>
>> Bouncycastle just added a new tls extension last month, and the community
>> quite active.
>>
>> @Prabath, please share your thoughts.
>>
>> Thanks,
>> KasunG
>>
>> On Thu, Nov 9, 2017 at 2:10 PM Inthirakumaaran Tharmakulasingham <
>> inthirakumaa...@wso2.com> wrote:
>>
>>> Hi,
>>> I am trying to create a Token binding library for TLS layer.One option
>>> for this to extend BCJSSE and write the implementations on top of it.But in
>>> the past, there have been some issues in making changes in Bouncy
>>> Castle.How can I proceed with this?OR any better way to write the library?
>>>
>>> Basically, our intention is to make a token binding library so that
>>> anyone can create HTTP client which can support token binding.Thus we hope
>>> to send a PR to BC after completing the implementation.
>>>
>>>
>>> --
>>> Inthirakumaaran
>>> Software Engineering - Intern | WSO2
>>>
>>> Email: inthirakumaa...@wso2.com
>>> Mobile:0766598050 <076%20659%208050>
>>>
>>> --
>>
>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>> email: kasung AT spamfree wso2.com
>> linked-in: http://lk.linkedin.com/in/gajasinghe
>> blog: http://kasunbg.org
>> phone: +1 650-745-4499 <(650)%20745-4499>, 77 678 0813
>>
>>
>
>
>
> --
> Inthirakumaaran
> Software Engineering - Intern | WSO2
>
> Email: inthirakumaa...@wso2.com
> Mobile:0766598050 <076%20659%208050>
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Extending BCJSSE for Token binding

2017-11-09 Thread KasunG Gajasinghe
Hi Indra,

Can you find out exactly what issues we faced before? I'm assuming it has
something to do with jar signing.

The work we are doing is not specific to wso2 but applies to entire Java
community and bouncycastle users. So, our end goal should be get this
merged into bouncycastle project.

Please start a dialogue with BC developers asap. They are on GitHub now I
suppose.

Bouncycastle just added a new tls extension last month, and the community
quite active.

@Prabath, please share your thoughts.

Thanks,
KasunG

On Thu, Nov 9, 2017 at 2:10 PM Inthirakumaaran Tharmakulasingham <
inthirakumaa...@wso2.com> wrote:

> Hi,
> I am trying to create a Token binding library for TLS layer.One option for
> this to extend BCJSSE and write the implementations on top of it.But in the
> past, there have been some issues in making changes in Bouncy Castle.How
> can I proceed with this?OR any better way to write the library?
>
> Basically, our intention is to make a token binding library so that anyone
> can create HTTP client which can support token binding.Thus we hope to send
> a PR to BC after completing the implementation.
>
>
> --
> Inthirakumaaran
> Software Engineering - Intern | WSO2
>
> Email: inthirakumaa...@wso2.com
> Mobile:0766598050
>
> --

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to mock the CarbonContext?

2017-10-10 Thread KasunG Gajasinghe
Please note that you need to set the carbon.home system property before
initializing privilegedcarboncontext.

System.setProperty("carbon.home", );

On Thu, Oct 5, 2017 at 12:18 AM, KasunG Gajasinghe <kas...@wso2.com> wrote:

>
> CarbonContext is a thread-local variable. That means the carbon context
> can be accessible from anywhere within a given thread. So, you may not need
> to mock it!
>
> Since the test class and the testing class runs in the same thread, we can
> try to populate the CarbonContext in the @Test method before actual testing
> class invocations.
>
> Please see the following code example:
>
> @Test
> public void testSetClaimValue() throws Exception{
> try {
> PrivilegedCarbonContext.startTenantFlow();
> PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(
> MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
> PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(
> MultitenantConstants.SUPER_TENANT_ID);
>
> //actual test code and assertions
>
> } finally {
> PrivilegedCarbonContext.endTenantFlow();
> }
>
> }
>
> We of course need to test this out. But I think this is ideal if this
> works.
>
>
>
> On Wed, Oct 4, 2017 at 10:42 PM, Dharshana Warusavitharana <
> dharsha...@wso2.com> wrote:
>
>> Hi Sivaramya,
>>
>> You dont have to mock the whole carbon context here. You can send a mock
>> payload when the particular method is called.
>>
>> Are you using powerMock + mockito if so do as the document sample in [1].
>>
>> [1]. https://github.com/searls/mockito-testng-example/blob/
>> master/presentation/Mockito.pdf
>>
>> Thank you,
>> Dharshana.
>>
>>
>>
>> On Wed, Oct 4, 2017 at 9:55 PM, Malaka Silva <mal...@wso2.com> wrote:
>>
>>> +Dharshana
>>>
>>> On Wed, Oct 4, 2017 at 8:26 PM, Sivaramya Sivanathan <sivara...@wso2.com
>>> > wrote:
>>>
>>>> Hi all,
>>>>
>>>> Currently I am working on the unit testing for the esb-connector-jms
>>>> extension. For that I need to mock the CarbonContext for the method
>>>> CarbonContext.getThreadLocalCarbonContext().getTenantId(). But, I'm
>>>> unable mock the CarbonContext.
>>>> Can any one suggest me how can we mock the CarbonContext?
>>>>
>>>> Thanks,
>>>> Sivaramya Sivanathan
>>>> Associate Software Engineer | WSO2
>>>> Tel: 0770874960 <077%20087%204960>
>>>> WSO2 Inc : http://wso2.org
>>>> <http://www.google.com/url?q=http%3A%2F%2Fwso2.org=D=1=AFQjCNE_eTDfyl2ibPcq0hcXvRDNVuQmMg>
>>>> LinkedIn | www.linkedin.com/in/sivaramya
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Best Regards,
>>>
>>> Malaka Silva
>>> Associate Director / Architect
>>> M: +94 777 219 791 <077%20721%209791>
>>> Tel : 94 11 214 5345
>>> Fax :94 11 2145300 <011%202%20145300>
>>> Skype : malaka.sampath.silva
>>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>>> Blog : http://mrmalakasilva.blogspot.com/
>>>
>>> WSO2, Inc.
>>> lean . enterprise . middleware
>>> https://wso2.com/signature
>>> http://www.wso2.com/about/team/malaka-silva/
>>> <http://wso2.com/about/team/malaka-silva/>
>>> https://store.wso2.com/store/
>>>
>>> Don't make Trees rare, we should keep them with care
>>>
>>
>>
>>
>> --
>>
>> Dharshana Warusavitharana
>> Associate Technical Lead
>> WSO2 Inc. http://wso2.com
>> email : dharsha...@wso2.com <dharsha...@wso2.com>
>> Tel  : +94 11 214 5345
>> Fax :+94 11 2145300 <011%202%20145300>
>> cell : +94770342233 <077%20034%202233>
>> blog : http://dharshanaw.blogspot.com
>>
>> lean . enterprise . middleware
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
> email: kasung AT spamfree wso2.com
> linked-in: http://lk.linkedin.com/in/gajasinghe
> blog: http://kasunbg.org
> phone: +1 650-745-4499 <+1%20650-745-4499>, 77 678 0813
>
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to mock the CarbonContext?

2017-10-04 Thread KasunG Gajasinghe
CarbonContext is a thread-local variable. That means the carbon context can
be accessible from anywhere within a given thread. So, you may not need to
mock it!

Since the test class and the testing class runs in the same thread, we can
try to populate the CarbonContext in the @Test method before actual testing
class invocations.

Please see the following code example:

@Test
public void testSetClaimValue() throws Exception{
try {
PrivilegedCarbonContext.startTenantFlow();

PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);

PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(MultitenantConstants.SUPER_TENANT_ID);

//actual test code and assertions

} finally {
PrivilegedCarbonContext.endTenantFlow();
}

}

We of course need to test this out. But I think this is ideal if this works.



On Wed, Oct 4, 2017 at 10:42 PM, Dharshana Warusavitharana <
dharsha...@wso2.com> wrote:

> Hi Sivaramya,
>
> You dont have to mock the whole carbon context here. You can send a mock
> payload when the particular method is called.
>
> Are you using powerMock + mockito if so do as the document sample in [1].
>
> [1]. https://github.com/searls/mockito-testng-example/
> blob/master/presentation/Mockito.pdf
>
> Thank you,
> Dharshana.
>
>
>
> On Wed, Oct 4, 2017 at 9:55 PM, Malaka Silva  wrote:
>
>> +Dharshana
>>
>> On Wed, Oct 4, 2017 at 8:26 PM, Sivaramya Sivanathan 
>> wrote:
>>
>>> Hi all,
>>>
>>> Currently I am working on the unit testing for the esb-connector-jms
>>> extension. For that I need to mock the CarbonContext for the method
>>> CarbonContext.getThreadLocalCarbonContext().getTenantId(). But, I'm
>>> unable mock the CarbonContext.
>>> Can any one suggest me how can we mock the CarbonContext?
>>>
>>> Thanks,
>>> Sivaramya Sivanathan
>>> Associate Software Engineer | WSO2
>>> Tel: 0770874960 <077%20087%204960>
>>> WSO2 Inc : http://wso2.org
>>> 
>>> LinkedIn | www.linkedin.com/in/sivaramya
>>>
>>
>>
>>
>> --
>>
>> Best Regards,
>>
>> Malaka Silva
>> Associate Director / Architect
>> M: +94 777 219 791 <077%20721%209791>
>> Tel : 94 11 214 5345
>> Fax :94 11 2145300 <011%202%20145300>
>> Skype : malaka.sampath.silva
>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>> Blog : http://mrmalakasilva.blogspot.com/
>>
>> WSO2, Inc.
>> lean . enterprise . middleware
>> https://wso2.com/signature
>> http://www.wso2.com/about/team/malaka-silva/
>> 
>> https://store.wso2.com/store/
>>
>> Don't make Trees rare, we should keep them with care
>>
>
>
>
> --
>
> Dharshana Warusavitharana
> Associate Technical Lead
> WSO2 Inc. http://wso2.com
> email : dharsha...@wso2.com 
> Tel  : +94 11 214 5345
> Fax :+94 11 2145300 <011%202%20145300>
> cell : +94770342233 <077%20034%202233>
> blog : http://dharshanaw.blogspot.com
>
> lean . enterprise . middleware
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Hazelcast jar update

2017-09-11 Thread KasunG Gajasinghe
We are currently on 3.5.x range - 3.5.4 to be exact. As long as you can
address possible API changes in the new versions, an upgrade should be fine.

Except for the EI's message broker profile, all the Hazelcast usage is
within the package Thusitha mentioned AFAIR. So, you can compile
org.wso2.carbon.core component with the new hazelcast.

We maintain the Hazelcast orbit pom here [2]. This simply wraps the
upstream Hazelcast dependency as an OSGi bundle.

Do keep us updated on how your testing goes!

[2] https://github.com/wso2/orbit/tree/master/hazelcast/3.5.4.wso2v2

Best regards,
KasunG

On Mon, Sep 11, 2017 at 5:49 PM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi Norberto,
>
> If you are trying to upgrade the underlying hazelcast version to newer
> version, you may have to consider all the API changes that will affect the
> carbon core[1].
>
> [1] - https://github.com/wso2/carbon-kernel/tree/4.4.x/core/org.
> wso2.carbon.core/src/main/java/org/wso2/carbon/core/clustering
>
> Thanks
> Thusitha
>
> On Mon, Sep 11, 2017 at 5:44 PM, Norberto Fernandes <
> norbe...@memoryvox.com> wrote:
>
>> Hi,
>>
>> Do you know if there is any concern while updating hazelcast jar present
>> on Integrator distribution into a more recent version of hazelcast?
>>
>> Thanks in advance.
>> Norberto
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
>
> --
> Thusitha Dayaratne
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> Mobile  +94712756809 <071%20275%206809>
> Blog  alokayasoya.blogspot.com
> Abouthttp://about.me/thusithathilina
> 
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499 <+1%20650-745-4499>, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Missing Attributes in Token Introspection Response

2017-08-21 Thread KasunG Gajasinghe
Hi,

On Mon, Aug 21, 2017 at 3:23 PM, Gayan Gunawardana  wrote:

>
>
> On Mon, Aug 21, 2017 at 1:54 PM, Farasath Ahamed 
> wrote:
>
>>
>>
>>
>> On Mon, Aug 21, 2017 at 1:23 PM, Gayan Gunawardana 
>> wrote:
>>
>>>
>>>
>>> On Mon, Aug 21, 2017 at 1:21 PM, Ruwan Abeykoon  wrote:
>>>
 Hi All,
 I think we need to add them in introspection result, since they were
 anyway present in AuthenticationResponse inside JWT.

 @Gayan,
 How about the acr, amr ?

>>> +1 we can add them too.
>>>
>>
>> Can we also consider providing an extension point to decide attributes
>> that go into the introspection response?
>>
> +1 token binding will introduce some more attributes.
>

Yep. OAuth Token Binding needs to add cnf:tbh attribute. This is defined in
[1]. However, we can make this part of the default introspection response
builder as well.

 {
   "active": true,
   "iss": "https://server.example.com;,
   "aud": "https://resource.example.org;,
   "sub": "br...@example.com"
   "iat": 1467324320,
   "exp": 1467324920,*   "cnf":{
 "tbh": "7NRBu9iDdJlYCTOqyeYuLxXv0blEA-yTpmGIrAwKAws"
   }
* }



[1]
https://tools.ietf.org/html/draft-ietf-oauth-token-binding-04#section-3.5


>
>>
>>>
 Cheers,
 Ruwan

 On Mon, Aug 21, 2017 at 11:08 AM, Gayan Gunawardana 
 wrote:

> Hi Indunil,
>
> Form token introspection response I can get below attributes.
>
> {"scope":"openid","active":true,"token_type":"Bearer","exp":
> 1503061170,"iat":1503057570,"client_id":"oRbEK6KkycbSLGxt3JH
> ciaitPzoa","username":"admin@carbon.super"}
>
> But some of optional attributes are not included in introspection
> response
>
>sub
>   OPTIONAL.  Subject of the token, as defined in JWT [RFC7519 
> ].
>   Usually a machine-readable identifier of the resource owner who
>   authorized this token.
>
>aud
>   OPTIONAL.  Service-specific string identifier or list of string
>   identifiers representing the intended audience for this token, as
>   defined in JWT [RFC7519 ].
>
>iss
>   OPTIONAL.  String representing the issuer of this token, as
>   defined in JWT [RFC7519 ].
>
> Do we have any limitation to support above attributes ?
>
>
> [1] https://tools.ietf.org/html/rfc7662
>
> Thanks,
> Gayan
> --
> Gayan Gunawardana
> Senior Software Engineer; WSO2 Inc.; http://wso2.com/
> Email: ga...@wso2.com
> Mobile: +94 (71) 8020933
>





>>>
>>>
>>> --
>>> Gayan Gunawardana
>>> Senior Software Engineer; WSO2 Inc.; http://wso2.com/
>>> Email: ga...@wso2.com
>>> Mobile: +94 (71) 8020933
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>
>
> --
> Gayan Gunawardana
> Senior Software Engineer; WSO2 Inc.; http://wso2.com/
> Email: ga...@wso2.com
> Mobile: +94 (71) 8020933
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Disabling hostname verification on Kernel 4.4.17-SNAPSHOT

2017-08-18 Thread KasunG Gajasinghe
Not all components are using the commons http client. Some are using
java.net.HttpURLConnection. So, if a component uses that, then those need
to be modified.

But, we could have handled that by registering a custom SSLSocketFactory to
HttpURLConnection by looking at the parameter value
of httpclient.hostnameVerifier. See [1] for an example. May be this is
already done?

Btw, we should not remove the previous property in a patch release. The
downstream projects won't be able to keep up with that. It's ok to remove
it from the wso2server.sh, but the code need to honor the
"org.wso2.ignoreHostnameVerification" property IMO.

Without that, all downstream components that handled the above property,
puppet scripts, custom scripts such as *integrator.sh* have to be modified!

[1] https://stackoverflow.com/a/5297100/388714

Thanks,
Kasun

On Thu, Aug 17, 2017 at 3:22 PM, Vidura Nanayakkara 
wrote:

> ​​Hi,
>
> On Thu, Aug 17, 2017 at 7:49 AM, Chandana Napagoda 
> wrote:
>
>> Hi
>>
>> Could you please point the fix you have made to address this issue?
>>
>
> ​As Shariq mentioned, *org.wso2.ignoreHostnameVerification *property was
> removed from Kernel 4.4.17 onwards. With PR [1], commons-httpclient library
> coming from kernel will handle host name verification by itself.  The
> property  *org.wso2.ignoreHostnameVerification* is replaced by
> *httpclient.hostnameVerifier*. The possible values for
> *httpclient.hostnameVerifier *is as described below:
>
>- DefaultAndLocalhost - Verify host name without being strict with
>sub-domains (*.foo.com is allowed to match with a.b.foo.com) and also
>allow local host
>- AllowAll - Allows all hosts
>- Strict - Verify all hosts while being strict with sub-domains (*.
>foo.com is not allowed to match with a.b.foo.com)
>
> Example: httpclient.hostnameVerifier="Strict"
>
> By default, host name verification will happen for all hosts without being
> strict with sub-domains (*.foo.com is allowed to match with a.b.foo.com)
>
> Since host name verification is handled by the commons-httpclient library
> coming from the kernel (with PR [1]), other components do not need to worry
> about handling host name verification. For instance, handling host name
> verification is removed from the jaggery component in PR [2].
>
> [1] https://github.com/wso2/wso2-commons-httpclient/pull/5
> [2] https://github.com/wso2/jaggery/pull/174/
>
>
>>
>> Regards,
>> Chandana
>>
>> On Thu, Aug 17, 2017 at 7:20 AM, Muhammed Shariq  wrote:
>>
>>> On Wed, Aug 16, 2017 at 11:45 PM, Kishanthan Thangarajah <
>>> kishant...@wso2.com> wrote:
>>>


 On Wed, Aug 16, 2017 at 9:48 PM, Nuwandi Wickramasinghe <
 nuwan...@wso2.com> wrote:

> Hi all,
>
> With the latest IS pack built with kernel 4.4.17-SNAPSHOT, we can
> successfully turn off the hostname verification with
> *-Dhttpclient.hostnameVerifier=AllowAll*.
>

 What was the original issue? Farasath has followed the same steps (IS
 with 4.4.17-SNAPSHOT) and mentioned that the above property was not working
 according to the mail above.


> Need to do some code changes from Identity Server side to make the
> newly introduced property effective for some components.
>

 What are the code changes? This property is only used in httpclient
 coming from kernel. So why changes are required at IS side?

>>>
>>> Prior to kernel 4.4.17 there was a property 
>>> *-Dorg.wso2.ignoreHostnameVerification=true
>>> *that was used to disable hostname verification. IINM, the issue here
>>> is some components use this property to disable hostname verification, but
>>> since it's that property has been removed since 4.4.17 that might be
>>> causing some issue, so they are investigating on IS side.
>>>
>>> Nuwandi / Fara - correct me if I am wrong.
>>>


> Since no improvement is needed from kernel side, can we please go
> ahead with the kernel 4.4.17 release?
>
> *-Dhttpclient.hostnameVerifier *is only applicable since 4.4.17, but
> our documentation says it's applicable from 4.4.10 ([1]). Better to fix 
> the
> documentation as well. Reopened [2] since the doc need to be corrected.
>
> [1] https://docs.wso2.com/display/ADMIN44x/Enabling+HostName
> +Verification
> [2] https://wso2.org/jira/browse/DOCUMENTATION-4071
>
> thanks
> Nuwandi
>
> On Wed, Aug 16, 2017 at 5:39 PM, Farasath Ahamed 
> wrote:
>
>>
>>
>>
>> On Tue, Aug 15, 2017 at 8:22 PM, Farasath Ahamed 
>> wrote:
>>
>>> Tested with Kernel 4.4.16, -Dhttpclient.hostnameVerifier=AllowAll
>>> parameter is honoured and worked fine.
>>>
>>
>> I had an offline discussion with Chandana and Thusitha and go to know
>> that *-Dhttpclient.hostnameVerifier=AllowAll* is not supported in
>> kernel as of 

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-27 Thread KasunG Gajasinghe
On Thu, Jul 27, 2017 at 10:20 AM, Harsha Thirimanna <hars...@wso2.com>
wrote:

>
>
> On Thu, Jul 27, 2017 at 9:41 AM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>>
>>
>> On Wed, Jul 26, 2017 at 10:39 PM, Harsha Thirimanna <hars...@wso2.com>
>> wrote:
>>
>>>
>>> On Wed, Jul 26, 2017 at 9:31 PM, KasunG Gajasinghe <kas...@wso2.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby <joh...@wso2.com>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna <hars...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I think we feel like both pros and cons because of these data file
>>>>>> are located under the configurations. These are not actually config files
>>>>>> and as Kasun said if these are under the config folder then anyone can 
>>>>>> feel
>>>>>> to change and expect the changes in system after restarting. And same as
>>>>>> Johan said, we can explain in the documentation clearly about the
>>>>>> behaviour.
>>>>>>
>>>>>> As an alternative solution, can't we have such files in some
>>>>>> different root folder but not under the config or deployment ,because of
>>>>>> these files are not either deployable artifact or configs. Then users 
>>>>>> will
>>>>>> not misunderstand about these files and there can be its own behaviour as
>>>>>> what we have now.
>>>>>>
>>>>>
>>>>>> *Harsha Thirimanna*
>>>>>> *Associate Tech Lead | WSO2*
>>>>>>
>>>>>> Email: hars...@wso2.com
>>>>>> Mob: +94715186770 <+94%2071%20518%206770>
>>>>>> Blog: http://harshathirimanna.blogspot.com/
>>>>>> Twitter: http://twitter.com/harshathirimann
>>>>>> Linked-In: linked-in: http://www.linkedin.com/pub/ha
>>>>>> rsha-thirimanna/10/ab8/122
>>>>>> <http://wso2.com/signature>
>>>>>>
>>>>>> On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe <kas...@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Johann,
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed <farasa...@wso2.com
>>>>>>> > wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> email-admin-config.xml has the default email templates that are
>>>>>>>> used for Email notifications.
>>>>>>>> Since we have a UI to add/update new Email templates I don't think
>>>>>>>> the user has to go to the registry and do any modifications.
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Farasath
>>>>>>>>
>>>>>>>> Farasath Ahamed
>>>>>>>> Software Engineer, WSO2 Inc.; http://wso2.com
>>>>>>>> Mobile: +94777603866
>>>>>>>> Blog: blog.farazath.com
>>>>>>>> Twitter: @farazath619 <https://twitter.com/farazath619>
>>>>>>>> <http://wso2.com/signature>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby <
>>>>>>>> joh...@wso2.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Kasun,
>>>>>>>>>
>>>>>>>>> I don't think we need to do this because,
>>>>>>>>>
>>>>>>>>> 1. This is the model we follow for some other files as well.
>>>>>>>>> claim-config.xml
>>>>>>>>> identity-event.properties
>>>>>>>>>
>>>>>>>>>
>>>>>>> Yes, I think Isura mentioned the same. Let me revise my original
>>>>>>> query. The problem I was trying to address is:
>>>>>>>
>>>>>>> 1. There is a config f

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread KasunG Gajasinghe
On Wed, Jul 26, 2017 at 10:39 PM, Harsha Thirimanna <hars...@wso2.com>
wrote:

>
> On Wed, Jul 26, 2017 at 9:31 PM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>>
>>
>> On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby <joh...@wso2.com>
>> wrote:
>>
>>>
>>>
>>> On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna <hars...@wso2.com>
>>> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I think we feel like both pros and cons because of these data file are
>>>> located under the configurations. These are not actually config files and
>>>> as Kasun said if these are under the config folder then anyone can feel to
>>>> change and expect the changes in system after restarting. And same as Johan
>>>> said, we can explain in the documentation clearly about the behaviour.
>>>>
>>>> As an alternative solution, can't we have such files in some different
>>>> root folder but not under the config or deployment ,because of these files
>>>> are not either deployable artifact or configs. Then users will not
>>>> misunderstand about these files and there can be its own behaviour as what
>>>> we have now.
>>>>
>>>
>>>> *Harsha Thirimanna*
>>>> *Associate Tech Lead | WSO2*
>>>>
>>>> Email: hars...@wso2.com
>>>> Mob: +94715186770 <+94%2071%20518%206770>
>>>> Blog: http://harshathirimanna.blogspot.com/
>>>> Twitter: http://twitter.com/harshathirimann
>>>> Linked-In: linked-in: http://www.linkedin.com/pub/ha
>>>> rsha-thirimanna/10/ab8/122
>>>> <http://wso2.com/signature>
>>>>
>>>> On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe <kas...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi Johann,
>>>>>
>>>>>
>>>>> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed <farasa...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> email-admin-config.xml has the default email templates that are used
>>>>>> for Email notifications.
>>>>>> Since we have a UI to add/update new Email templates I don't think
>>>>>> the user has to go to the registry and do any modifications.
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> Farasath
>>>>>>
>>>>>> Farasath Ahamed
>>>>>> Software Engineer, WSO2 Inc.; http://wso2.com
>>>>>> Mobile: +94777603866
>>>>>> Blog: blog.farazath.com
>>>>>> Twitter: @farazath619 <https://twitter.com/farazath619>
>>>>>> <http://wso2.com/signature>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby <joh...@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Kasun,
>>>>>>>
>>>>>>> I don't think we need to do this because,
>>>>>>>
>>>>>>> 1. This is the model we follow for some other files as well.
>>>>>>> claim-config.xml
>>>>>>> identity-event.properties
>>>>>>>
>>>>>>>
>>>>> Yes, I think Isura mentioned the same. Let me revise my original
>>>>> query. The problem I was trying to address is:
>>>>>
>>>>> 1. There is a config file under repository/conf/ which is only read
>>>>> during start-up. Since it is read once, should it really be in the
>>>>> repository/conf/?
>>>>>
>>>>> 2. If a config file is there under repository/conf/, then users expect
>>>>> any changes to it will be visible to users. It is not that intuitive for a
>>>>> first time user IMO.
>>>>>
>>>>
>>>>> As the product is quite matured, I think it may be better to look into
>>>>> these aspects to make the first time user experience better.  Hence, the
>>>>> request for $subject.
>>>>>
>>>>
>>> Agreed. We may be able to improve this.
>>>
>>>
>> Cool.. :) My suggestion is to honor the changes to the file. So, if the
>> file hash is changed, we re-upload the changes.
>>
>> MD5 hash can be stored in regi

Re: [Dev] Problems with EventStreamAdminService

2017-07-26 Thread KasunG Gajasinghe
OK. You can generate the stubs on your own or use the already generated
stubs.

https://github.com/wso2/carbon-identity-framework/tree/master/service-stubs/identity/org.wso2.carbon.user.mgt.stub

On Thu, Jul 27, 2017 at 12:05 AM, Sagar Kapadia <ks197...@gmail.com> wrote:

> Thanks,
> I figured that out. What I was asking [Now its just a curiosity], is that
> , I had generated stubs using wsdl2java. How do I pass the session token to
> that code
> The following is a usage of the generated code.
> I used the netbeans web service client wizard to generate the code.
>
> private static 
> java.util.List
> listAllUsers(java.lang.String filter, java.lang.Integer limit) throws
> UserAdminUserAdminException {
> org.wso2.carbon.user.mgt.UserAdmin service = new
> org.wso2.carbon.user.mgt.UserAdmin();
> org.wso2.carbon.user.mgt.UserAdminPortType port = service.
> getUserAdminHttpsSoap11Endpoint();
> return port.listAllUsers(filter, limit);
> }
>
>
> On Thu, Jul 27, 2017 at 12:00 AM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>>
>> You can check this class [1] on how the AuthenticationAdminStub is used
>> to login to WSO2. It also shows how to extract the session cookie.
>>
>> The sample at [2] shows how to add the session cookie to your stub.
>>
>> HTH
>>
>> [1] https://github.com/wso2/product-es/blob/5da6bdd53f14e10aed4f
>> 799606e5284b627c1e1c/modules/integration/tests-common/admin-
>> clients/src/main/java/org/wso2/es/integration/common/
>> clients/AuthenticatorClient.java#L37
>>
>> [2] https://github.com/wso2/product-es/blob/5da6bdd53f14e10aed4f
>> 799606e5284b627c1e1c/modules/integration/tests-common/admin-
>> clients/src/main/java/org/wso2/es/integration/common/
>> clients/AuthenticateStub.java#L52
>>
>>
>> On Wed, Jul 26, 2017 at 11:43 PM, Sagar Kapadia <ks197...@gmail.com>
>> wrote:
>>
>>> Can you also help me with the authentication part? I get a blank session
>>> id
>>>
>>>
>>> On Wed, Jul 26, 2017 at 11:43 PM, Sagar Kapadia <ks197...@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>> Thanks a lot , KasunG Gajasinghe. You made my day. :D. It worked.
>>>> Sagar
>>>>
>>>>
>>>> On Wed, Jul 26, 2017 at 11:40 PM, KasunG Gajasinghe <kas...@wso2.com>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Wed, Jul 26, 2017 at 11:34 PM, Sagar Kapadia <ks197...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> I am trying to call a method in the EventStreamAdminService. However,
>>>>>> I get the following exception. I tried to fix the wsdl and recreate the
>>>>>> jar, but because of the compiled classes containing a reference to
>>>>>> 10.100.1.144, it did not work either. What is the work around? Do I have 
>>>>>> to
>>>>>> rebuild the jar from source?
>>>>>>
>>>>>
>>>>> Not really. When creating the EventStreamAdminServiceStub instance,
>>>>> you can pass your own endpoint. Check the over-loaded constructors.
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> Jul 26, 2017 11:30:20 PM org.apache.axis2.transport.htt
>>>>>> p.impl.httpclient3.HTTPSenderImpl sendViaPost
>>>>>> INFO: Unable to sendViaPost to url[https://10.100.1.144:9443/
>>>>>> services/EventStreamAdminService.EventStreamAdminServiceHttp
>>>>>> sSoap12Endpoint/]
>>>>>> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not
>>>>>> Allowed
>>>>>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>>>>>> mpl.handleResponse(HTTPSenderImpl.java:343)
>>>>>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>>>>>> mpl.sendViaPost(HTTPSenderImpl.java:213)
>>>>>> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.j
>>>>>> ava:121)
>>>>>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
>>>>>> riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
>>>>>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.i
>>>>>> nvoke(CommonsHTTPTransportSender.java:234)
>>>>>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
>>>>>> at org.apache.axis2.description.OutInAxi

Re: [Dev] Problems with EventStreamAdminService

2017-07-26 Thread KasunG Gajasinghe
You can check this class [1] on how the AuthenticationAdminStub is used to
login to WSO2. It also shows how to extract the session cookie.

The sample at [2] shows how to add the session cookie to your stub.

HTH

[1]
https://github.com/wso2/product-es/blob/5da6bdd53f14e10aed4f799606e5284b627c1e1c/modules/integration/tests-common/admin-clients/src/main/java/org/wso2/es/integration/common/clients/AuthenticatorClient.java#L37

[2]
https://github.com/wso2/product-es/blob/5da6bdd53f14e10aed4f799606e5284b627c1e1c/modules/integration/tests-common/admin-clients/src/main/java/org/wso2/es/integration/common/clients/AuthenticateStub.java#L52


On Wed, Jul 26, 2017 at 11:43 PM, Sagar Kapadia <ks197...@gmail.com> wrote:

> Can you also help me with the authentication part? I get a blank session id
>
>
> On Wed, Jul 26, 2017 at 11:43 PM, Sagar Kapadia <ks197...@gmail.com>
> wrote:
>
>> Hi,
>> Thanks a lot , KasunG Gajasinghe. You made my day. :D. It worked.
>> Sagar
>>
>>
>> On Wed, Jul 26, 2017 at 11:40 PM, KasunG Gajasinghe <kas...@wso2.com>
>> wrote:
>>
>>>
>>>
>>> On Wed, Jul 26, 2017 at 11:34 PM, Sagar Kapadia <ks197...@gmail.com>
>>> wrote:
>>>
>>>> I am trying to call a method in the EventStreamAdminService. However, I
>>>> get the following exception. I tried to fix the wsdl and recreate the jar,
>>>> but because of the compiled classes containing a reference to 10.100.1.144,
>>>> it did not work either. What is the work around? Do I have to rebuild the
>>>> jar from source?
>>>>
>>>
>>> Not really. When creating the EventStreamAdminServiceStub instance, you
>>> can pass your own endpoint. Check the over-loaded constructors.
>>>
>>>
>>>
>>>>
>>>> Jul 26, 2017 11:30:20 PM org.apache.axis2.transport.htt
>>>> p.impl.httpclient3.HTTPSenderImpl sendViaPost
>>>> INFO: Unable to sendViaPost to url[https://10.100.1.144:9443/
>>>> services/EventStreamAdminService.EventStreamAdminServiceHttp
>>>> sSoap12Endpoint/]
>>>> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not
>>>> Allowed
>>>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>>>> mpl.handleResponse(HTTPSenderImpl.java:343)
>>>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>>>> mpl.sendViaPost(HTTPSenderImpl.java:213)
>>>> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
>>>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
>>>> riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
>>>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.i
>>>> nvoke(CommonsHTTPTransportSender.java:234)
>>>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
>>>> at org.apache.axis2.description.OutInAxisOperationClient.send(O
>>>> utInAxisOperation.java:399)
>>>> at org.apache.axis2.description.OutInAxisOperationClient.execut
>>>> eImpl(OutInAxisOperation.java:225)
>>>> at org.apache.axis2.client.OperationClient.execute(OperationCli
>>>> ent.java:150)
>>>> at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStu
>>>> b.getStreamNames(EventStreamAdminServiceStub.java:3246)
>>>> at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)
>>>>
>>>> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not
>>>> Allowed
>>>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>>>> mpl.handleResponse(HTTPSenderImpl.java:343)
>>>> at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderI
>>>> mpl.sendViaPost(HTTPSenderImpl.java:213)
>>>> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
>>>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.w
>>>> riteMessageWithCommons(CommonsHTTPTransportSender.java:403)
>>>> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.i
>>>> nvoke(CommonsHTTPTransportSender.java:234)
>>>> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
>>>> at org.apache.axis2.description.OutInAxisOperationClient.send(O
>>>> utInAxisOperation.java:399)
>>>> at org.apache.axis2.description.OutInAxisOperationClient.execut
>>>> eImpl(OutInAxisOperation.java:225)
>>>> at org.apache.axis2.client.OperationClient.execute(OperationCli
>>>> ent.java

Re: [Dev] Issues in the Admin API WSDL Files

2017-07-26 Thread KasunG Gajasinghe
wsimport is used to generate the JAX-WS service clients.

But the generated client stubs are already available for all the admin
services of WSO2. I suggest you use them. These work over Axis2 SOAP engine.

On Wed, Jul 26, 2017 at 11:49 PM, KasunG Gajasinghe <kas...@wso2.com> wrote:

>
> If you are trying to invoke via Java, then you can check the existing
> usage of UserAdminStub class here [1].
>
> These admin services are already used by the mgt console UI to invoke the
> back-end services. A trick I used to capture the soap envelope is the
> following. This does not work all the time. You can throw the dice and see.
>
> 1. Go to repository/components/plugins folder
> 2. Unzip the relevant jar bundle that that contain the service. UserAdmin
> service is in org.wso2.carbon.user.mgt_5.7.5.jar.
> 3. In there, open META-INF/services.xml file in there, and remove the
> following two lines
>
> true
> true
>
> 4. Zip it back, and restart the server.
>
> 5. Now go to, *Monitor* -> *Soap Tracer*, and enable it.
> 6. Do a user mgt UI operation and check the Soap Tracer.
>
> As I said, throw the dice and see. It may not work for you.
>
> [1] https://github.com/search?q=org%3Awso2+UserAdminStub=Code
>
> On Wed, Jul 26, 2017 at 11:11 PM, Sagar Kapadia <ks197...@gmail.com>
> wrote:
>
>> Hi
>> I have another question. Is there a need to generate stubs for services,
>> given that stubs for  services are present? I could not find a way to pass
>> the token to generated web service stubs. However, I figured out how to use
>> the stubs themselves
>>
>>   UserAdminStub s=new UserAdminStub();
>> ServiceClient serviceClient =s._getServiceClient();
>>
>> option = serviceClient.getOptions();
>> option.setManageSession(true);
>> option.setProperty(
>> org.apache.axis2.transport.htt
>> p.HTTPConstants.COOKIE_STRING,
>> token);
>>
>> FlaggedName[] names=s.listAllUsers("*", 100);
>>for(FlaggedName name:names){
>>
>>
>>System.out.println(name.getItemDisplayName());
>>}
>>
>> Is there a way to do this with generated code? or do the provided stubs
>> cover all services?
>> Also, I have not managed to login using the authenticate method with
>> either localhost or actual ip and credentials admin/admin. I used soapui to
>> login and obtain the session token, which I passed to the above web
>> service, which worked. Please let me know what mistake I am making in the
>> login proocess.
>>  System.setProperty("javax.net.ssl.trustStore",
>> "C://wso2das-3.1.0/repository/resources/security/wso2carbon.jks");
>> System.setProperty("javax.net.ssl.trustStorePassword",
>> "wso2carbon");
>> System.setProperty("javax.net.ssl.trustStoreType", "JKS");
>>
>>LoginAdminServiceClient c=new LoginAdminServiceClient(backEndUrl);
>>
>>String token=c.authenticate("admin","ädmin");
>>System.out.println("Token:"+token);
>>
>> Invoking an admin service
>>
>> Admin services are secured using common types of security protocols such
>> as HTTP basic authentication, WS-Security username token, and session based
>> authentication to prevent anonymous invocations. For example, the
>> UserAdmin Web service is secured with the HTTP basic authentication. To
>> invoke a service, you do the following:
>>
>>1. Authenticate yourself and get the session cookie.
>>2. Generate the client stubs to access the back-end Web services.
>>
>> To generate the stubs, you can write your own client program using the
>> Axis2 client API or use an existing tool like SoapUI
>> <http://www.soapui.org/> (4.5.1 or later) or wsdl2java.
>>
>> The wsdl2java tool, which comes with WSO2 products by default hides all
>> the complexity and presents you with a proxy to the back-end service. The
>> stub generation happens during the project build process within the Maven
>> POM files. It uses the Maven ant run plug-in to execute the wsdl2java tool.
>>
>> You can also use the Java client program given here
>> <https://svn.wso2.org/repos/wso2/people/asela/user-mgt/remote-user-api/4.2.X/>
>>  to
>> invoke admin services. All dependency JAR files that you need to run this
>> client are found in the /lib directory.
>>
>> On Wed, Jul 26, 2017 at 6:32 PM, Sagar Kapadia <ks197...@gmail.com>
>> wrote:
>>
>>> Hi,
>>

Re: [Dev] Issues in the Admin API WSDL Files

2017-07-26 Thread KasunG Gajasinghe
If you are trying to invoke via Java, then you can check the existing usage
of UserAdminStub class here [1].

These admin services are already used by the mgt console UI to invoke the
back-end services. A trick I used to capture the soap envelope is the
following. This does not work all the time. You can throw the dice and see.

1. Go to repository/components/plugins folder
2. Unzip the relevant jar bundle that that contain the service. UserAdmin
service is in org.wso2.carbon.user.mgt_5.7.5.jar.
3. In there, open META-INF/services.xml file in there, and remove the
following two lines

true
true

4. Zip it back, and restart the server.

5. Now go to, *Monitor* -> *Soap Tracer*, and enable it.
6. Do a user mgt UI operation and check the Soap Tracer.

As I said, throw the dice and see. It may not work for you.

[1] https://github.com/search?q=org%3Awso2+UserAdminStub=Code

On Wed, Jul 26, 2017 at 11:11 PM, Sagar Kapadia  wrote:

> Hi
> I have another question. Is there a need to generate stubs for services,
> given that stubs for  services are present? I could not find a way to pass
> the token to generated web service stubs. However, I figured out how to use
> the stubs themselves
>
>   UserAdminStub s=new UserAdminStub();
> ServiceClient serviceClient =s._getServiceClient();
>
> option = serviceClient.getOptions();
> option.setManageSession(true);
> option.setProperty(
> org.apache.axis2.transport.http.HTTPConstants.COOKIE_
> STRING,
> token);
>
> FlaggedName[] names=s.listAllUsers("*", 100);
>for(FlaggedName name:names){
>
>
>System.out.println(name.getItemDisplayName());
>}
>
> Is there a way to do this with generated code? or do the provided stubs
> cover all services?
> Also, I have not managed to login using the authenticate method with
> either localhost or actual ip and credentials admin/admin. I used soapui to
> login and obtain the session token, which I passed to the above web
> service, which worked. Please let me know what mistake I am making in the
> login proocess.
>  System.setProperty("javax.net.ssl.trustStore",
> "C://wso2das-3.1.0/repository/resources/security/wso2carbon.jks");
> System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
> System.setProperty("javax.net.ssl.trustStoreType", "JKS");
>
>LoginAdminServiceClient c=new LoginAdminServiceClient(backEndUrl);
>
>String token=c.authenticate("admin","ädmin");
>System.out.println("Token:"+token);
>
> Invoking an admin service
>
> Admin services are secured using common types of security protocols such
> as HTTP basic authentication, WS-Security username token, and session based
> authentication to prevent anonymous invocations. For example, the
> UserAdmin Web service is secured with the HTTP basic authentication. To
> invoke a service, you do the following:
>
>1. Authenticate yourself and get the session cookie.
>2. Generate the client stubs to access the back-end Web services.
>
> To generate the stubs, you can write your own client program using the
> Axis2 client API or use an existing tool like SoapUI
>  (4.5.1 or later) or wsdl2java.
>
> The wsdl2java tool, which comes with WSO2 products by default hides all
> the complexity and presents you with a proxy to the back-end service. The
> stub generation happens during the project build process within the Maven
> POM files. It uses the Maven ant run plug-in to execute the wsdl2java tool.
>
> You can also use the Java client program given here
> 
>  to
> invoke admin services. All dependency JAR files that you need to run this
> client are found in the /lib directory.
>
> On Wed, Jul 26, 2017 at 6:32 PM, Sagar Kapadia  wrote:
>
>> Hi,
>>
>> I used this tutorial
>> https://docs.wso2.com/display/DAS300/Calling+Admin+Services+from+Apps
>>
>> I am facing the following issues in importing the WSDL files and
>> generating the code
>> I get the following error message when I call
>> wsimport AuthenticationAdmin.xml
>>
>> [ERROR] missing required attribute "message" of element "wsdl:output"
>>
>>
>> Failed to parse the WSDL.
>>
>> I could not fix this issue.
>>
>> In another wsdl file "UserAdmin", I got multiple errors,
>> [ERROR] operation "" has an invalid style
>> which I fixed as follows
>> https://stackoverflow.com/questions/12155114/generating-stub
>> s-with-jax-ws-fails
>> I added  and also
>> corresponding
>> 
>>
>> I was able to generate code for the UserAdmin sevice, but not for
>> AuthenticationAdmin Service
>>
>> By the way the reason I tried to generate code for the Autherntication
>> Service is that login fails without any exception . The token returned is
>> null.
>> I am sharing a link to the source code [Netbeans project] for the web
>> service client and the the modified 

Re: [Dev] Problems with EventStreamAdminService

2017-07-26 Thread KasunG Gajasinghe
On Wed, Jul 26, 2017 at 11:34 PM, Sagar Kapadia  wrote:

> I am trying to call a method in the EventStreamAdminService. However, I
> get the following exception. I tried to fix the wsdl and recreate the jar,
> but because of the compiled classes containing a reference to 10.100.1.144,
> it did not work either. What is the work around? Do I have to rebuild the
> jar from source?
>

Not really. When creating the EventStreamAdminServiceStub instance, you can
pass your own endpoint. Check the over-loaded constructors.



>
> Jul 26, 2017 11:30:20 PM 
> org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl
> sendViaPost
> INFO: Unable to sendViaPost to url[https://10.100.1.144:9443/services/
> EventStreamAdminService.EventStreamAdminServiceHttpsSoap12Endpoint/]
> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed
> at org.apache.axis2.transport.http.impl.httpclient3.
> HTTPSenderImpl.handleResponse(HTTPSenderImpl.java:343)
> at org.apache.axis2.transport.http.impl.httpclient3.
> HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:213)
> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.
> writeMessageWithCommons(CommonsHTTPTransportSender.java:403)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
> CommonsHTTPTransportSender.java:234)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
> at org.apache.axis2.description.OutInAxisOperationClient.send(
> OutInAxisOperation.java:399)
> at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> OutInAxisOperation.java:225)
> at org.apache.axis2.client.OperationClient.execute(
> OperationClient.java:150)
> at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStub.
> getStreamNames(EventStreamAdminServiceStub.java:3246)
> at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)
>
> org.apache.axis2.AxisFault: Transport error: 405 Error: Method Not Allowed
> at org.apache.axis2.transport.http.impl.httpclient3.
> HTTPSenderImpl.handleResponse(HTTPSenderImpl.java:343)
> at org.apache.axis2.transport.http.impl.httpclient3.
> HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:213)
> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.
> writeMessageWithCommons(CommonsHTTPTransportSender.java:403)
> at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
> CommonsHTTPTransportSender.java:234)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
> at org.apache.axis2.description.OutInAxisOperationClient.send(
> OutInAxisOperation.java:399)
> at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> OutInAxisOperation.java:225)
> at org.apache.axis2.client.OperationClient.execute(
> OperationClient.java:150)
> at org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStub.
> getStreamNames(EventStreamAdminServiceStub.java:3246)
> at com.avinashi.wso2das.adminapi.Application.main(Application.java:80)
>
> Sagar
>
>
> On Wed, Jul 26, 2017 at 6:32 PM, Sagar Kapadia  wrote:
>
>> Hi,
>>
>> I used this tutorial
>> https://docs.wso2.com/display/DAS300/Calling+Admin+Services+from+Apps
>>
>> I am facing the following issues in importing the WSDL files and
>> generating the code
>> I get the following error message when I call
>> wsimport AuthenticationAdmin.xml
>>
>> [ERROR] missing required attribute "message" of element "wsdl:output"
>>
>>
>> Failed to parse the WSDL.
>>
>> I could not fix this issue.
>>
>> In another wsdl file "UserAdmin", I got multiple errors,
>> [ERROR] operation "" has an invalid style
>> which I fixed as follows
>> https://stackoverflow.com/questions/12155114/generating-stub
>> s-with-jax-ws-fails
>> I added  and also
>> corresponding
>> 
>>
>> I was able to generate code for the UserAdmin sevice, but not for
>> AuthenticationAdmin Service
>>
>> By the way the reason I tried to generate code for the Autherntication
>> Service is that login fails without any exception . The token returned is
>> null.
>> I am sharing a link to the source code [Netbeans project] for the web
>> service client and the the modified wsdl files I am using
>>
>>
>> Link to the source
>> https://drive.google.com/open?id=0BwqZCw5oc2rwcmJGTllNbEo2U00
>>
>>
>> The help I require is primarily with the login functionality, because its
>> failing. Also, is the manner I am trying to fix the wsdls correct? [Adding
>> wsdl:output with message]
>>
>>
>> Sincerely
>> Sagar
>>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813

[Dev] (IDENTITY-6168) Ambiguous code segment

2017-07-26 Thread KasunG Gajasinghe
Hi,

The #replace operations pointed in this jira are actually a no-ops since
the original string and the replacement string are the same!

@Indunil, it seems above code segment was introduced by the following
commit. Can you enlighten the reason for this?

https://github.com/wso2-extensions/identity-inbound-auth-oauth/commit/f40fd2acc9682117bb7e4780c7a274fd5f93c248#diff-3bcd1e69e27d53fa42e00cdc31c36b7bR713

Thanks,
Kasun


On Wed, Jul 26, 2017 at 2:48 PM, Kasun Gajasinghe (JIRA) 
wrote:

> Kasun Gajasinghe
> 
> *commented* on [image: Improvement] IDENTITY-6168
> 
>
> Re: Ambiguous code segment 
>
> Hi,
>
> I checked the code, the #replace is actually a no-op here since the
> original string and the replacement string are the same!
>
> @Indunil, it seems above code segment was introduced by the following
> commit. Can you enlighten the reason for this?
>
> https://github.com/wso2-extensions/identity-inbound-auth-oauth/commit/
> f40fd2acc9682117bb7e4780c7a274fd5f93c248#diff-
> 3bcd1e69e27d53fa42e00cdc31c36b7bR713
>
> Thanks,
> KasunG
> [image: Add Comment]
>  Add Comment
> 
>
> This message was sent by Atlassian JIRA (v7.2.2#72004-sha1:9d51328)
> [image: Atlassian logo]
>
> ___
> Carbon-jira mailing list
> carbon-j...@wso2.org
> https://wso2.org/cgi-bin/mailman/listinfo/carbon-jira
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread KasunG Gajasinghe
On Wed, Jul 26, 2017 at 9:07 PM, Johann Nallathamby <joh...@wso2.com> wrote:

>
>
> On Wed, Jul 26, 2017 at 8:58 PM, Harsha Thirimanna <hars...@wso2.com>
> wrote:
>
>> Hi All,
>>
>> I think we feel like both pros and cons because of these data file are
>> located under the configurations. These are not actually config files and
>> as Kasun said if these are under the config folder then anyone can feel to
>> change and expect the changes in system after restarting. And same as Johan
>> said, we can explain in the documentation clearly about the behaviour.
>>
>> As an alternative solution, can't we have such files in some different
>> root folder but not under the config or deployment ,because of these files
>> are not either deployable artifact or configs. Then users will not
>> misunderstand about these files and there can be its own behaviour as what
>> we have now.
>>
>
>> *Harsha Thirimanna*
>> *Associate Tech Lead | WSO2*
>>
>> Email: hars...@wso2.com
>> Mob: +94715186770 <+94%2071%20518%206770>
>> Blog: http://harshathirimanna.blogspot.com/
>> Twitter: http://twitter.com/harshathirimann
>> Linked-In: linked-in: http://www.linkedin.com/pub/ha
>> rsha-thirimanna/10/ab8/122
>> <http://wso2.com/signature>
>>
>> On Wed, Jul 26, 2017 at 5:21 PM, KasunG Gajasinghe <kas...@wso2.com>
>> wrote:
>>
>>> Hi Johann,
>>>
>>>
>>> On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed <farasa...@wso2.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> email-admin-config.xml has the default email templates that are used
>>>> for Email notifications.
>>>> Since we have a UI to add/update new Email templates I don't think the
>>>> user has to go to the registry and do any modifications.
>>>>
>>>>
>>>> Thanks,
>>>> Farasath
>>>>
>>>> Farasath Ahamed
>>>> Software Engineer, WSO2 Inc.; http://wso2.com
>>>> Mobile: +94777603866
>>>> Blog: blog.farazath.com
>>>> Twitter: @farazath619 <https://twitter.com/farazath619>
>>>> <http://wso2.com/signature>
>>>>
>>>>
>>>>
>>>> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby <joh...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi Kasun,
>>>>>
>>>>> I don't think we need to do this because,
>>>>>
>>>>> 1. This is the model we follow for some other files as well.
>>>>> claim-config.xml
>>>>> identity-event.properties
>>>>>
>>>>>
>>> Yes, I think Isura mentioned the same. Let me revise my original query.
>>> The problem I was trying to address is:
>>>
>>> 1. There is a config file under repository/conf/ which is only read
>>> during start-up. Since it is read once, should it really be in the
>>> repository/conf/?
>>>
>>> 2. If a config file is there under repository/conf/, then users expect
>>> any changes to it will be visible to users. It is not that intuitive for a
>>> first time user IMO.
>>>
>>
>>> As the product is quite matured, I think it may be better to look into
>>> these aspects to make the first time user experience better.  Hence, the
>>> request for $subject.
>>>
>>
> Agreed. We may be able to improve this.
>
>
Cool.. :) My suggestion is to honor the changes to the file. So, if the
file hash is changed, we re-upload the changes.

MD5 hash can be stored in registry as a property along with the email
templates. It is a simple change to [1] as I understand.

[1]
https://github.com/wso2-extensions/identity-event-handler-notification/blob/master/components/email-mgt/org.wso2.carbon.email.mgt/src/main/java/org/wso2/carbon/email/mgt/EmailTemplateManagerImpl.java#L78


>
>>>
>>>
>>>> 2. This content goes not only to the super tenant but also to tenants
>>>>> as default email templates. So if we change it in the middle tenants
>>>>> created until then will have a different default template and the ones
>>>>> created after that will have a different default template.
>>>>>
>>>>>
>>> Yes, this is the current behavior, isn't it?
>>>
>>
> Yes. This is the current behavior.
>
>
>>
>>> Thanks for your feedback.
>>>
>>>
>>>> I don't think we have any problems with current model. If

Re: [Dev] (IDENTITY-6167) Need to honor modifications to email-admin-config.xml file

2017-07-26 Thread KasunG Gajasinghe
Hi Johann,


On Wed, Jul 26, 2017 at 3:22 PM, Farasath Ahamed  wrote:

> Hi,
>
> email-admin-config.xml has the default email templates that are used for
> Email notifications.
> Since we have a UI to add/update new Email templates I don't think the
> user has to go to the registry and do any modifications.
>
>
> Thanks,
> Farasath
>
> Farasath Ahamed
> Software Engineer, WSO2 Inc.; http://wso2.com
> Mobile: +94777603866
> Blog: blog.farazath.com
> Twitter: @farazath619 
> 
>
>
>
> On Wed, Jul 26, 2017 at 1:30 PM, Johann Nallathamby 
> wrote:
>
>> Hi Kasun,
>>
>> I don't think we need to do this because,
>>
>> 1. This is the model we follow for some other files as well.
>> claim-config.xml
>> identity-event.properties
>>
>>
Yes, I think Isura mentioned the same. Let me revise my original query. The
problem I was trying to address is:

1. There is a config file under repository/conf/ which is only read during
start-up. Since it is read once, should it really be in the
repository/conf/?

2. If a config file is there under repository/conf/, then users expect any
changes to it will be visible to users. It is not that intuitive for a
first time user IMO.

As the product is quite matured, I think it may be better to look into
these aspects to make the first time user experience better.  Hence, the
request for $subject.



> 2. This content goes not only to the super tenant but also to tenants as
>> default email templates. So if we change it in the middle tenants created
>> until then will have a different default template and the ones created
>> after that will have a different default template.
>>
>>
Yes, this is the current behavior, isn't it?

Thanks for your feedback.


> I don't think we have any problems with current model. If we do this we
>> need to change our migration, etc. If the issue here is clarity for the
>> users it is better we explain it using better wordings in the docs.
>>
>> Regards,
>> Johann.
>>
>> -- Forwarded message --
>> From: Kasun Gajasinghe (JIRA) 
>> Date: Wed, Jul 19, 2017 at 1:54 AM
>> Subject: [jira] (IDENTITY-6167) Need to honor modifications to
>> email-admin-config.xml file
>> To: joh...@wso2.com
>>
>>
>> Kasun Gajasinghe
>> 
>> *created* an issue
>>
>> WSO2 Identity Server  / [image:
>> Improvement]  IDENTITY-6167
>> 
>> Need to honor modifications to email-admin-config.xml file
>> 
>> Issue Type: [image: Improvement] Improvement
>> Affects Versions: 5.3.0-GA
>> Assignee: Johann Nallathamby
>> 
>> Created: 19/Jul/17 1:53 AM
>> Fix Versions: 5.4.0-GA
>> Priority: [image: High] High
>> Reporter: Kasun Gajasinghe
>> 
>>
>> At the moment, we save the email-admin-config.xml in the registry during
>> the very first server startup. After that, changes to the file are not
>> picked up. So, users are forced to go to the registry to update the config.
>>
>> This is a bit confusing since a user probably expects that the changes to
>> the file will be honored especially since it is located under
>> repository/conf folder.
>>
>> We can do some hashing mechanism and verify whether the contents in the
>> registry and the file matches. And, then we can update the registry
>> accordingly.
>> [image: Add Comment]
>>  Add Comment
>> 
>>
>> This message was sent by Atlassian JIRA (v7.2.2#72004-sha1:9d51328)
>> [image: Atlassian logo]
>>
>>
>>
>> --
>> Thanks & Regards,
>>
>> *Johann Dilantha Nallathamby*
>> Senior Lead Solutions Engineer
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - *+9476950*
>> Blog - *http://nallaa.wordpress.com *
>>
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [MSF4J][IS-M2] Error while trying to deploy component

2017-07-15 Thread KasunG Gajasinghe
Hi Isuranga,

Can you point to the source of your micro service?

It seems like you may have missed to include the @Path annotation. [1]

[1]
https://github.com/wso2/msf4j/blob/master/core/src/main/java/org/wso2/msf4j/internal/MicroservicesRegistryImpl.java#L76

On Sun, Jul 16, 2017 at 12:50 AM, Isuranga Perera  wrote:

> Hi,
>
> I got this issue while trying to deploy an OSGI service component on IS6
> m2. Appreciate any help.
>
> Best Regards
> Isuranga Perera
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Handling required claims in ID Token

2017-07-06 Thread KasunG Gajasinghe
Hi Gayan,

As I see, Denuwanthi is talking about the scenario where the grant type
does generate an ID token. In that case, we need to validate that generated
id token where we need to make sure the mandatory fields are there.

On Thu, Jul 6, 2017 at 9:55 AM, Gayan Gunawardana  wrote:

> Hi Sagara, Denuwanthi,
>
> There are many ways to write custom grant type. Even ClientCredentials
> grant type can be extended to custom grant type where do not need to think
> about ID token. If can you point to exact example and explain the problem,
> it would be great.
>
> Thanks,
> Gayan
>
> On Tue, Jul 4, 2017 at 9:37 PM, Denuwanthi De Silva 
> wrote:
>
>> Thank you Sagara for the response.
>> Yes, as you mentioned it means logical to use the server error response.
>> will proceed with that.
>>
>>
>> Thanks,
>>
>> On Tue, Jul 4, 2017 at 7:08 PM, Sagara Gunathunga 
>> wrote:
>>
>>>
>>>
>>> On Tue, Jul 4, 2017 at 6:54 PM, Denuwanthi De Silva >> > wrote:
>>>
 Hi,

 In OIDC spec,following claims are mentioned as mandatory.
 -iss
 -sub
 -aud
 -exp
 -iat

 Currently as mentioned in jira [1], it is possible to write custom
 OAuth2 grant type which returns IDToken without "sub" claim.

 When we handle this scenario, there is a small concern
  that need to be clarified.

 -When analyze the spec we could  not find any instance where it
 mentioned the error message to display in such a scenario.
 In that case, shall we come up with *new error message*?
 {"error_description":"custom description.","error":"custom_error"}

 - or throw a server exception and send the standard *server error*
 message ?
 ex:
 {"error_description":"Internal Server Error.","error":"server_error"}

>>>
>>> IMO what happen here is, server can not generate valid IDToken.
>>>  "Internal Server Error " can properly describe this behavior  so better to
>>> use that code, returning custom code may cause  interoperability  issues as
>>> well.
>>>
>>> Thanks !
>>>


 Appreciate any input on how to proceed with this.

 [1]https://wso2.org/jira/browse/IDENTITY-6088
 [2]http://openid.net/specs/openid-connect-core-1_0.html#IDToken

 Thanks,
 --
 Denuwanthi De Silva
 Senior Software Engineer;
 WSO2 Inc.; http://wso2.com,
 Email: denuwan...@wso2.com
 Blog: https://denuwanthi.wordpress.com/

>>>
>>>
>>>
>>> --
>>> Sagara Gunathunga
>>>
>>> Associate Director / Architect; WSO2, Inc.;  http://wso2.com
>>> V.P Apache Web Services;http://ws.apache.org/
>>> Linkedin; http://www.linkedin.com/in/ssagara
>>> Blog ;  http://ssagara.blogspot.com
>>>
>>>
>>
>>
>> --
>> Denuwanthi De Silva
>> Senior Software Engineer;
>> WSO2 Inc.; http://wso2.com,
>> Email: denuwan...@wso2.com
>> Blog: https://denuwanthi.wordpress.com/
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Gayan Gunawardana
> Senior Software Engineer; WSO2 Inc.; http://wso2.com/
> Email: ga...@wso2.com
> Mobile: +94 (71) 8020933
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Carbon] Build fail in cerbon4-kernel source code.

2017-06-23 Thread KasunG Gajasinghe
Yep. Please raise a doc jira.

On Fri, Jun 23, 2017 at 3:21 PM, Maduranga Siriwardena <madura...@wso2.com>
wrote:

> Might be better to add this to documentation also.
>
> On Fri, Jun 23, 2017 at 2:30 PM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>> Thanks a lot.
>>
>> On Fri, Jun 23, 2017 at 1:05 PM Maheshika Goonetilleke <
>> mahesh...@wso2.com> wrote:
>>
>>> Hi Kasun
>>>
>>> As requested made the change on Wednesday. Apologies for delayed
>>> response.
>>>
>>> On Wed, Jun 21, 2017 at 12:05 PM, KasunG Gajasinghe <kas...@wso2.com>
>>> wrote:
>>>
>>>>
>>>> We can use add this property into Jenkins. Adding @Maheshika. It's
>>>> better if we can do this in global-level instead of per job.
>>>>
>>>> Thanks,
>>>> KasunG
>>>>
>>>> On Wed, Jun 21, 2017 at 11:41 AM, Maduranga Siriwardena <
>>>> madura...@wso2.com> wrote:
>>>>
>>>>> Using the java.util.Arrays.useLegacyMergeSort jvm parameter with the
>>>>> maven command like below solved the problem
>>>>>
>>>>> _JAVA_OPTIONS=-Djava.util.Arrays.useLegacyMergeSort=true mvn clean
>>>>> install
>>>>>
>>>>> Thanks Farasath and Jayanga for the solution.
>>>>>
>>>>> On Thu, Mar 24, 2016 at 4:01 PM, Aruna Karunarathna <ar...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Mar 23, 2016 at 7:08 PM, Maduranga Siriwardena <
>>>>>> madura...@wso2.com> wrote:
>>>>>>
>>>>>>> Any ideas how to resolve this issue?
>>>>>>>
>>>>>>
>>>>>> Hi Maduranga,
>>>>>>
>>>>>> I tried with both JDK 7 and 8 and the 4.4.x branch built without any
>>>>>> issue.
>>>>>>
>>>>>> Can you try building with a clean maven repo?
>>>>>>
>>>>>> Regards,
>>>>>> Aruna
>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Maduranga
>>>>>>>
>>>>>>> On Tue, Sep 1, 2015 at 11:10 AM, Maduranga Siriwardena <
>>>>>>> madura...@wso2.com> wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> Anyone know how to fix this? I keep on getting this error
>>>>>>>>
>>>>>>>> Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr
>>>>>>>> (generate-scr-scrdescriptor) on project org.wso2.carbon.core: Execution
>>>>>>>> generate-scr-scrdescriptor of goal 
>>>>>>>> org.apache.felix:maven-scr-plugin:1.7.4:scr
>>>>>>>> failed: Comparison method violates its general contract! -> [Help 1]
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Maduranga
>>>>>>>>
>>>>>>>> On Fri, Jun 12, 2015 at 11:16 AM, Maduranga Siriwardena <
>>>>>>>> madura...@wso2.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Thusitha,
>>>>>>>>>
>>>>>>>>> I have tried to build both master branch and release-4.4.0 branch.
>>>>>>>>>
>>>>>>>>> I have java version "1.7.0_80" and Apache Maven 3.0.5
>>>>>>>>>
>>>>>>>>> On Fri, Jun 12, 2015 at 11:05 AM, Thusitha Thilina Dayaratne <
>>>>>>>>> thusit...@wso2.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Maduranga,
>>>>>>>>>>
>>>>>>>>>> If you are trying to build the master branch from github use JDK7
>>>>>>>>>>  or 8 with maven 3.0.x.
>>>>>>>>>> This will help you https://docs.wso2.com/disp
>>>>>>>>>> lay/Carbon440/Installation+Prerequisites
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>> On Fri, Jun 12, 2015 at 10:57 AM, Thusitha Thilina Dayaratne <
>>>>>>>>>> thu

Re: [Dev] [Carbon] Build fail in cerbon4-kernel source code.

2017-06-23 Thread KasunG Gajasinghe
Thanks a lot.

On Fri, Jun 23, 2017 at 1:05 PM Maheshika Goonetilleke <mahesh...@wso2.com>
wrote:

> Hi Kasun
>
> As requested made the change on Wednesday. Apologies for delayed response.
>
> On Wed, Jun 21, 2017 at 12:05 PM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>>
>> We can use add this property into Jenkins. Adding @Maheshika. It's better
>> if we can do this in global-level instead of per job.
>>
>> Thanks,
>> KasunG
>>
>> On Wed, Jun 21, 2017 at 11:41 AM, Maduranga Siriwardena <
>> madura...@wso2.com> wrote:
>>
>>> Using the java.util.Arrays.useLegacyMergeSort jvm parameter with the
>>> maven command like below solved the problem
>>>
>>> _JAVA_OPTIONS=-Djava.util.Arrays.useLegacyMergeSort=true mvn clean
>>> install
>>>
>>> Thanks Farasath and Jayanga for the solution.
>>>
>>> On Thu, Mar 24, 2016 at 4:01 PM, Aruna Karunarathna <ar...@wso2.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Wed, Mar 23, 2016 at 7:08 PM, Maduranga Siriwardena <
>>>> madura...@wso2.com> wrote:
>>>>
>>>>> Any ideas how to resolve this issue?
>>>>>
>>>>
>>>> Hi Maduranga,
>>>>
>>>> I tried with both JDK 7 and 8 and the 4.4.x branch built without any
>>>> issue.
>>>>
>>>> Can you try building with a clean maven repo?
>>>>
>>>> Regards,
>>>> Aruna
>>>>
>>>>>
>>>>> Thanks,
>>>>> Maduranga
>>>>>
>>>>> On Tue, Sep 1, 2015 at 11:10 AM, Maduranga Siriwardena <
>>>>> madura...@wso2.com> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> Anyone know how to fix this? I keep on getting this error
>>>>>>
>>>>>> Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr
>>>>>> (generate-scr-scrdescriptor) on project org.wso2.carbon.core: Execution
>>>>>> generate-scr-scrdescriptor of goal
>>>>>> org.apache.felix:maven-scr-plugin:1.7.4:scr failed: Comparison method
>>>>>> violates its general contract! -> [Help 1]
>>>>>>
>>>>>> Thanks,
>>>>>> Maduranga
>>>>>>
>>>>>> On Fri, Jun 12, 2015 at 11:16 AM, Maduranga Siriwardena <
>>>>>> madura...@wso2.com> wrote:
>>>>>>
>>>>>>> Hi Thusitha,
>>>>>>>
>>>>>>> I have tried to build both master branch and release-4.4.0 branch.
>>>>>>>
>>>>>>> I have java version "1.7.0_80" and Apache Maven 3.0.5
>>>>>>>
>>>>>>> On Fri, Jun 12, 2015 at 11:05 AM, Thusitha Thilina Dayaratne <
>>>>>>> thusit...@wso2.com> wrote:
>>>>>>>
>>>>>>>> Hi Maduranga,
>>>>>>>>
>>>>>>>> If you are trying to build the master branch from github use JDK7
>>>>>>>>  or 8 with maven 3.0.x.
>>>>>>>> This will help you
>>>>>>>> https://docs.wso2.com/display/Carbon440/Installation+Prerequisites
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> On Fri, Jun 12, 2015 at 10:57 AM, Thusitha Thilina Dayaratne <
>>>>>>>> thusit...@wso2.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Madhuranga,
>>>>>>>>>
>>>>>>>>> I just checkout the master branch and built without any issues.
>>>>>>>>> May be some compatible issues with maven and jdk versions?
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> On Fri, Jun 12, 2015 at 10:39 AM, Maduranga Siriwardena <
>>>>>>>>> madura...@wso2.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi all,
>>>>>>>>>>
>>>>>>>>>> I tried to build carbon4-kernel and I got the below error.
>>>>>>>>>>
>>>>>>>>>> *Failed to execute goal
>>>>>>>>>> org.apache.felix:maven-scr-plugin:1.7.4:scr 
>>&g

Re: [Dev] [Carbon] Build fail in cerbon4-kernel source code.

2017-06-21 Thread KasunG Gajasinghe
We can use add this property into Jenkins. Adding @Maheshika. It's better
if we can do this in global-level instead of per job.

Thanks,
KasunG

On Wed, Jun 21, 2017 at 11:41 AM, Maduranga Siriwardena 
wrote:

> Using the java.util.Arrays.useLegacyMergeSort jvm parameter with the
> maven command like below solved the problem
>
> _JAVA_OPTIONS=-Djava.util.Arrays.useLegacyMergeSort=true mvn clean install
>
> Thanks Farasath and Jayanga for the solution.
>
> On Thu, Mar 24, 2016 at 4:01 PM, Aruna Karunarathna 
> wrote:
>
>>
>>
>> On Wed, Mar 23, 2016 at 7:08 PM, Maduranga Siriwardena <
>> madura...@wso2.com> wrote:
>>
>>> Any ideas how to resolve this issue?
>>>
>>
>> Hi Maduranga,
>>
>> I tried with both JDK 7 and 8 and the 4.4.x branch built without any
>> issue.
>>
>> Can you try building with a clean maven repo?
>>
>> Regards,
>> Aruna
>>
>>>
>>> Thanks,
>>> Maduranga
>>>
>>> On Tue, Sep 1, 2015 at 11:10 AM, Maduranga Siriwardena <
>>> madura...@wso2.com> wrote:
>>>
 Hi all,

 Anyone know how to fix this? I keep on getting this error

 Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr
 (generate-scr-scrdescriptor) on project org.wso2.carbon.core: Execution
 generate-scr-scrdescriptor of goal 
 org.apache.felix:maven-scr-plugin:1.7.4:scr
 failed: Comparison method violates its general contract! -> [Help 1]

 Thanks,
 Maduranga

 On Fri, Jun 12, 2015 at 11:16 AM, Maduranga Siriwardena <
 madura...@wso2.com> wrote:

> Hi Thusitha,
>
> I have tried to build both master branch and release-4.4.0 branch.
>
> I have java version "1.7.0_80" and Apache Maven 3.0.5
>
> On Fri, Jun 12, 2015 at 11:05 AM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Maduranga,
>>
>> If you are trying to build the master branch from github use JDK7  or
>> 8 with maven 3.0.x.
>> This will help you https://docs.wso2.com/disp
>> lay/Carbon440/Installation+Prerequisites
>>
>> Thanks
>>
>> On Fri, Jun 12, 2015 at 10:57 AM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi Madhuranga,
>>>
>>> I just checkout the master branch and built without any issues.
>>> May be some compatible issues with maven and jdk versions?
>>>
>>> Thanks
>>>
>>> On Fri, Jun 12, 2015 at 10:39 AM, Maduranga Siriwardena <
>>> madura...@wso2.com> wrote:
>>>
 Hi all,

 I tried to build carbon4-kernel and I got the below error.

 *Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr
 (generate-scr-scrdescriptor) on project org.wso2.carbon.core: Execution
 generate-scr-scrdescriptor of goal
 org.apache.felix:maven-scr-plugin:1.7.4:scr failed: Comparison method
 violates its general contract!*

 Such a problem is reported in apache felix plugin version 1.7.4
 [1]. So I changed the version of the maven scr plugin to 1.8.0 and if I
 resume the build, it build successfully.

 But if I build the code again from the beginning, I get below error
 from *org.wso2.carbon.registry.core* which is built before
 *org.wso2.carbon.core*.

 *[ERROR] Bundle
 org.wso2.carbon:org.wso2.carbon.registry.core:bundle:4.4.1-SNAPSHOT : 
 Input
 file does not exist:
 target/scr-plugin-generated/OSGI-INF/serviceComponents.xml*

 Seems to be it is not generating the OSGI-INF. Any help how to
 build source successfully?

 [1] https://issues.apache.org/jira/browse/FELIX-3571

 Thank you.
 --
 Maduranga Siriwardena
 Software Engineer
 WSO2 Inc.

 email: madura...@wso2.com
 mobile: +94718990591

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


>>>
>>>
>>> --
>>> Thusitha Dayaratne
>>> Software Engineer
>>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>>
>>> Mobile  +94712756809
>>> Blog  alokayasoya.blogspot.com
>>> Abouthttp://about.me/thusithathilina
>>>
>>>
>>
>>
>> --
>> Thusitha Dayaratne
>> Software Engineer
>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>
>> Mobile  +94712756809
>> Blog  alokayasoya.blogspot.com
>> Abouthttp://about.me/thusithathilina
>>
>>
>
>
> --
> Maduranga Siriwardena
> Software Engineer
> WSO2 Inc.
>
> email: madura...@wso2.com
> mobile: +94718990591
>



 --
 Maduranga Siriwardena
 Software Engineer
 WSO2 Inc.

 email: madura...@wso2.com
 mobile: 

Re: [Dev] Is API Manager UI free and open source?

2017-06-07 Thread KasunG Gajasinghe
On Wed, Jun 7, 2017 at 5:00 PM, Gihan Nimath <gihannim...@gmail.com> wrote:

> Hi KasunG & all,
>
> Thanks for the prompt response.
>
> Yes, I am going to change the look and feel of the UIs; at least the css
> files to change color, sometimes the way it looks as well; so some of the
> code will be modified; not all.
>
> Below is the copyright statement I see on these UIs.
>
> WSO2 API MANAGER | © 2017 WSO₂ Inc.
>
> So I believe it is legal to remove the about copyrighted statement
> completely from the footer of web UIs like store, publisher etc?
>
>
Yes.


> Thanking you,
> Gihan
>
>
>
> On Wed, Jun 7, 2017 at 4:31 PM, KasunG Gajasinghe <kas...@wso2.com> wrote:
>
>> Hi Gihan,
>>
>> ASL 2.0 is a very permissive license. That means, apart from the
>> requirement of attribution to WSO2 for the original work, you have a
>> greater freedom on what you are allowed to do.
>>
>> This includes licensing derivate work under a compatible license (say
>> GPLv2, BSD), modifying the code as required etc. You are however not
>> allowed to remove the original copyright notices from the unmodified files
>> and code.
>>
>> Please note that this does not constitute legal advice. You can refer
>> summarized licensing conditions here. [1]
>>
>> [1] https://en.wikipedia.org/wiki/Apache_License#Licensing_conditions
>>
>>
>>
>> On Wed, Jun 7, 2017 at 12:01 PM, Gihan Nimath <gihannim...@gmail.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> It looks Api manager product source code uses Apache 2 license. I think
>>> this allow me to customize and sell this product; as long as I include the
>>> Apache 2 license with it. Is it correct?
>>>
>>> Can you confirm that API Manager UIs (front-end store, publisher, etc)
>>> are free and open source so that I can customize it and sell? Also can I
>>> add my own copyright statement to UI removing WSO2 copyright statement? If
>>> it is legal, I am planning to do that.
>>>
>>> Thanking you,
>>> Gihan
>>>
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>> email: kasung AT spamfree wso2.com
>> linked-in: http://lk.linkedin.com/in/gajasinghe
>> blog: http://kasunbg.org
>> phone: +1 650-745-4499 <(650)%20745-4499>, 77 678 0813
>>
>>
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Is API Manager UI free and open source?

2017-06-07 Thread KasunG Gajasinghe
Hi Gihan,

ASL 2.0 is a very permissive license. That means, apart from the
requirement of attribution to WSO2 for the original work, you have a
greater freedom on what you are allowed to do.

This includes licensing derivate work under a compatible license (say
GPLv2, BSD), modifying the code as required etc. You are however not
allowed to remove the original copyright notices from the unmodified files
and code.

Please note that this does not constitute legal advice. You can refer
summarized licensing conditions here. [1]

[1] https://en.wikipedia.org/wiki/Apache_License#Licensing_conditions



On Wed, Jun 7, 2017 at 12:01 PM, Gihan Nimath  wrote:

> Hi all,
>
> It looks Api manager product source code uses Apache 2 license. I think
> this allow me to customize and sell this product; as long as I include the
> Apache 2 license with it. Is it correct?
>
> Can you confirm that API Manager UIs (front-end store, publisher, etc) are
> free and open source so that I can customize it and sell? Also can I add my
> own copyright statement to UI removing WSO2 copyright statement? If it is
> legal, I am planning to do that.
>
> Thanking you,
> Gihan
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Apache CXF Bundle Deployment In C4

2017-05-09 Thread KasunG Gajasinghe
Hi John,

Which Carbon product are you using? We do have support to deploy CXF based
web applications [1]

[1]
https://docs.wso2.com/dosearchsite.action?searchQuery.queryString=ancestorIds%3A45968759+AND+cxf=AS530

On Tue, May 9, 2017 at 2:28 PM, John David  wrote:

> Hi All
>
> Is it possible to deploy cxf components in Carbon 4. If yes can you
> provide a documentation related to that.
>
> Thank You
> John Farsi
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] JPA in a custom connector

2017-05-09 Thread KasunG Gajasinghe
The osgi bundle needs to be placed directly in the dropins/ folder. Sorry I
missed to tell you that.

I still think this is a classloading issue. One thing you can try is
including the openjpa classes and resources within your osgi bundle itself.
Or, make your bundle a fragment of openjpa. See [1]

[1]
https://www.eclipse.org/gemini/blueprint/documentation/reference/2.0.0.RELEASE/html/appendix-tips.html

On Tue, May 9, 2017 at 1:45 PM, Thomas LEGRAND <thomas.legr...@versusmind.eu
> wrote:

> Hello KasunG,
>
> OK. I generated the osgi bundle for OpenJPA with the following POM 'plugin
> configuration':
>
> 
> 
> 
> org.apache.felix
> maven-bundle-plugin
> 2.3.7
> true
> 
> 
> ${project.artifactId}
> ${project.artifactId}
> javax.*, org.apache.openjpa.*
> serp.*
> @openjpa-all-${version.openjpa}.jar!/META-INF/*,
> @openjpa-all-${version.openjpa}.jar!/templates/*,
> @openjpa-all-${version.openjpa}.jar!/testpool.jocl
> 
> com.ibm.*;resolution:=optional
> *
> 
> 
> 
> 
> 
>
> But now, I am back to the initial error which occured when I just included
> OpenJPA in the lib/ directory of the connector:
>
>  
> org.apache.openjpa.persistence.ArgumentException:
> The persistence provider is attempting to use properties in the
> persistence.xml file to resolve the data source. A Java Database
> Connectivity (JDBC) driver or data source class name must be specified in
> the openjpa.ConnectionDriverName or javax.persistence.jdbc.driver property.
> The following properties are available in the configuration:
> "org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl@2655aabb".
>
> So, I think this is because the persistence.xml in not detected in the
> META-INF of my OSGI JPA project. Here is the buil and dependencies
> configuration in the POM:
>
> 
> 
> 
> org.apache.felix
> maven-bundle-plugin
> 2.3.7
> true
> 
> 
> /META-INF/persistence.xml
> ${project.artifactId}
> ${project.artifactId}
> org.apache.openjpa.*, javax.persistence
> 
> *
> 
> 
> 
> 
> 
> 
> 
> my.group
> openjpa
> 2.4.2
> bundle
> 
> 
>
> Do you think I missed something to declare the persistence.xml in my JPA
> project?
>
>
>
> 2017-05-05 14:36 GMT+02:00 KasunG Gajasinghe <kas...@wso2.com>:
>
>>
>> That is probably because when creating an osgi bundle, EI simply wraps
>> around the existing jar. So, any META-INF/services you had will be hidden
>> under that wrapped jar.
>>
>> You can create your own osgi bundle via maven using a simple pom.xml like
>> this. In there, you need to mention three things.
>>
>> 1. Your maven dependency for openjpa-all
>> 2. Export packages - the openjpa-all has several such as -
>> org.apache.openjpa.*, serp.*
>> 3. Specify the resource files to copy
>>
>> This ought to do it.
>>
>> [1] https://github.com/wso2/orbit/blob/master/hazelcast/3.5.
>> 4.wso2v2/pom.xml
>>
>> On Fri, May 5, 2017 at 2:07 PM, Thomas LEGRAND <
>> thomas.legr...@versusmind.eu> wrote:
>>
>>> Hello,
>>>
>>> That seems to be OK :)
>>>
>>> osgi> p org.apache.openjpa.persistence
>>> org.apache.openjpa.persistence; version="0.0.0">> [132]>
>>> org.apache.openjpa.persistence; version="2.3.0">> [632]>
>>>   compass_2.0.1.wso2v2 [54] imports
>>>   tomcat_7.0.75.wso2v1 [627] imports
>>> osgi> ss openjpa
>>> "Framework is launched."
>>>
>>>
>>> id  State   Bundle
>>> 132 ACTIVE  openjpa_all_2.4.2_1.0.0
>>> osgi>
>>>
>>> So, I deployed my little JPA project and I can see that my package is
>>> "registered":
>>>
>>> osgi> p my.little.project.jpa
>>> my.little.project.jpa; version="1.0.0"
>>>   synapse-core_2.1.7.wso2v13 [619] imports
>>> osgi>
>>>
>>> So I tried to invoke my class to retrieve an EntityManager and now, I
>>> have:
>>>
>>> javax.persistence.PersistenceException: Failed to load provider from
>>> META-INF/services
>>>
>>> I think that it is because the services/ directory in the META-INF in
>>> the openjpa bundle is not parsed and I don't know what to do because this
>>> is not me who generate the OSGi bundle but the ESB at startup.
>>>
>>> Do you have an idea?
>>>
>>> Regards,
>>>
>>> Thomas
>>>
>>>
>>> 2017-05-04 20:37 GMT+02:00 KasunG Gajasinghe <kas...@wso2.com>:
>>&g

Re: [Dev] JPA in a custom connector

2017-05-05 Thread KasunG Gajasinghe
That is probably because when creating an osgi bundle, EI simply wraps
around the existing jar. So, any META-INF/services you had will be hidden
under that wrapped jar.

You can create your own osgi bundle via maven using a simple pom.xml like
this. In there, you need to mention three things.

1. Your maven dependency for openjpa-all
2. Export packages - the openjpa-all has several such as -
org.apache.openjpa.*, serp.*
3. Specify the resource files to copy

This ought to do it.

[1] https://github.com/wso2/orbit/blob/master/hazelcast/3.5.4.wso2v2/pom.xml

On Fri, May 5, 2017 at 2:07 PM, Thomas LEGRAND <thomas.legr...@versusmind.eu
> wrote:

> Hello,
>
> That seems to be OK :)
>
> osgi> p org.apache.openjpa.persistence
> org.apache.openjpa.persistence; version="0.0.0" [132]>
> org.apache.openjpa.persistence; version="2.3.0"
>   compass_2.0.1.wso2v2 [54] imports
>   tomcat_7.0.75.wso2v1 [627] imports
> osgi> ss openjpa
> "Framework is launched."
>
>
> id  State   Bundle
> 132 ACTIVE  openjpa_all_2.4.2_1.0.0
> osgi>
>
> So, I deployed my little JPA project and I can see that my package is
> "registered":
>
> osgi> p my.little.project.jpa
> my.little.project.jpa; version="1.0.0"
>   synapse-core_2.1.7.wso2v13 [619] imports
> osgi>
>
> So I tried to invoke my class to retrieve an EntityManager and now, I have:
>
> javax.persistence.PersistenceException: Failed to load provider from
> META-INF/services
>
> I think that it is because the services/ directory in the META-INF in the
> openjpa bundle is not parsed and I don't know what to do because this is
> not me who generate the OSGi bundle but the ESB at startup.
>
> Do you have an idea?
>
> Regards,
>
> Thomas
>
>
> 2017-05-04 20:37 GMT+02:00 KasunG Gajasinghe <kas...@wso2.com>:
>
>>
>> I do not think openjpa register any osgi services. Can you check whether
>> the package is exposed? Also verify the status of the openjpa bundle.
>>
>> osgi> p org.apache.openjpa.persistence
>> osgi> ss openjpa
>>
>> On Thu, May 4, 2017 at 7:01 PM, Thomas LEGRAND <
>> thomas.legr...@versusmind.eu> wrote:
>>
>>> Hello again :)
>>>
>>> I retrieved the openjpa-all-2.4.2.jar file and dropped it in the 
>>> /lib
>>> directory to let the runtime taking care of the bundle generation during
>>> the startup. The effect was the generation of the file
>>> openjpa_all_2.4.2_1.0.0.jar in the directory /dropins.
>>>
>>> I restarted the EI with:
>>>
>>>  D:\ProjetESB\wso2ei-6.0.0\bin> .\integrator.bat -DosgiConsole=19444
>>>
>>> So I can connect to the OSGI  console via telnet. But, when I try to
>>> retrieve the objectclasses starting with org.apache.openjpa.*, I have
>>> nothing :(
>>>
>>> osgi> services (objectclass=org.apache.openjpa.*)
>>> "No registered services."
>>>
>>> Am I missing something?
>>>
>>> Regards,
>>>
>>> Thomas
>>>
>>> 2017-05-04 10:49 GMT+02:00 KasunG Gajasinghe <kas...@wso2.com>:
>>>
>>>> Hi Thomas,
>>>>
>>>> Well, the connector itself cannot be deployed as an osgi bundle. But,
>>>> you can call classes in osgi bundles from your connector. So, place your
>>>> JPA logic in an osgi bundle and add it to dropins/ folder. Then, call that
>>>> from your connector.
>>>>
>>>> This should give you flexibility over your classloading. I cannot
>>>> comment on JPA stuff though.
>>>>
>>>> On Thu, May 4, 2017 at 1:26 PM, Thomas LEGRAND <
>>>> thomas.legr...@versusmind.eu> wrote:
>>>>
>>>>> Hello KasunG,
>>>>>
>>>>> I forgot to mention that I am using wso2ei-6.0.0.
>>>>>
>>>>> During the build of my connector, I noticed that a .jar is created
>>>>> with the .zip for the connector so I tried to deploy it. Actually, I tried
>>>>> the following directories and my sequence does not find any of the
>>>>> components like if my connector was not deployed :
>>>>> - /repository/components/dropins (this directory did
>>>>> not exist so I created it)
>>>>> - /dropins
>>>>>
>>>>> In addition, I don't find anything in the documentation mentioning
>>>>> that we can deploy connectors as an OSGi bundle :(
>>>>>
>>>>> When I deploy the .zip of the

Re: [Dev] JPA in a custom connector

2017-05-04 Thread KasunG Gajasinghe
I do not think openjpa register any osgi services. Can you check whether
the package is exposed? Also verify the status of the openjpa bundle.

osgi> p org.apache.openjpa.persistence
osgi> ss openjpa

On Thu, May 4, 2017 at 7:01 PM, Thomas LEGRAND <thomas.legr...@versusmind.eu
> wrote:

> Hello again :)
>
> I retrieved the openjpa-all-2.4.2.jar file and dropped it in the 
> /lib
> directory to let the runtime taking care of the bundle generation during
> the startup. The effect was the generation of the file
> openjpa_all_2.4.2_1.0.0.jar in the directory /dropins.
>
> I restarted the EI with:
>
>  D:\ProjetESB\wso2ei-6.0.0\bin> .\integrator.bat -DosgiConsole=19444
>
> So I can connect to the OSGI  console via telnet. But, when I try to
> retrieve the objectclasses starting with org.apache.openjpa.*, I have
> nothing :(
>
> osgi> services (objectclass=org.apache.openjpa.*)
> "No registered services."
>
> Am I missing something?
>
> Regards,
>
> Thomas
>
> 2017-05-04 10:49 GMT+02:00 KasunG Gajasinghe <kas...@wso2.com>:
>
>> Hi Thomas,
>>
>> Well, the connector itself cannot be deployed as an osgi bundle. But, you
>> can call classes in osgi bundles from your connector. So, place your JPA
>> logic in an osgi bundle and add it to dropins/ folder. Then, call that from
>> your connector.
>>
>> This should give you flexibility over your classloading. I cannot comment
>> on JPA stuff though.
>>
>> On Thu, May 4, 2017 at 1:26 PM, Thomas LEGRAND <
>> thomas.legr...@versusmind.eu> wrote:
>>
>>> Hello KasunG,
>>>
>>> I forgot to mention that I am using wso2ei-6.0.0.
>>>
>>> During the build of my connector, I noticed that a .jar is created with
>>> the .zip for the connector so I tried to deploy it. Actually, I tried the
>>> following directories and my sequence does not find any of the components
>>> like if my connector was not deployed :
>>> - /repository/components/dropins (this directory did not
>>> exist so I created it)
>>> - /dropins
>>>
>>> In addition, I don't find anything in the documentation mentioning that
>>> we can deploy connectors as an OSGi bundle :(
>>>
>>> When I deploy the .zip of the connector via the interface, it is
>>> deployed in /repository/deployment/server/synapse-libs
>>> which is the same directory used by Synapse:
>>> http://synapse.apache.org/userguide/template_library.html
>>>
>>> Concerning the "architecture" of my component, I deployed a .zip with a
>>> META-INF directory containing the persistence.xml but I don't think it is
>>> used like the absence of mention in the Synaspe documentation above. :)
>>> Then, I call OpenJPA with the following lines:
>>>
>>> EntityManagerFactory emf = Persistence.createEntityManage
>>> rFactory("my-pu");
>>> EntityManager mgr = emf.createEntityManager();
>>>
>>> But then, I have the exception.
>>>
>>> I made a topic on StackOverflow one or two weeks ago:
>>> https://stackoverflow.com/questions/43538743/wso2-is-there-a
>>> -way-to-use-jpa-in-a-custom-connector
>>>
>>> I you know a documentation to generate an OSGi bundle for a connector, I
>>> am very interested. :)
>>>
>>> Regards,
>>>
>>> Thomas
>>>
>>> 2017-05-03 18:29 GMT+02:00 KasunG Gajasinghe <kas...@wso2.com>:
>>>
>>>> You are working in an OSGi environment, so you need to be thinking from
>>>> the osgi classloading perspective. Each osgi bundle under
>>>> repository/components/{plugins,dropins} has its own classloader and a
>>>> classpath.
>>>>
>>>> Hence, the place you put your persistence.xml is important. I'm not
>>>> sure how you call OpenJPA, so I cannot comment on what steps to follow. But
>>>> in essence, re-build your connector as an osgi bundle (its just a jar with
>>>> a set of manifest entries in MANIFEST.MF), and place it in
>>>> repository/components/dropins. I have not tested this myself though.
>>>>
>>>> Regards,
>>>> KasunG
>>>>
>>>>
>>>> On Wed, May 3, 2017 at 8:38 PM, Thomas LEGRAND <
>>>> thomas.legr...@versusmind.eu> wrote:
>>>>
>>>>> Hello everybody,
>>>>>
>>>>> I am currently writing a custom connector to retrieve information from
>>>>> a database. Because the mediators to do so d

Re: [Dev] JPA in a custom connector

2017-05-04 Thread KasunG Gajasinghe
Hi Thomas,

Well, the connector itself cannot be deployed as an osgi bundle. But, you
can call classes in osgi bundles from your connector. So, place your JPA
logic in an osgi bundle and add it to dropins/ folder. Then, call that from
your connector.

This should give you flexibility over your classloading. I cannot comment
on JPA stuff though.

On Thu, May 4, 2017 at 1:26 PM, Thomas LEGRAND <thomas.legr...@versusmind.eu
> wrote:

> Hello KasunG,
>
> I forgot to mention that I am using wso2ei-6.0.0.
>
> During the build of my connector, I noticed that a .jar is created with
> the .zip for the connector so I tried to deploy it. Actually, I tried the
> following directories and my sequence does not find any of the components
> like if my connector was not deployed :
> - /repository/components/dropins (this directory did not
> exist so I created it)
> - /dropins
>
> In addition, I don't find anything in the documentation mentioning that we
> can deploy connectors as an OSGi bundle :(
>
> When I deploy the .zip of the connector via the interface, it is deployed
> in /repository/deployment/server/synapse-libs which is the
> same directory used by Synapse: http://synapse.apache.org/
> userguide/template_library.html
>
> Concerning the "architecture" of my component, I deployed a .zip with a
> META-INF directory containing the persistence.xml but I don't think it is
> used like the absence of mention in the Synaspe documentation above. :)
> Then, I call OpenJPA with the following lines:
>
> EntityManagerFactory emf = Persistence.createEntityManagerFactory("
> my-pu");
> EntityManager mgr = emf.createEntityManager();
>
> But then, I have the exception.
>
> I made a topic on StackOverflow one or two weeks ago:
> https://stackoverflow.com/questions/43538743/wso2-is-
> there-a-way-to-use-jpa-in-a-custom-connector
>
> I you know a documentation to generate an OSGi bundle for a connector, I
> am very interested. :)
>
> Regards,
>
> Thomas
>
> 2017-05-03 18:29 GMT+02:00 KasunG Gajasinghe <kas...@wso2.com>:
>
>> You are working in an OSGi environment, so you need to be thinking from
>> the osgi classloading perspective. Each osgi bundle under
>> repository/components/{plugins,dropins} has its own classloader and a
>> classpath.
>>
>> Hence, the place you put your persistence.xml is important. I'm not sure
>> how you call OpenJPA, so I cannot comment on what steps to follow. But in
>> essence, re-build your connector as an osgi bundle (its just a jar with a
>> set of manifest entries in MANIFEST.MF), and place it in
>> repository/components/dropins. I have not tested this myself though.
>>
>> Regards,
>> KasunG
>>
>>
>> On Wed, May 3, 2017 at 8:38 PM, Thomas LEGRAND <
>> thomas.legr...@versusmind.eu> wrote:
>>
>>> Hello everybody,
>>>
>>> I am currently writing a custom connector to retrieve information from a
>>> database. Because the mediators to do so does not fit my needs, I am using
>>> a custom Java class which is currently implemented to retrieve a DataSource
>>> via the JNDI name I configured in the ESB interface. That works nicely :)
>>>
>>> But then, for maintenance purpose, I would like to use JPA (preferably,
>>> the OpenJPA implementation :)) but it is like the persistence.xml is not
>>> even read. :(
>>> My libraries are placed in the lib/ directory in the generated zip of my
>>> connector and I don't have any problem using the classes of OpenJPA.
>>> Actually, just this error message appears:
>>>
>>> 1 INFO [PassThroughMessageProcessor-313] openjpa.Runtime - Starting
>>> OpenJPA 2.4.0 org.apache.openjpa.persistence.ArgumentException: The
>>> persistence provi der is attempting to use properties in the
>>> persistence.xml file to resolve the data source. A Java Database
>>> Connectivity (JDBC) driver or data source class name must be specified in
>>> the openjpa.ConnectionDriverName or javax.persistence.jdbc.driver property.
>>> The following properties are available in the configuration:
>>> "org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl@442ce698".
>>>
>>> In the persistence.xml, you have the following content :
>>>
>>> 
>>> http://java.sun.com/xml/ns/persistence
>>> "
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>>> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
>>> http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd;>
>>> 
>>> org

Re: [Dev] JPA in a custom connector

2017-05-03 Thread KasunG Gajasinghe
You are working in an OSGi environment, so you need to be thinking from the
osgi classloading perspective. Each osgi bundle under
repository/components/{plugins,dropins} has its own classloader and a
classpath.

Hence, the place you put your persistence.xml is important. I'm not sure
how you call OpenJPA, so I cannot comment on what steps to follow. But in
essence, re-build your connector as an osgi bundle (its just a jar with a
set of manifest entries in MANIFEST.MF), and place it in
repository/components/dropins. I have not tested this myself though.

Regards,
KasunG


On Wed, May 3, 2017 at 8:38 PM, Thomas LEGRAND  wrote:

> Hello everybody,
>
> I am currently writing a custom connector to retrieve information from a
> database. Because the mediators to do so does not fit my needs, I am using
> a custom Java class which is currently implemented to retrieve a DataSource
> via the JNDI name I configured in the ESB interface. That works nicely :)
>
> But then, for maintenance purpose, I would like to use JPA (preferably,
> the OpenJPA implementation :)) but it is like the persistence.xml is not
> even read. :(
> My libraries are placed in the lib/ directory in the generated zip of my
> connector and I don't have any problem using the classes of OpenJPA.
> Actually, just this error message appears:
>
> 1 INFO [PassThroughMessageProcessor-313] openjpa.Runtime - Starting
> OpenJPA 2.4.0 org.apache.openjpa.persistence.ArgumentException: The
> persistence provi der is attempting to use properties in the
> persistence.xml file to resolve the data source. A Java Database
> Connectivity (JDBC) driver or data source class name must be specified in
> the openjpa.ConnectionDriverName or javax.persistence.jdbc.driver property.
> The following properties are available in the configuration:
> "org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl@442ce698".
>
> In the persistence.xml, you have the following content :
>
> 
> http://java.sun.com/xml/ns/persistence;
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
> http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd;>
> 
> org.apache.openjpa.persistence.PersistenceProviderImpl provider>
> jdbc/MyDataSource
> 
> 
>
> Is there some hidden magic to make it work?
>
> Thank you :)
>
> Regards,
>
> Thomas
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Enterprise Integrator 6.1.0 Released

2017-04-18 Thread KasunG Gajasinghe
+announce

On Tue, Apr 18, 2017 at 10:49 AM, Eranda Rajapakshe 
wrote:

> *WSO2 Enterprise Integrator 6.1.0 Released*
>
> WSO2 Enterprise Integrator team is pleased to announce the release of WSO2
> Enterprise Integrator 6.1.0.
>
> *Release Note*
>
> April 2017
>
> WSO2 EI is a unified distribution of WSO2 Enterprise Service Bus and Data
> Services Server, which works as a single runtime (Integrator) along with
> optional runtimes for WSO2 Analytics, Business Processor, Message Broker
> and MSF4J. This product distribution includes a shared component directory,
> with profile-based management capabilities for each runtime.
>
> WSO2 EI simplifies integration by allowing users to easily configure
> message routing, inter-mediation, transformation, logging, task scheduling,
> load balancing, failover routing, event brokering etc. Data services and
> various applications can also be hosted and exposed using WSO2 EI. These
> integration capabilities are further powered by the capabilities of the
> WSO2 Analytics, Business Processor and Message Broker runtimes.
>
>
> For more information on WSO2 Enterprise Integrator 6.1.0 and to download
> the product and tooling please visit http://wso2.com/integration/
>
>
> For WSO2 EI 6.1.0 Documentation, please visit
> https://docs.wso2.com/display/EI610/About+WSO2+Enterprise+Integrator
>
> Source can be found in
>
> EI Runtime 
>
> EI Tooling
> 
>
> Issues Fixed for this release
>
> https://github.com/wso2/product-ei/issues?q=is%3Aissue+is%3A
> closed+milestone%3A6.1.0
>
> *Known Issues*
>
> For a complete list of features to be implemented please refer the list of
> known issues :
>
> https://github.com/wso2/product-ei/issues
> Contact us
>
> WSO2 developers can be contacted via the mailing list: dev@wso2.org
>
> For details on subscriptions see http://wso2.org/mail
> Support
>
> We are committed to ensuring that your enterprise middleware deployment is
> completely supported from evaluation to production. Our unique approach
> ensures that all support leverages our open development methodology and is
> provided by the very same engineers who build the technology.
>
> For more details and to take advantage of this unique opportunity please
> visit http://wso2.com/support/
>
> Thank you for your interest in WSO2 Enterprise Integrator 6.1.0.
>
>
> - The WSO2 EI Team -
>
> --
> *Eranda Rajapakshe*
> Software Engineer
> WSO2 Inc.
> Mobile : +94784822608
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Calls fail while UserStoreConfigurationDeployer is running

2017-04-03 Thread KasunG Gajasinghe
On Mon, Apr 3, 2017 at 7:19 PM <re...@gmx-topmail.de> wrote:

> Hi,
> i was able to reproduce the error.
> Fist i wait till the unloading (log shows: Cleaned up tenant )
> Then i fire two request at the same time. The first request starts the
> deployment:
> Creating tenant AxisConfiguration for tenant: 
> User Store Configuration Deployer initiated.
>
> The second request runs into the error:
> The service cannot be found for the endpoint reference (EPR)
> local://axis2services/MyAPI/1.0/somePath
> {org.apache.axis2.engine.AxisEngine}
> org.apache.axis2.AxisFault: The service cannot be found for the endpoint
> reference (EPR) local://axis2services/MyAPI/1.0/somePath
>
>

This does not look like an endpoint of a tenant. This belongs to
super-tenant.

The first request is answered fine. The second contains the stacktrace of
> the exception.
>

>
That's quite unfortunate. May be there's a bug when using the local
transport. You could try with http/s if you like.

It seems that WSO2 1.8 does not have the tenant loading policy options, so
> i think i have to wait till we switch to WSO2 2.1.
>
>

I see. In that case, you can pass the tenant idle time via the system
property, -Dtenant.idle.time=30. Eager loading is not available in olddr
versions.

Thanks anyway
> regAW
> *Gesendet:* Montag, 03. April 2017 um 10:35 Uhr
> *Von:* "KasunG Gajasinghe" <kas...@wso2.com>
> *An:* re...@gmx-topmail.de
> *Cc:* "Omindu Rathnaweera" <omi...@wso2.com>, DEV <dev@wso2.org>
>
> *Betreff:* Re: [Dev] API Calls fail while UserStoreConfigurationDeployer
> is running
>
> Tenants get unloaded after 30mins of inactivity. In that case, tenants get
> unloaded and re-loaded.
>
> You can configure that through carbon.xml. You can either increase the
> tenant idle time of the default tenant lazy loading policy, or you can
> switch to tenant eager loading. See Tenant/LoadingPolicy under carbon.xml.
>
> The subsequent requests wait until the tenant gets loaded, and they also
> should get served fine. Are you able to correlate the API call failing and
> the userstore deploying?
> One way to do that is by comparing the time of the userstore deployment
> log vs. the http access logs around the same time.
>
>
> On Mon, Apr 3, 2017 at 1:24 PM, <re...@gmx-topmail.de> wrote:
>
> Hi,
> i've tested to change the DeploymentUpdateInterval in a test
> environment to 86400, so one day. But the line
> "User Store Configuration Deployer initiated." still appears more than
> once a day. I think the unloading may be the problem, like Omindu said.
> What happens if the tenant was unloaded and the first request starts the
> redeployment and during that a second request comes in? Could that lead to
> this error?
> How long is the idle time before unloading and can it be configured?
> It's kind of hard to test cause the redeployment takes less than a second.
>
> Regards,
> regAW
> *Gesendet:* Dienstag, 28. März 2017 um 21:13 Uhr
> *Von:* "Omindu Rathnaweera" <omi...@wso2.com>
> *An:* "KasunG Gajasinghe" <kas...@wso2.com>
> *Cc:* re...@gmx-topmail.de, DEV <dev@wso2.org>
> *Betreff:* Re: [Dev] API Calls fail while UserStoreConfigurationDeployer
> is running
> @KasunG The deployers can run during tenant loading, correct? Say the
> tenant got unloaded after the idle time, the next request to that tenant's
> resource will re deploy the tenant's user stores, services etc. In that
> case, will changing deployment update interval be effective ?
>
> Regards,
> Omindu
>
> On Tue, Mar 28, 2017 at 4:06 PM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>
> You can reduce the deployment update interval via carbon.xml. By default,
> it is 15mins. Search for DeploymentUpdateInterval. You can increase this.
>
> That being said, the deployers won't be called unless you modify
> userstore.
>
> On Mon, Mar 27, 2017 at 2:32 PM, <re...@gmx-topmail.de> wrote:
>
> Hi,
> i have a problem with my WSO2-am. The UserStoreConfigurationDeployer is
> running up to 20 times per day. During that time alle request to the api
> return a 500 http error. The backend is not called.
> I created a question on stackoverflow (
> http://stackoverflow.com/questions/42859483/the-service-cannot-be-found-for-the-endpoint-reference-while-user-store-configur
> ) but no answers so far.
> Can someone have a look at this or at least can confirm that it will not
> happen under 2.1?
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
> --
> *Kasun Gajasinghe*
> Associate Technical Lead, WSO2 In

Re: [Dev] API Calls fail while UserStoreConfigurationDeployer is running

2017-04-03 Thread KasunG Gajasinghe
Tenants get unloaded after 30mins of inactivity. In that case, tenants get
unloaded and re-loaded.

You can configure that through carbon.xml. You can either increase the
tenant idle time of the default tenant lazy loading policy, or you can
switch to tenant eager loading. See Tenant/LoadingPolicy under carbon.xml.

The subsequent requests wait until the tenant gets loaded, and they also
should get served fine. Are you able to correlate the API call failing and
the userstore deploying?
One way to do that is by comparing the time of the userstore deployment log
vs. the http access logs around the same time.


On Mon, Apr 3, 2017 at 1:24 PM, <re...@gmx-topmail.de> wrote:

> Hi,
> i've tested to change the DeploymentUpdateInterval in a test
> environment to 86400, so one day. But the line
> "User Store Configuration Deployer initiated." still appears more than
> once a day. I think the unloading may be the problem, like Omindu said.
> What happens if the tenant was unloaded and the first request starts the
> redeployment and during that a second request comes in? Could that lead to
> this error?
> How long is the idle time before unloading and can it be configured?
> It's kind of hard to test cause the redeployment takes less than a second.
>
> Regards,
> regAW
> *Gesendet:* Dienstag, 28. März 2017 um 21:13 Uhr
> *Von:* "Omindu Rathnaweera" <omi...@wso2.com>
> *An:* "KasunG Gajasinghe" <kas...@wso2.com>
> *Cc:* re...@gmx-topmail.de, DEV <dev@wso2.org>
> *Betreff:* Re: [Dev] API Calls fail while UserStoreConfigurationDeployer
> is running
> @KasunG The deployers can run during tenant loading, correct? Say the
> tenant got unloaded after the idle time, the next request to that tenant's
> resource will re deploy the tenant's user stores, services etc. In that
> case, will changing deployment update interval be effective ?
>
> Regards,
> Omindu
>
> On Tue, Mar 28, 2017 at 4:06 PM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>>
>>
>> You can reduce the deployment update interval via carbon.xml. By default,
>> it is 15mins. Search for DeploymentUpdateInterval. You can increase this.
>>
>> That being said, the deployers won't be called unless you modify
>> userstore.
>>
>> On Mon, Mar 27, 2017 at 2:32 PM, <re...@gmx-topmail.de> wrote:
>>
>>> Hi,
>>> i have a problem with my WSO2-am. The UserStoreConfigurationDeployer is
>>> running up to 20 times per day. During that time alle request to the api
>>> return a 500 http error. The backend is not called.
>>> I created a question on stackoverflow ( http://stackoverflow.com/
>>> questions/42859483/the-service-cannot-be-found-for-
>>> the-endpoint-reference-while-user-store-configur ) but no answers so
>>> far.
>>> Can someone have a look at this or at least can confirm that it will not
>>> happen under 2.1?
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>
>>
>>
>> --
>> *Kasun Gajasinghe*
>> Associate Technical Lead, WSO2 Inc.
>> email: kasung AT spamfree wso2.com
>> linked-in: http://lk.linkedin.com/in/gajasinghe
>> blog: http://kasunbg.org
>> phone: +1 650-745-4499, 77 678 0813
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
>
> --
> Omindu Rathnaweera
> Senior Software Engineer, WSO2 Inc.
> Mobile: +94 771 197 211 <077%20119%207211>
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Calls fail while UserStoreConfigurationDeployer is running

2017-03-28 Thread KasunG Gajasinghe
You can reduce the deployment update interval via carbon.xml. By default,
it is 15mins. Search for DeploymentUpdateInterval. You can increase this.

That being said, the deployers won't be called unless you modify userstore.


On Mon, Mar 27, 2017 at 2:32 PM,  wrote:

> Hi,
> i have a problem with my WSO2-am. The UserStoreConfigurationDeployer is
> running up to 20 times per day. During that time alle request to the api
> return a 500 http error. The backend is not called.
> I created a question on stackoverflow ( http://stackoverflow.com/
> questions/42859483/the-service-cannot-be-found-for-
> the-endpoint-reference-while-user-store-configur ) but no answers so far.
> Can someone have a look at this or at least can confirm that it will not
> happen under 2.1?
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [carbondump] Updating carbondump.sh for Java 8

2017-03-24 Thread KasunG Gajasinghe
+1. For Java7, we can collect permgen, and for Java8, we can collect
metaspace dumps.

On Fri, Mar 24, 2017 at 10:59 AM, Isuru Perera  wrote:

> Hi Nira,
>
> I also thought that. I think may be we can do the version check also. I'm
> hoping to do a review on the script. Since we rarely use that script to
> debug issues.
>
> Thanks!
>
> On Fri, Mar 24, 2017 at 10:51 AM, Niranjan Karunanandham <
> niran...@wso2.com> wrote:
>
>> Hi isuru,
>>
>> On Fri, Mar 24, 2017 at 10:38 AM, Isuru Perera  wrote:
>>
>>> Hi,
>>>
>>> It'll be useful to have those details. I think we can just update the
>>> command to work in Java 8 for now. Connecting to the JVM to get these kinds
>>> of stats will have an impact on the server, but it should be okay as we run
>>> carbondump to debug the server.
>>>
>>> I think we must go through all commands in the carbondump and make sure
>>> that all of those are still relevant for today. I can do that later.
>>>
>> Shouldn't we check if the server is running in Java 7 or Java 8 and then
>> check accordingly?
>>
>>
>>>
>>> Thanks!
>>>
>>> Best Regards,
>>>
>>> On Thu, Mar 23, 2017 at 10:43 PM, Milinda Perera 
>>> wrote:
>>>
 Hi,

 In carbondump.sh [1] we retrieve  permgen stats in Java Heap (jmap
 -permstat $PID) . Since Java 8 onwards, it is replaced by Metaspace and
 permstat option is no longer exists in jmap tool.

 Metaspace can be retrieved by: jmap -clstats 

 Shall we remove permstat and replace with clstats or just remove
 retrieving permgen stats? Is  Is it useful retrieving permstat or clstats
 to figure out errors?
 Whether it may effect on the running server?

 [1] https://docs.wso2.com/display/ADMIN44x/Capturing+System+Data
 +in+Error+Situations

 Thanks,
 Milinda

 --
 Milinda Perera
 Senior Software Engineer;
 WSO2 Inc. http://wso2.com ,
 Mobile: (+94) 714 115 032 <071%20411%205032>


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


>>>
>>>
>>> --
>>> Isuru Perera
>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>> Contact: +IsuruPereraWSO2
>>> 
>>>
>>
>> Regards,
>> Nira
>>
>> --
>>
>>
>> *Niranjan Karunanandham*
>> Associate Technical Lead - WSO2 Inc.
>> WSO2 Inc.: http://www.wso2.com
>>
>>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Checkstyle rule "checkFirstSentence" check only happens on windows build

2017-03-11 Thread KasunG Gajasinghe
Nice. Let's send a PR to https://github.com/wso2/code-quality-tools

On Sat, Mar 11, 2017 at 2:45 PM, Omindu Rathnaweera <omi...@wso2.com> wrote:

> Hi guys,
>
> Finally found some time to have a look at this. We can use the below
> module [1] to enforce the check on the first sentence. I tested this on OSX
> and it's working.
>
> 
>
>  [1]  - http://checkstyle.sourceforge.net/config_
> javadoc.html#SummaryJavadoc
>
> Regards,
> Omindu.
>
> On Mon, Mar 6, 2017 at 3:29 PM, KasunG Gajasinghe <kas...@wso2.com> wrote:
>
>>
>>
>> On Mon, Mar 6, 2017 at 3:22 PM, Omindu Rathnaweera <omi...@wso2.com>
>> wrote:
>>
>>> Hi Devs,
>>>
>>> Noticed that the builds (with wso2 parent v5) done on windows fails with
>>> the error "First sentence should end with a period.". Seems like this
>>> check can be configured with *checkFirstSentence* rule [1]. Is it
>>> possible to enforce this rule for all environments ?
>>>
>>
>> +1 Omindu. This has been an issue for a long time. Can you add this rule
>> to [2] and see whether we can enforce this rule in Linux/Unix environments
>> as well?
>>
>> [2] https://raw.githubusercontent.com/wso2/code-quality-tool
>> s/master/checkstyle/checkstyle.xml
>>
>>
>>>
>>> [1] - http://checkstyle.sourceforge.net/config_javadoc.html#JavadocStyle
>>>
>>> Regards,
>>> Omindu.
>>>
>>> --
>>> Omindu Rathnaweera
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94 771 197 211 <077%20119%207211>
>>>
>>
>>
>>
>> --
>>
>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>> email: kasung AT spamfree wso2.com
>> linked-in: http://lk.linkedin.com/in/gajasinghe
>> blog: http://kasunbg.org
>> phone: +1 650-745-4499 <+1%20650-745-4499>, 77 678 0813
>>
>>
>
>
>
> --
> Omindu Rathnaweera
> Software Engineer, WSO2 Inc.
> Mobile: +94 771 197 211 <077%20119%207211>
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] User profile functionality in admin portal and user portal

2017-03-07 Thread KasunG Gajasinghe
To reduce complexity, I think we can keep an account settings within the
admin portal as well. Otherwise, we have to know where the user-portal app
is located in a distributed environment etc.

We can create a UUF component [1] for account-settings and re-use it across
both portals.

[1]
https://github.com/wso2/carbon-uuf-maven-tools/tree/master/plugin#1-creating-a-uuf-component

On Tue, Mar 7, 2017 at 4:34 PM, Pushpalanka Jayawardhana 
wrote:

> Hi All,
>
> In the user portal we already have functionality implemented for 'account
> settings' shown in top right-hand, along with the logout option for
> logged-in user.
> Using this option the logged-in user can update the profile details,
> security questions etc.
>
> When we come down to the admin users, they may also need to update their
> user profiles, security questions etc. Ideally in that case they should
> also go via this 'account settings' option in top right-hand side.
> At this point we have several options.
>
> - Should we redirect the admin users to user-portal to complete this
> operation of updating their own user profile or
> - Should we implement that same profile update functionalities within
> admin-portal?
>
> - If we are to go with this approach, if will be good if we can place the
> common code in some other place where both apps(admin-portal and
> user-portal) can reuse.
>
> Appreciate you inputs.
>
> Thanks,
> --
> Pushpalanka.
> --
> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
> Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
> Mobile: +94779716248
> Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/
> pushpalanka/ | Twitter: @pushpalanka
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Checkstyle rule "checkFirstSentence" check only happens on windows build

2017-03-06 Thread KasunG Gajasinghe
On Mon, Mar 6, 2017 at 3:22 PM, Omindu Rathnaweera  wrote:

> Hi Devs,
>
> Noticed that the builds (with wso2 parent v5) done on windows fails with
> the error "First sentence should end with a period.". Seems like this
> check can be configured with *checkFirstSentence* rule [1]. Is it
> possible to enforce this rule for all environments ?
>

+1 Omindu. This has been an issue for a long time. Can you add this rule to
[2] and see whether we can enforce this rule in Linux/Unix environments as
well?

[2] https://raw.githubusercontent.com/wso2/code-quality-tools/master/
checkstyle/checkstyle.xml


>
> [1] - http://checkstyle.sourceforge.net/config_javadoc.html#JavadocStyle
>
> Regards,
> Omindu.
>
> --
> Omindu Rathnaweera
> Software Engineer, WSO2 Inc.
> Mobile: +94 771 197 211 <077%20119%207211>
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499 <+1%20650-745-4499>, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] uuf maven plugin version of carbon-uuf and uuf-commons

2017-03-06 Thread KasunG Gajasinghe
Hi Denuwanthi,

Will this affect the IS admin portal development? If so, on what degree?

Thanks.

On Mon, Mar 6, 2017 at 10:42 AM, Denuwanthi De Silva 
wrote:

> Hi,
>
> IS 6.0.0 M5 development will be moving from carbon-uuf version m12 to m13.
> In compliance with that we will move the carbon-uuf-common version to
> 1.0.0-m5.
>
> In carbon-uuf, the cabon-uuf-maven-plugin version is set to 1.0.0-m11 [1],
> while carbon-uuf-common has cabon-uuf-maven-plugin version set to
> 1.0.0-m10 [2].
>
> Do we need to update the cabon-uuf-maven-plugin version on
> carbon-uuf-common? or is it ok to proceed with carbon-uuf m13 and
> uuf-commons m5?
>
>
>
> [1]https://github.com/wso2/carbon-uuf/blob/v1.0.0-m13/pom.xml#L614
> [2]https://github.com/wso2/carbon-uuf-common/blob/v1.0.0-m5/pom.xml#L129
>
>
> Thanks
> --
> Denuwanthi De Silva
> Senior Software Engineer;
> WSO2 Inc.; http://wso2.com,
> Email: denuwan...@wso2.com
> Blog: https://denuwanthi.wordpress.com/
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Error while initiating response builder

2017-02-25 Thread KasunG Gajasinghe
I think this is caused by this dependency: javax/ws/rs/javax.
ws.rs-api/2.0/javax.ws.rs-api-2.0.jar
You might want to exclude it.

On Sat, Feb 25, 2017 at 5:10 PM, Hasintha Indrajee 
wrote:

>
> Hi all,
>
> I am getting the following class cast exception while initiating a
> Response builder. Following is the line of code causing this issue. Note
> that I am only getting this while running tests. Any Idea about the cause
> of this issue ?
>
> Response.ResponseBuilder builder = Response.noContent();
>
>
> msf4j-core[org.wso2.msf4j.internal.MSF4JMessageProcessor] : Unmapped
> exception
> java.lang.LinkageError: ClassCastException: attempting to
> castjar:file:/home/hasinthaindrajee/.m2/repository/javax/ws/rs/javax.
> ws.rs-api/2.0/javax.ws.rs-api-2.0.jar!/javax/ws/rs/ext/RuntimeDelegate.class
> to bundleresource://53.fwk689654773/javax/ws/rs/ext/RuntimeDelegate.class
> at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:146)
> at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)
> at javax.ws.rs.core.Response$ResponseBuilder.newInstance(
> Response.java:848)
> at javax.ws.rs.core.Response.status(Response.java:590)
> at javax.ws.rs.core.Response.status(Response.java:601)
> at javax.ws.rs.core.Response.accepted(Response.java:709)
> at org.wso2.carbon.identity.sample.outbound.response.
> ACSRequestResponseBuilderFactory.createBuilder(
> ACSRequestResponseBuilderFactory.java:16)
> at org.wso2.carbon.identity.gateway.resource.GatewayManager.execute(
> GatewayManager.java:86)
> at org.wso2.carbon.identity.gateway.resource.GatewayResource.processGet(
> GatewayResource.java:59)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.wso2.msf4j.internal.router.HttpMethodInfo.invoke(
> HttpMethodInfo.java:132)
> at org.wso2.msf4j.internal.MSF4JMessageProcessor.dispatchMethod(
> MSF4JMessageProcessor.java:130)
> at org.wso2.msf4j.internal.MSF4JMessageProcessor.receive(
> MSF4JMessageProcessor.java:72)
> at org.wso2.carbon.transport.http.netty.listener.
> WorkerPoolDispatchingSourceHandler.lambda$publishToWorkerPool$12(
> WorkerPoolDispatchingSourceHandler.java:125)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
>
> --
> Hasintha Indrajee
> WSO2, Inc.
> Mobile:+94 771892453 <077%20189%202453>
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Automation Testing Plan for SCIM Provider

2017-02-02 Thread KasunG Gajasinghe
Hi Gayan,

In Kernel 5.2.0, starting the servers by providing the distribution pack is
coming. But this support is not sufficient in 5.1.0 that we are using.
Until, then we can write our typical way of starting the servers via
pax-exam for testing.

Please note that even though we are exposing MSF4J, MSF4J services in IS
are registered and discovered via OSGi. This is in contrast to pure java
mode based tests in MSF4J. So, writing tests for a server started via
Pax-exam is not an issue IMO.


On Thu, Jan 26, 2017 at 11:01 PM, Gayan Gunawardana  wrote:

> Hi All,
>
> We are in the process of writing test cases for repository [1]. This is
> bit different than other repositories where we have OSGI tests. For SCIM we
> have to test micro services exposed by SCIM provider component[2]. We are
> planning to go with same approach as in ms4j test cases [3].
>
> According to off-line discussion had with DharshanaW, service runtime can
> be generated by running[4] as a server which includes carbon-kernel+SCIM
> feature+dependent features for SCIM feature.
>
> Appreciate your feedback and suggestions if you have any concerns
> regarding above approach.
>
> [1] https://github.com/wso2-extensions/identity-inbound-provisioning-scim2
> [2] https://github.com/wso2-extensions/identity-inbound-
> provisioning-scim2/tree/master/components/org.wso2.
> carbon.identity.inbound.provisioning.scim2.provider
> [3] https://github.com/wso2/msf4j/tree/master/core/src/test
> [4] https://github.com/wso2-extensions/identity-inbound-
> provisioning-scim2/tree/master/tests/distribution
>
> Thanks,
> Gayan
> --
> Gayan Gunawardana
> Software Engineer; WSO2 Inc.; http://wso2.com/
> Email: ga...@wso2.com
> Mobile: +94 (71) 8020933
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Enterprise Integrator 6.0.0 Milestone 2 Released !

2017-02-01 Thread KasunG Gajasinghe
Ok, thanks.

On Wed, Feb 1, 2017 at 4:50 PM, Nilmini Perera <nilm...@wso2.com> wrote:

> Hi all,
>
> A small change regarding the availability of documentation.
>
> We will make the documentation for EI public by mid next week.
> Since EI is merging multiple products, the current state of the
> documentation does not give the clearest picture about EI as a single
> product. We will do some more improvements to it before making it public.
>
> So, please note that we will not make the docs public EOD.
>
> Thanks.
>
> On Wed, Feb 1, 2017 at 11:36 AM, Malith Munasinghe <mali...@wso2.com>
> wrote:
>
>> Hi Kasun,
>>
>> On Wed, Feb 1, 2017 at 1:39 AM, KasunG Gajasinghe <kas...@wso2.com>
>> wrote:
>>
>>> Hi Malith,
>>>
>>> Have we prepared the vision docs for EI? Since this is a new product
>>> created by merging multiple products together, I'd like to know how we are
>>> positioning this.
>>>
>>
>>>
>>> Also, please provide the link to the documentation.
>>>
>>
>> The documentation for the product EI will be available EOD today.
>>
>>
>>>
>>> Thanks,
>>> KasunG
>>>
>>>
>>> On Tue, Jan 31, 2017 at 10:34 PM, Malith Munasinghe <mali...@wso2.com>
>>> wrote:
>>>
>>>> Hi All,
>>>>
>>>> The WSO2 Integration team is pleased to announce the 2nd Milestone
>>>> release of WSO2 Enterprise Integrator (EI)  6.0.0.
>>>>
>>>> Source & binary distribution files of WSO2 Enterprise Integrator 6.0.0
>>>>
>>>> Distribution :  https://github.com/wso2/produ
>>>> ct-ei/releases/tag/v6.0.0-m2
>>>> Known Issues : https://github.com/wso2/product-ei/issues
>>>>
>>>> Thanks
>>>> ~Integration Team~
>>>> --
>>>> Malith Munasinghe | Software Engineer
>>>> M: +94 (71) 9401122 <+94%2071%20940%201122>
>>>> E: mali...@wso2.com
>>>> W: http://wso2.com
>>>> <http://wso2.com/signature>
>>>>
>>>> ___
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>>> email: kasung AT spamfree wso2.com
>>> linked-in: http://lk.linkedin.com/in/gajasinghe
>>> blog: http://kasunbg.org
>>> phone: +1 650-745-4499 <(650)%20745-4499>, 77 678 0813
>>>
>>>
>>
>>
>>
>> --
>> Malith Munasinghe | Software Engineer
>> M: +94 (71) 9401122 <+94%2071%20940%201122>
>> E: mali...@wso2.com
>> W: http://wso2.com
>> <http://wso2.com/signature>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Nilmini Perera
>
> Associate Lead Technical Writer
> WSO2 Inc.
>
> Mobile: 0094776722152 <077%20672%202152>
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fwd: Why re-write User class? Why re-wrap RealmService?

2017-02-01 Thread KasunG Gajasinghe
Hi Shariq,

On Wed, Feb 1, 2017 at 4:45 PM, Muhammed Shariq <sha...@wso2.com> wrote:

>
> On Wed, Feb 1, 2017 at 1:10 AM, KasunG Gajasinghe <kas...@wso2.com> wrote:
>
>> Hi Manu,
>>
>> #1. Because UUF's #createSession function expects an instance
>> of org.wso2.carbon.uuf.spi.auth.User not org.wso2.carbon.identity.mgt.
>> User.
>>
>> But, this is actually an improvement that we need to do. UUF should
>> either use org.wso2.carbon.identity.mgt.User or an extended class. We
>> should not have two User objects. *@UUF team*, what are you thoughts on
>> this?
>>
>
> If we do this, UUF will have a dependency to identity related components,
> that's not a good design IMO.
>


Carbon-identity-mgt is for Managing user identities. The User object in
there represents an identity. So, why do we have to maintain a separate
User hierarchy?

Thanks,
KasunG


>
>>
>> #2. The reason is to have a balance between Nashorn js code and Java
>> code. If we eliminate this client service class, then we have to move the
>> code to Nashorn js. So, this does not result in less code. Having a client
>> class is preferable since Java execution is faster and developers are more
>> familiar with that.
>>
>> On Tue, Jan 31, 2017 at 8:31 PM, Danushka Fernando <danush...@wso2.com>
>> wrote:
>>
>>> I guess the idea was to write an api layer for web app which will call
>>> backend services and get all the data and do all the processing and return
>>> data sets that can directly be used in the frond end / UUF application. If
>>> there are no security reasons, +1 to remove the Middle man.
>>>
>>> [1] https://sourcemaking.com/refactoring/smells/middle-man
>>>
>>> Thanks & Regards
>>> Danushka Fernando
>>> Senior Software Engineer
>>> WSO2 inc. http://wso2.com/
>>> Mobile : +94716332729 <071%20633%202729>
>>>
>>> On Tue, Jan 31, 2017 at 8:14 PM, Manuranga Perera <m...@wso2.com> wrote:
>>>
>>>>
>>>> -- Forwarded message --
>>>> From: Manuranga Perera <m...@wso2.com>
>>>> Date: Tue, Jan 31, 2017 at 2:44 PM
>>>> Subject: Why re-write User class? Why re-wrap RealmService?
>>>> To: Kasun Gajasinghe <kas...@wso2.com>, Indunil Upeksha Rathnayake <
>>>> indu...@wso2.com>, Danushka Fernando <danush...@wso2.com>, Ayesha
>>>> Dissanayaka <aye...@wso2.com>
>>>> Cc: Kishanthan Thangarajah <kishant...@wso2.com>, Rasika Perera <
>>>> rasi...@wso2.com>, Shariq Muhammed <sha...@wso2.com>, Shan Mahanama <
>>>> sh...@wso2.com>, Sajith Ariyarathna <sajit...@wso2.com>
>>>>
>>>>
>>>> 1) Why have we written org.wso2.is.portal.user.client.api.bean.UUFUser
>>>> instead of just reusing org.wso2.carbon.identity.mgt.User ?
>>>>
>>>>
>>>> 2) Even better, is there anything stopping us from directly calling
>>>> RealmService OSGi service from the UUF js (eg: for list users) instead
>>>> going through IdentityStoreClientServiceImpl wrapper.
>>>>
>>>> Less code the better.
>>>>
>>>> --
>>>> With regards,
>>>> *Manu*ranga Perera.
>>>>
>>>> phone : 071 7 70 20 50
>>>> mail : m...@wso2.com
>>>>
>>>>
>>>>
>>>> --
>>>> With regards,
>>>> *Manu*ranga Perera.
>>>>
>>>> phone : 071 7 70 20 50
>>>> mail : m...@wso2.com
>>>>
>>>> ___
>>>> 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
>>>
>>>
>>
>>
>> --
>>
>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>> email: kasung AT spamfree wso2.com
>> linked-in: http://lk.linkedin.com/in/gajasinghe
>> blog: http://kasunbg.org
>> phone: +1 650-745-4499 <(650)%20745-4499>, 77 678 0813
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thanks,
> Shariq
> Associate Technical Lead
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fwd: Why re-write User class? Why re-wrap RealmService?

2017-02-01 Thread KasunG Gajasinghe
On Wed, Feb 1, 2017 at 4:04 PM, Manuranga Perera <m...@wso2.com> wrote:

> Hi Kasun,
>
> +1. This does not mean we are limited by these though. When you have
>> complex logic I would rather do it in Java than JS. Especially for IS
>> portals, we are following 90/10 rule where 90% of the code is executed in
>> the back-end. So, there's a lot of logic involved in the backend.
>>
> Ok, how about,
>
>> Must keep code in Java side, if
>>
>>- It talks to the database
>>- It touches the file system
>>- Computation heavy
>>- Needs multi threading to work
>>
>> Anything else is up to you to decide, but as a rule of thumb, if it has
>> to do with the presentation of the data, not the data itself, it's better
>> in JS side.
>>
>
>
Yes, makes sense.


>
>
>> It is not some boilerplate code. It does have its own logic.
>>
> If it has logic its ok, but I don't see it. eg: what is the business logic
> in [1]? Every method in it just call the same named method form
> RealmService.
>
> I am sure you remember */ui/**/*ServiceClient.java files [2] from C4. We
> also wrote Jaggery module wrappers, eg [3]. I condenser most (not all) of
> that code boilerplate, people have spend lot of time to write them, for no
> real gain. Feel like we are repeating that same mistake, and not even
> seeing it as a mistake, since we are so used to it.
>
> Please take a step back and think fresh. If you came across this kind of
> code [2] [3] for the first time, will you tolerate set of *Zombie classes*
> that has no brains of their own, depends on other classes brain to work,
> and grows in number over time? If you feel it need to be wrapped for some
> reason, (eg: to convert backbend errors to more user friendly errors) let's
> invent a proper way (eg: a mapping file in UUF that maps Exception type to
> error code/message). Let's not write bunch of wrapper code, again.
>
>
In C4-era, ServiceClient was separated, and it did result in loads of
boilerplate code like [1]. In there, we are blindly delegating the call to
the stub. Those ServiceClients acts as a proxy, and does not have any real
logic. So, this should be avoided in C5.

IdentityStoreClientServiceImpl was not intended for that purpose. If we can
directly call the realmservice, then we should.

[1]
https://github.com/wso2/carbon-identity/blob/7a421e21941ff48914115f772d01027766f556a5/components/oauth/org.wso2.carbon.identity.oauth.ui/src/main/java/org/wso2/carbon/identity/oauth/ui/client/OAuthServiceClient.java



>
> [1] https://github.com/wso2/product-is/blob/6.0.x-C5_m3/
> portal/osgi-services/org.wso2.is.portal.user.client.api/src/
> main/java/org/wso2/is/portal/user/client/api/
> IdentityStoreClientServiceImpl.java
> [2] https://github.com/search?utf8=%E2%9C%93=ui+*
> ServiceClient+in%3Apath+org%3Awso2=Code=searchresults (If you do
> a find in old svn you'll find more)
> [3] https://github.com/wso2/jaggery-extensions/blob/
> master/carbon/module/scripts/user/user-manager.js
>
> On Wed, Feb 1, 2017 at 5:25 AM, Danushka Fernando <danush...@wso2.com>
> wrote:
>
>> Hi Kasun
>> I think logic is related to #1. If we are eliminating that then it will
>> be a middle man.
>>
>> Thanks & Regards
>> Danushka Fernando
>> Senior Software Engineer
>> WSO2 inc. http://wso2.com/
>> Mobile : +94716332729 <+94%2071%20633%202729>
>>
>> On Wed, Feb 1, 2017 at 10:50 AM, KasunG Gajasinghe <kas...@wso2.com>
>> wrote:
>>
>>>
>>>
>>> On Wed, Feb 1, 2017 at 6:15 AM Manuranga Perera <m...@wso2.com> wrote:
>>>
>>>> Hi Kasun,
>>>>
>>>> #1. Because UUF's #createSession function expects an instance
>>>> of org.wso2.carbon.uuf.spi.auth.User not org.wso2.carbon.identity.mgt.
>>>> User.
>>>>
>>>> But, this is actually an improvement that we need to do. UUF should
>>>> either use org.wso2.carbon.identity.mgt.User or an extended class. We
>>>> should not have two User objects. *@UUF team*, what are you thoughts
>>>> on this?
>>>>
>>>> +1
>>>>
>>>>
>>>>
>>>> #2. The reason is to have a balance between Nashorn js code and Java
>>>> code. If we eliminate this client service class, then we have to move the
>>>> code to Nashorn js. So, this does not result in less code. Having a client
>>>> class is preferable since Java execution is faster and developers are more
>>>> familiar with that.
>>>>
>>>> From UUF perspective, agreed. We should have part of the logic in java
&

Re: [Dev] [IAM] JdbcSQLException while building the IS 6.0.0 with Lifecycle feature.

2017-01-31 Thread KasunG Gajasinghe
Hi Isura,

Can you check whether the H2 driver version is up-to-date? MV_STORE is H2's
new storage system. - http://www.h2database.com/html/mvstore.html

On Wed, Feb 1, 2017 at 12:29 PM, Isura Karunaratne  wrote:

> Hi,
>
> I am getting following error while building the product-is with APIM
> lifecycle feature [1]. What could be the reason?
>
>
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-antrun-plugin:1.8:run
> (create-carbon-database) on project org.wso2.is.product: An Ant
> BuildException has occured: org.h2.jdbc.JdbcSQLException: Unsupported
> connection setting "MV_STORE" [90113-140]
> [ERROR] around Ant part ... driver="org.h2.Driver" onerror="continue" userid="wso2carbon"
> url="jdbc:h2:/media/Isura/wso2source/is/git/product-is/
> product/target/wso2carbon-kernel-5.1.0/database/
> WSO2CARBON_DB;MV_STORE=FALSE;create=true">... @ 8:255 in
> /media/Isura/wso2source/is/git/product-is/product/target/
> antrun/build-main.xml
> [ERROR] -> [Help 1]
>
>
>
>
> *build-main.xml *
>
> 
> 
> 
>   
> 
>   
>   
>onerror="continue" userid="wso2carbon" url="jdbc:h2:/media/Isura/
> wso2source/is/git/product-is/product/target/wso2carbon-
> kernel-5.1.0/database/WSO2CARBON_DB;MV_STORE=FALSE;create=true">
> 
>   
> 
> 
>   
> 
> 
>   
>   
> 
> 
>
>
>
> [1] https://github.com/wso2/carbon-apimgt/tree/C5/lcm
>
> Regards,
>
> *Isura Dilhara Karunaratne*
> Senior Software Engineer | WSO2
> Email: is...@wso2.com
> Mob : +94 772 254 810 <077%20225%204810>
> Blog : http://isurad.blogspot.com/
>
>
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [UUF] Exception Handling in UUF app

2017-01-31 Thread KasunG Gajasinghe
To not disclose the back-end server details to the user, we should always
catch the exceptions in the UUF app. If it is a UIException, then we can
show the error message to the user. Otherwise, we should show a generic
error message - something like "An error has occurred while processing your
request."

If we know how to handle it, it is best if we handle it within the same
page where the error has occurred. We already do this in multiple places.
For example, see the code for user portal's login page when you enter
invalid credentials.

For unexpected errors, we can customize the error pages via the app.yaml's
errorPages config.

app.yaml:
errorPages:
  404: "/foundation/error/404"
  401: "/login"
  default: "/foundation/error/default"

On Wed, Feb 1, 2017 at 12:20 PM, Ayesha Dissanayaka  wrote:

> Hi,
>
> What are the good practices around exception handling in UUF in scenarios
> like handling exceptions thrown when callOSGiService.
>
> for example consider below method.
>
>> /**
>>  * Check whether the notification based password recovery enabled
>>  */
>>
>> function isNotificationBasedPasswordRecoveryEnabled() {
>> var checkMethod = "isNotificationBasedPasswordRecoveryEnabled";
>> return callOSGiService("org.wso2.is.portal.user.client.api.
>> RecoveryMgtService",
>> checkMethod, []);
>>
>> }
>>
>
> If I don't catch exceptions within this method or whenever using 
> *isNotificationBasedPasswordRecoveryEnabled
> *method, in the UI I get below page.
>
>
> ​What is the recommended way to handle this?
>
>1. Handle exceptions around callOSGiService.
>   - Then we'll have to repeat the same whenever we call osgi from a
>   uuf app
>   2. Handle at method invocation, and redirect to error page.
>3. Provide a generic message in the UI from UUF in such cases, unless
>handled in the app.
>4. Do we have to handle exceptions from osgi service itself?
>5. Other?
>
> ​Thanks!
> -Ayesha
>
> --
> *Ayesha Dissanayaka*
> Software Engineer,
> WSO2, Inc : http://wso2.com
> 
> 20, Palmgrove Avenue, Colombo 3
> E-Mail: aye...@wso2.com 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Run mvn javadoc:javadoc before sending PRs wso2 repos

2017-01-31 Thread KasunG Gajasinghe
On Wed, Feb 1, 2017 at 11:00 AM, Kishanthan Thangarajah <kishant...@wso2.com
> wrote:

> Ideally, we should enforce this from carbon root parent pom for the
> default build profile also - http://maven.wso2.org/nexus/
> content/repositories/releases/org/wso2/wso2/5/wso2-5.pom
>

Yes, +1. @Maduranga, can you send a PR to carbon-parent? Then we can
release it and use across all the repos.


>
> On Wed, Feb 1, 2017 at 10:54 AM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>>
>> +1.
>>
>>
>> On Wed, Feb 1, 2017 at 10:50 AM Sagara Gunathunga <sag...@wso2.com>
>> wrote:
>>
>>> On Wed, Feb 1, 2017 at 10:49 AM, Dharshana Warusavitharana <
>>> dharsha...@wso2.com> wrote:
>>>
>>> Hi Johan,
>>>
>>> Untill that shall we add Javadoc plugin to repo level [1]
>>>
>>>
>>> +1
>>>
>>
>>> Thanks !
>>>
>>>
>>> [1] . https://maven.apache.org/plugins/maven-javadoc-plugin/usage.html
>>>
>>> On Wed, Feb 1, 2017 at 10:44 AM, Johann Nallathamby <joh...@wso2.com>
>>> wrote:
>>>
>>> Please note $subject. Otherwise the CI/CD will fail in jenkins.
>>>
>>> @Kasun: can't we add this javadoc plugin to kernel parent so that it is
>>> enforced for all repos? Since now we are releasing the repo for every merge
>>> to wso2 repo it doesn't make a big difference just to run during the
>>> release phase.
>>>
>>> --
>>> 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 <http://nallaa.wordpress.com>*
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Dharshana Warusavitharana
>>> Associate Technical Lead
>>> WSO2 Inc. http://wso2.com
>>> email : dharsha...@wso2.com <dharsha...@wso2.com>
>>> Tel  : +94 11 214 5345
>>> Fax :+94 11 2145300 <+94%2011%202%20145300>
>>> cell : +94770342233 <+94%2077%20034%202233>
>>> blog : http://dharshanaw.blogspot.com
>>>
>>> lean . enterprise . middleware
>>>
>>>
>>>
>>>
>>> --
>>> Sagara Gunathunga
>>>
>>> Associate Director / Architect; WSO2, Inc.;  http://wso2.com
>>> V.P Apache Web Services;http://ws.apache.org/
>>> Linkedin; http://www.linkedin.com/in/ssagara
>>> Blog ;  http://ssagara.blogspot.com
>>>
>>> --
>>
>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>> email: kasung AT spamfree wso2.com
>> linked-in: http://lk.linkedin.com/in/gajasinghe
>> blog: http://kasunbg.org
>> phone: +1 650-745-4499 <(650)%20745-4499>, 77 678 0813
>>
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635 <077%20342%206635>
> Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
> Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fwd: Why re-write User class? Why re-wrap RealmService?

2017-01-31 Thread KasunG Gajasinghe
On Wed, Feb 1, 2017 at 6:15 AM Manuranga Perera <m...@wso2.com> wrote:

> Hi Kasun,
>
> #1. Because UUF's #createSession function expects an instance
> of org.wso2.carbon.uuf.spi.auth.User not org.wso2.carbon.identity.mgt.User
> .
>
> But, this is actually an improvement that we need to do. UUF should
> either use org.wso2.carbon.identity.mgt.User or an extended class. We
> should not have two User objects. *@UUF team*, what are you thoughts on
> this?
>
> +1
>
>
>
> #2. The reason is to have a balance between Nashorn js code and Java code.
> If we eliminate this client service class, then we have to move the code to
> Nashorn js. So, this does not result in less code. Having a client class is
> preferable since Java execution is faster and developers are more familiar
> with that.
>
> From UUF perspective, agreed. We should have part of the logic in java
> side (although I don't think execution time should be a key factor in
> deciding that, unless it's a computation heavy algorithm, eg a sort). But
> concern here has nothing to do with UUF vs Java. Danushka perfectly pointed
> it out, giving an excellent reference. It is boilerplate code that doesn't
> do any actual logic, just call someone else.
>

It is not some boilerplate code. It does have its own logic. :-)


>
>
> PS:
> I have added following to the UUF best practices doc
>
> Keep code in Java side, if
>
>- It talks to the database
>- It touches the file system
>- Computation heavy
>- Needs multi threading to work
>
>
+1. This does not mean we are limited by these though. When you have
complex logic I would rather do it in Java than JS. Especially for IS
portals, we are following 90/10 rule where 90% of the code is executed in
the back-end. So, there's a lot of logic involved in the backend.


>-
>
>
> On Tue, Jan 31, 2017 at 7:40 PM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
> Hi Manu,
>
> #1. Because UUF's #createSession function expects an instance
> of org.wso2.carbon.uuf.spi.auth.User not org.wso2.carbon.identity.mgt.User
> .
>
> But, this is actually an improvement that we need to do. UUF should
> either use org.wso2.carbon.identity.mgt.User or an extended class. We
> should not have two User objects. *@UUF team*, what are you thoughts on
> this?
>
>
> #2. The reason is to have a balance between Nashorn js code and Java code.
> If we eliminate this client service class, then we have to move the code to
> Nashorn js. So, this does not result in less code. Having a client class is
> preferable since Java execution is faster and developers are more familiar
> with that.
>
> On Tue, Jan 31, 2017 at 8:31 PM, Danushka Fernando <danush...@wso2.com>
> wrote:
>
> I guess the idea was to write an api layer for web app which will call
> backend services and get all the data and do all the processing and return
> data sets that can directly be used in the frond end / UUF application. If
> there are no security reasons, +1 to remove the Middle man.
>
> [1] https://sourcemaking.com/refactoring/smells/middle-man
>
> Thanks & Regards
> Danushka Fernando
> Senior Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729 <071%20633%202729>
>
> On Tue, Jan 31, 2017 at 8:14 PM, Manuranga Perera <m...@wso2.com> wrote:
>
>
> -- Forwarded message --
> From: *Manuranga Perera* <m...@wso2.com>
> Date: Tue, Jan 31, 2017 at 2:44 PM
> Subject: Why re-write User class? Why re-wrap RealmService?
> To: Kasun Gajasinghe <kas...@wso2.com>, Indunil Upeksha Rathnayake <
> indu...@wso2.com>, Danushka Fernando <danush...@wso2.com>, Ayesha
> Dissanayaka <aye...@wso2.com>
> Cc: Kishanthan Thangarajah <kishant...@wso2.com>, Rasika Perera <
> rasi...@wso2.com>, Shariq Muhammed <sha...@wso2.com>, Shan Mahanama <
> sh...@wso2.com>, Sajith Ariyarathna <sajit...@wso2.com>
>
>
> 1) Why have we written org.wso2.is.portal.user.client.api.bean.UUFUser
> instead of just reusing org.wso2.carbon.identity.mgt.User ?
>
>
> 2) Even better, is there anything stopping us from directly calling
> RealmService OSGi service from the UUF js (eg: for list users) instead
> going through IdentityStoreClientServiceImpl wrapper.
>
> Less code the better.
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>
>
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>

Re: [Dev] WSO2 Enterprise Integrator 6.0.0 Milestone 2 Released !

2017-01-31 Thread KasunG Gajasinghe
Hi Malith,

Have we prepared the vision docs for EI? Since this is a new product
created by merging multiple products together, I'd like to know how we are
positioning this.

Also, please provide the link to the documentation.

Thanks,
KasunG


On Tue, Jan 31, 2017 at 10:34 PM, Malith Munasinghe 
wrote:

> Hi All,
>
> The WSO2 Integration team is pleased to announce the 2nd Milestone release
> of WSO2 Enterprise Integrator (EI)  6.0.0.
>
> Source & binary distribution files of WSO2 Enterprise Integrator 6.0.0
>
> Distribution :  https://github.com/wso2/product-ei/releases/tag/v6.0.
> 0-m2
> Known Issues : https://github.com/wso2/product-ei/issues
>
> Thanks
> ~Integration Team~
> --
> Malith Munasinghe | Software Engineer
> M: +94 (71) 9401122 <+94%2071%20940%201122>
> E: mali...@wso2.com
> W: http://wso2.com
> 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fwd: Why re-write User class? Why re-wrap RealmService?

2017-01-31 Thread KasunG Gajasinghe
Hi Manu,

#1. Because UUF's #createSession function expects an instance
of org.wso2.carbon.uuf.spi.auth.User not org.wso2.carbon.identity.mgt.User.

But, this is actually an improvement that we need to do. UUF should either
use org.wso2.carbon.identity.mgt.User or an extended class. We should not
have two User objects. *@UUF team*, what are you thoughts on this?


#2. The reason is to have a balance between Nashorn js code and Java code.
If we eliminate this client service class, then we have to move the code to
Nashorn js. So, this does not result in less code. Having a client class is
preferable since Java execution is faster and developers are more familiar
with that.

On Tue, Jan 31, 2017 at 8:31 PM, Danushka Fernando 
wrote:

> I guess the idea was to write an api layer for web app which will call
> backend services and get all the data and do all the processing and return
> data sets that can directly be used in the frond end / UUF application. If
> there are no security reasons, +1 to remove the Middle man.
>
> [1] https://sourcemaking.com/refactoring/smells/middle-man
>
> Thanks & Regards
> Danushka Fernando
> Senior Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729 <071%20633%202729>
>
> On Tue, Jan 31, 2017 at 8:14 PM, Manuranga Perera  wrote:
>
>>
>> -- Forwarded message --
>> From: Manuranga Perera 
>> Date: Tue, Jan 31, 2017 at 2:44 PM
>> Subject: Why re-write User class? Why re-wrap RealmService?
>> To: Kasun Gajasinghe , Indunil Upeksha Rathnayake <
>> indu...@wso2.com>, Danushka Fernando , Ayesha
>> Dissanayaka 
>> Cc: Kishanthan Thangarajah , Rasika Perera <
>> rasi...@wso2.com>, Shariq Muhammed , Shan Mahanama <
>> sh...@wso2.com>, Sajith Ariyarathna 
>>
>>
>> 1) Why have we written org.wso2.is.portal.user.client.api.bean.UUFUser
>> instead of just reusing org.wso2.carbon.identity.mgt.User ?
>>
>>
>> 2) Even better, is there anything stopping us from directly calling
>> RealmService OSGi service from the UUF js (eg: for list users) instead
>> going through IdentityStoreClientServiceImpl wrapper.
>>
>> Less code the better.
>>
>> --
>> With regards,
>> *Manu*ranga Perera.
>>
>> phone : 071 7 70 20 50
>> mail : m...@wso2.com
>>
>>
>>
>> --
>> With regards,
>> *Manu*ranga Perera.
>>
>> phone : 071 7 70 20 50
>> mail : m...@wso2.com
>>
>> ___
>> 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
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] carbon-business-process build failure (was: [Builder] Build failed in Jenkins: carbon-business-process #2420)

2017-01-31 Thread KasunG Gajasinghe
This is not added to the settings.xml. Available ones are github-scm,
scm-server, my-scm-server.

On Tue, Jan 31, 2017 at 12:51 PM, Vinod Kavinda <vi...@wso2.com> wrote:

> Hi KasunG,
> I think it is  wso2-scm-server.
>
> /vinod
>
>
> On Tue, Jan 31, 2017 at 12:47 PM, Vinod Kavinda <vi...@wso2.com> wrote:
>
>> [Adding hasitha,Nandika]
>>
>> On Tue, Jan 31, 2017 at 12:43 PM, KasunG Gajasinghe <kas...@wso2.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> The maven-release-plugin which is part of the Jenkins wso2 maven release
>>> plugin has failed to find the credentials.
>>>
>>> These credentials are read from maven settings.xml. There should be a
>>>  entry for the project.scm.id you guys are using. What is the
>>> project.scm.id you are using?
>>>
>>>
>>> On Tue, Jan 31, 2017 at 9:51 AM, Maheshika Goonetilleke <
>>> mahesh...@wso2.com> wrote:
>>>
>>>> Hi Vinod
>>>>
>>>> Just checked the configuration, the credentials (wso2-jenkins-bot) are
>>>> the same given in other jobs as well.
>>>>
>>>> @kasung : please advice.
>>>>
>>>> On Tue, Jan 31, 2017 at 9:34 AM, Vinod Kavinda <vi...@wso2.com> wrote:
>>>>
>>>>> Hi KasunG,
>>>>> The business process build has failed when trying to do a release
>>>>> after a commit. It seems the GitHub credentials are incorrect. Please have
>>>>> a look.
>>>>>
>>>>> Regards,
>>>>> Vinod
>>>>>
>>>>> On Tue, Jan 31, 2017 at 9:22 AM, <cbuil...@wso2.org> wrote:
>>>>>
>>>>>> See <https://wso2.org/jenkins/job/carbon-business-process/2420/c
>>>>>> hanges>
>>>>>>
>>>>>> Changes:
>>>>>>
>>>>>> [suba.11] fixing issues with #447
>>>>>>
>>>>>> --
>>>>>> [...truncated 21671 lines...]
>>>>>> [WARNING] Ignoring unrecognized line: ??
>>>>>> features/unified-endpoint/pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ?? pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ?? release.properties
>>>>>> [WARNING] Ignoring unrecognized line: ?? repoLastDeleteRecord.txt
>>>>>> [WARNING] Ignoring unrecognized line: ??
>>>>>> service-stubs/application-mgt/org.wso2.carbon.application.mg
>>>>>> t.bpel.stub/pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ??
>>>>>> service-stubs/application-mgt/org.wso2.carbon.application.mg
>>>>>> t.humantask.stub/pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ??
>>>>>> service-stubs/application-mgt/pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ??
>>>>>> service-stubs/attachment-mgt/org.wso2.carbon.attachment.mgt.
>>>>>> skeleton/pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ??
>>>>>> service-stubs/attachment-mgt/org.wso2.carbon.attachment.mgt.
>>>>>> stub/pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ??
>>>>>> service-stubs/attachment-mgt/pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/bpel/
>>>>>> org.wso2.carbon.bpel.analytics.publisher.
>>>>>> skeleton/pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/bpel/
>>>>>> org.wso2.carbon.bpel.analytics.publisher.stub/pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/bpel/
>>>>>> org.wso2.carbon.bpel.skeleton/pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/bpel/
>>>>>> org.wso2.carbon.bpel.stub/pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ??
>>>>>> service-stubs/bpel/pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/bpmn/
>>>>>> org.wso2.carbon.bpmn.stub/pom.xml.releaseBackup
>>>>>> [WARNING] Ignoring unrecognized line: ??
>>>>>> service-stubs/bpmn/pom.xml.releaseBackup
>>>>&

[Dev] carbon-business-process build failure (was: [Builder] Build failed in Jenkins: carbon-business-process #2420)

2017-01-30 Thread KasunG Gajasinghe
Hi all,

The maven-release-plugin which is part of the Jenkins wso2 maven release
plugin has failed to find the credentials.

These credentials are read from maven settings.xml. There should be a
 entry for the project.scm.id you guys are using. What is the
project.scm.id you are using?


On Tue, Jan 31, 2017 at 9:51 AM, Maheshika Goonetilleke 
wrote:

> Hi Vinod
>
> Just checked the configuration, the credentials (wso2-jenkins-bot) are the
> same given in other jobs as well.
>
> @kasung : please advice.
>
> On Tue, Jan 31, 2017 at 9:34 AM, Vinod Kavinda  wrote:
>
>> Hi KasunG,
>> The business process build has failed when trying to do a release after a
>> commit. It seems the GitHub credentials are incorrect. Please have a look.
>>
>> Regards,
>> Vinod
>>
>> On Tue, Jan 31, 2017 at 9:22 AM,  wrote:
>>
>>> See 
>>>
>>> Changes:
>>>
>>> [suba.11] fixing issues with #447
>>>
>>> --
>>> [...truncated 21671 lines...]
>>> [WARNING] Ignoring unrecognized line: ?? features/unified-endpoint/pom.
>>> xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? release.properties
>>> [WARNING] Ignoring unrecognized line: ?? repoLastDeleteRecord.txt
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/application-mgt/
>>> org.wso2.carbon.application.mgt.bpel.stub/pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/application-mgt/
>>> org.wso2.carbon.application.mgt.humantask.stub/pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/application-mgt/
>>> pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/attachment-mgt/o
>>> rg.wso2.carbon.attachment.mgt.skeleton/pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/attachment-mgt/o
>>> rg.wso2.carbon.attachment.mgt.stub/pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/attachment-mgt/p
>>> om.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/bpel/org.wso2.ca
>>> rbon.bpel.analytics.publisher.skeleton/pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/bpel/org.wso2.ca
>>> rbon.bpel.analytics.publisher.stub/pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/bpel/org.wso2.ca
>>> rbon.bpel.skeleton/pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/bpel/org.wso2.ca
>>> rbon.bpel.stub/pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/bpel/pom.xml.rel
>>> easeBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/bpmn/org.wso2.ca
>>> rbon.bpmn.stub/pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/bpmn/pom.xml.rel
>>> easeBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/humantask/org.ws
>>> o2.carbon.humantask.skeleton/pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/humantask/org.ws
>>> o2.carbon.humantask.stub/pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/humantask/pom.xm
>>> l.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/unified-endpoint
>>> /org.wso2.carbon.unifiedendpoint.stub/pom.xml.releaseBackup
>>> [WARNING] Ignoring unrecognized line: ?? service-stubs/unified-endpoint
>>> /pom.xml.releaseBackup
>>> [INFO] Executing: /bin/sh -c cd >> carbon-business-process/ws/> && git commit --verbose -F
>>> /tmp/maven-scm-614765158.commit pom.xml service-stubs/attachment-mgt/pom.xml
>>> service-stubs/attachment-mgt/org.wso2.carbon.attachment.mgt.skeleton/pom.xml
>>> service-stubs/attachment-mgt/org.wso2.carbon.attachment.mgt.stub/pom.xml
>>> service-stubs/bpel/pom.xml 
>>> service-stubs/bpel/org.wso2.carbon.bpel.skeleton/pom.xml
>>> service-stubs/bpel/org.wso2.carbon.bpel.stub/pom.xml service-stubs/bpel/
>>> org.wso2.carbon.bpel.analytics.publisher.skeleton/pom.xml
>>> service-stubs/bpel/org.wso2.carbon.bpel.analytics.publisher.stub/pom.xml
>>> service-stubs/humantask/pom.xml service-stubs/humantask/org.ws
>>> o2.carbon.humantask.skeleton/pom.xml service-stubs/humantask/org.ws
>>> o2.carbon.humantask.stub/pom.xml service-stubs/unified-endpoint/pom.xml
>>> service-stubs/unified-endpoint/org.wso2.carbon.unifiedendpoint.stub/pom.xml
>>> service-stubs/bpmn/pom.xml 
>>> service-stubs/bpmn/org.wso2.carbon.bpmn.stub/pom.xml
>>> service-s
>>>  tubs/application-mgt/pom.xml service-stubs/application-mgt/
>>> org.wso2.carbon.application.mgt.bpel.stub/pom.xml
>>> service-stubs/application-mgt/org.wso2.carbon.application.mgt.humantask.stub/pom.xml
>>> components/application-deployers/pom.xml components/application-deploye
>>> rs/org.wso2.carbon.application.deployer.bpel/pom.xml
>>> 

Re: [Dev] [UUF] User Portal's Localization properties are not working in Safari browser

2017-01-19 Thread KasunG Gajasinghe
Using the Accept-Language header is fine. But if the header is missing,
there should be a fallback mechanism. You should not simply display the
key. For our purposes, we can treat en-US as the fallback language.

On Thu, Jan 19, 2017 at 8:08 PM, Denuwanthi De Silva 
wrote:

> Hi Shan,
>
> Created a git issue  [1].
>
> [1]https://github.com/wso2/carbon-uuf/issues/154
>
> Thanks
>
> On Thu, Jan 19, 2017 at 8:07 PM, Shan Mahanama  wrote:
>
>> Hi Denuwanthi,
>>
>> Value of this headers are different in the two browsers. This might be
>> the cause. We will look into this. Can you create a git issue for this at
>> [1]?
>>
>> [1] https://github.com/wso2/carbon-uuf
>>
>> Thanks,
>> Shan.
>>
>> On Thu, Jan 19, 2017 at 7:44 PM, Denuwanthi De Silva > > wrote:
>>
>>> Hi Shan,
>>>
>>> When check the Accept-Language in safari it shows "en-us" as in the
>>> attached safari.png file.
>>>
>>> When check with firefox it shows "en-US,en;q=0.5" as in the attached
>>> firefox.png file.
>>>
>>>
>>>
>>> Thanks,
>>>
>>> On Thu, Jan 19, 2017 at 7:17 PM, Shan Mahanama  wrote:
>>>
 Hi Denuwanthi,

 We check the *Accept-Language* header value in the request to identify
 the locale. Can you check on Safari whether this header is added correctly
 and it's value is correct? It is possible that in Safari browser, this
 header is set to some other locale which does not have a properties file.

 Thanks,
 Shan.

 On Thu, Jan 19, 2017 at 5:09 PM, Denuwanthi De Silva <
 denuwan...@wso2.com> wrote:

> Hi,
>
> The values we have set from en_US.properties file in 'lang' folder,
> does not get properly populated when go through the safari browser.
> Instead of showing the value it shows the key as shown in the atatched
> image
>
> Is this a known issue in UUF or do we have a way to prevent this from
> happening?
>
> Thanks,
>
> --
> Denuwanthi De Silva
> Senior Software Engineer;
> WSO2 Inc.; http://wso2.com,
> Email: denuwan...@wso2.com
> Blog: https://denuwanthi.wordpress.com/
>



 --
 Shan Mahanama

 Software Engineer, WSO2 Inc. http://wso2.com
 
 Email: sh...@wso2.com
 Mobile: +94 71 2000 498



>>>
>>>
>>> --
>>> Denuwanthi De Silva
>>> Senior Software Engineer;
>>> WSO2 Inc.; http://wso2.com,
>>> Email: denuwan...@wso2.com
>>> Blog: https://denuwanthi.wordpress.com/
>>>
>>
>>
>>
>> --
>> Shan Mahanama
>>
>> Software Engineer, WSO2 Inc. http://wso2.com
>> 
>> Email: sh...@wso2.com
>> Mobile: +94 71 2000 498
>>
>>
>>
>
>
> --
> Denuwanthi De Silva
> Senior Software Engineer;
> WSO2 Inc.; http://wso2.com,
> Email: denuwan...@wso2.com
> Blog: https://denuwanthi.wordpress.com/
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS 6.0.0] [User Portal] Challenge Questions in Self sign-up page of user portal

2017-01-18 Thread KasunG Gajasinghe
Security questions are a thing of the past. Google, Facebook they all have
removed the security questions based password recovery mechanisms. [1] [2]
 So, +1 to drop this support in IS 6.

[1]
http://googlesystem.blogspot.com/2014/12/google-drops-support-for-security.html
[2] https://www.facebook.com/help/community/question/?id=815382261879187

On Wed, Jan 18, 2017 at 5:37 PM, Nuwan Dias  wrote:

>
>
> On Wed, Jan 18, 2017 at 5:10 PM, Indunil Upeksha Rathnayake <
> indu...@wso2.com> wrote:
>
>> Hi,
>>
>> Currently we are working on implementing C5 user portal in IS. Appreciate
>> your suggestions/ideas for the following concerns regarding challenge
>> questions.
>>
>> *1)  Is it necessary to include challenge questions in IS 6.0.0 as a
>> recovery option?*
>> Seems like secret questions are neither secure nor reliable enough to be
>> used as a account recovery mechanism. And also most of the vendors has
>> completely removed support for security questions including google. In C5,
>> security question sets will be some what strengthen the recovery and makes
>> it hard to guess the questions. But seems like need to consider whether it
>> need to be implemented or not.
>>
>
> I personally have never used a security question to recover any of the
> accounts of which I forgot passwords. Its always a recovery through email
> or mobile. Therefore I don't see this as a valuable feature.
>
>>
>> *2)  Is it necessary to include security questions in user self sign-up
>> page? If needed, following way is appropriate?*
>> As we have planned, in C5, admin can create several security question
>> sets and can configure the minimum number of questions that need to be
>> answered by a user. So that in self sign up UI when populating security
>> questions to a user,
>>
>>- security questions need to be categorized according to the security
>>question sets
>>- all the sets need to be populated for the user
>>- user can select any number of security questions from different
>>sets not from a same set
>>- need to validate whether the user has answered for the minimum
>>number of questions
>>
>> When an answer to a question is personal, the question itself is probably
> personal too. Therefore I don't think an admin can decide on what questions
> to be asked from you. Its unlikely you'll remember an answer to a question
> which is not very relevant to you. If we're doing this (I'm negative on
> implementing the feature itself too :)), I think we should let the user
> decide his own questions and answers.
>
>
>> Appreciate your ideas on this.
>>
>> Thanks and Regards
>> --
>> Indunil Upeksha Rathnayake
>> Software Engineer | WSO2 Inc
>> Emailindu...@wso2.com
>> Mobile   0772182255 <077%20218%202255>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Nuwan Dias
>
> Software Architect - WSO2, Inc. http://wso2.com
> email : nuw...@wso2.com
> Phone : +94 777 775 729 <077%20777%205729>
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Merging multiple Jacoco coverages together

2017-01-16 Thread KasunG Gajasinghe
Thanks Niranjan. We can re-use the same! :-)

@Dharshana, per component coverage report is already there. The aggregated
report is in addition to that. The aggregated report will depict the
overall coverage of the repo to understand how much of this repo's code are
covered. Both these are important.

Best regards,
KasunG



On Tue, Jan 17, 2017 at 11:19 AM, Dharshana Warusavitharana <
dharsha...@wso2.com> wrote:

> Hi All,
>
> Considering a component the component should depict a coverage in a single
> coverage report. As our current tests in Kernal it seems we have coverage
> per repo. But for componats we have to consider coverage in component
> separately.
>
> There for we have to consider coverage per component (Unit +OSGI for
> component).
>
> Thank you,
> Dharshana.
>
> On Tue, Jan 17, 2017 at 9:54 AM, Niranjan Karunanandham <niran...@wso2.com
> > wrote:
>
>> Hi KasunG / Dharshana,
>>
>> On Mon, Jan 16, 2017 at 9:34 PM, KasunG Gajasinghe <kas...@wso2.com>
>> wrote:
>>
>>> Hi Dharshana,
>>>
>>> To get a proper understanding of the actual coverage, merging of all the
>>> jacoco coverages is a must. It may be to merge the coverage of unit tests
>>> and osgi tests together. It could also be extended to generate coverage of
>>> tests across repos as well.
>>>
>>
>> As you mentioned in a repo there can be multiple components, each having
>> its units tests and OSGi tests. In kernel, we have combined all the tests
>> (both unit and OSGi) and create a coverage report [1].
>>
>>
>>> For example, we have a repo dependency hierarchy like the following. If
>>> we could get coverage per-repo as well across all the repos, that'll be
>>> beneficial as well.
>>>
>>> carbon-security <-- carbon-identity-mgt <-- product-is
>>>
>>> So, we need to have this capability in our products. Can you provide
>>> your input here on how we can achieve this? A sample config would be great.
>>>
>>
>>> Thanks,
>>> KasunG
>>>
>>> --
>>>
>>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>>> email: kasung AT spamfree wso2.com
>>> linked-in: http://lk.linkedin.com/in/gajasinghe
>>> blog: http://kasunbg.org
>>> phone: +1 650-745-4499 <(650)%20745-4499>, 77 678 0813
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>> [1] - https://github.com/wso2/carbon-kernel/blob/master/tests/
>> coverage-report/pom.xml
>>
>> Regards,
>> Nira
>>
>> --
>>
>>
>> *Niranjan Karunanandham*
>> Associate Technical Lead - WSO2 Inc.
>> WSO2 Inc.: http://www.wso2.com
>>
>>
>
>
> --
>
> Dharshana Warusavitharana
> Associate Technical Lead
> WSO2 Inc. http://wso2.com
> email : dharsha...@wso2.com <dharsha...@wso2.com>
> Tel  : +94 11 214 5345
> Fax :+94 11 2145300 <011%202%20145300>
> cell : +94770342233 <077%20034%202233>
> blog : http://dharshanaw.blogspot.com
>
> lean . enterprise . middleware
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Merging multiple Jacoco coverages together

2017-01-16 Thread KasunG Gajasinghe
Hi Dharshana,

To get a proper understanding of the actual coverage, merging of all the
jacoco coverages is a must. It may be to merge the coverage of unit tests
and osgi tests together. It could also be extended to generate coverage of
tests across repos as well.

For example, we have a repo dependency hierarchy like the following. If we
could get coverage per-repo as well across all the repos, that'll be
beneficial as well.

carbon-security <-- carbon-identity-mgt <-- product-is

So, we need to have this capability in our products. Can you provide your
input here on how we can achieve this? A sample config would be great.

Thanks,
KasunG

-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Show images persisted in a database or in a non-public folder from a uuf app

2017-01-16 Thread KasunG Gajasinghe
Hi Nisala,

How can we secure this API? Do we have to write a MSF4J Interceptor for
that? We can certainly write on, but we are not sure how to access the UUF
session to validate the user.

So, how can we verify whether the current session is authorized or not.

Thanks,
KasunG



On Fri, Jan 13, 2017 at 3:16 PM, Nisala Nanayakkara  wrote:

> HI,
>
> We had a similar requirement like this in dashboard component. Our
> requirement was to read dashboard files that resides in the DB from the
> client-side. For that, we wrote an UI-specific REST API, that will read the
> file from the DB. I think you can use the same strategy to do the $subject.
> UUF can deploy REST apis for a UI component as [1][2].
>
> [1] - https://github.com/wso2/carbon-dashboards/blob/uuf-
> portal/components/org.wso2.carbon.dashboards.view/src/main/component.yaml
> [2] - https://github.com/wso2/carbon-dashboards/blob/uuf-
> portal/components/org.wso2.carbon.dashboards.metadata.
> api/src/main/java/org/wso2/carbon/dashboards/metadata/
> api/MetadataProviderAPI.java
>
>
> Thanks,
> Nisala
>
> On Fri, Jan 13, 2017 at 2:49 PM, Thanuja Jayasinghe 
> wrote:
>
>> Hi Sajith,
>>
>> For the user portal feature in IS 6.0.0, we have a requirement to show
>> user image in the app. These images are currently persisted inside a
>> database. So we need a way to provide image URL for those.
>>
>> I have created the issue [1] to track this.
>>
>> [1] - https://github.com/wso2/carbon-uuf/issues/138
>>
>> Thanks,
>> Thanuja
>> --
>> *Thanuja Lakmal*
>> Senior Software Engineer
>> WSO2 Inc. http://wso2.com/
>> *lean.enterprise.middleware*
>> Mobile: +94715979891 +94758009992
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Nisala Niroshana Nanayakkara,*
> Software Engineer
> Mobile:(+94)717600022
> WSO2 Inc., http://wso2.com/
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS6 M1] LDAP Userstore implementation and documentation

2017-01-14 Thread KasunG Gajasinghe
On Sat, Jan 14, 2017 at 9:29 PM, Ishara Karunarathna <isha...@wso2.com>
wrote:

> Hi Kasun,
>
> On Sat, Jan 14, 2017 at 6:58 PM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>> Hi,
>>
>> Opening this thread to keep track of the LDAP userstore feature that goes
>> into the M1. We are on the final stage of this implementation which is
>> maintained at [1]. @Ishara is working on this.
>>
> Are we going to track all the features via mails ?
> I think all should be tracked with users stories.
>

Yes. User stories and mails serve for two different purposes, isn't it?
This is to have discussions, make sure that everyone is on the same page.



>
>> We need to get the PR for carbon-jndi merged [2] since the current JNDI
>> impl does not load JNDI provides coming from the JRE.
>>
>> @Samuel, please note on docs.
>>
>> [1] https://github.com/wso2-extensions/carbon-security-user-store-ldap
>> [2] https://github.com/wso2/carbon-jndi/pull/32
>>
>> --
>>
>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>> email: kasung AT spamfree wso2.com
>> linked-in: http://lk.linkedin.com/in/gajasinghe
>> blog: http://kasunbg.org
>> phone: +1 650-745-4499 <(650)%20745-4499>, 77 678 0813
>>
>>
>
>
>
> --
> Ishara Karunarathna
> Associate Technical Lead
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> email: isha...@wso2.com,   blog: isharaaruna.blogspot.com,   mobile:
> +94717996791 <071%20799%206791>
>
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [devicemgt-plugins] Nexus: Promotion Completed

2017-01-14 Thread KasunG Gajasinghe
Hi Rasika,

Why don't we setup Continuous Delivery for this repo? :-)

Thanks.

On Sat, Jan 14, 2017 at 7:08 PM, Nexus Repository Manager 
wrote:

> Message from: https://maven.wso2.org/nexus/
>
> *Description:*
>
> releasing cdm plugins 1020
>
>
>
> *Deployer properties:*
>
>- "userAgent" = "Apache-Maven/3.0.5 (Java 1.7.0_51; Linux
>3.13.0-24-generic)"
>- "userId" = "rasi...@wso2.com"
>- "ip" = "172.19.1.133"
>
>
> *Details:*
>
> The following artifacts have been promoted to the "Releases" [id=releases]
>  repository
>
> /org/wso2/carbon/devicemgt-plugins/org.wso2.carbon.
> device.mgt.iot.analytics/3.0.6/org.wso2.carbon.device.mgt.
> iot.analytics-3.0.6.zip
> 
> (SHA1: 0acce7efc9c21fc4484b42b11df44a222108172c)
> /org/wso2/carbon/devicemgt-plugins/org.wso2.carbon.
> device.mgt.iot.analytics/3.0.6/org.wso2.carbon.device.mgt.
> iot.analytics-3.0.6.pom
> 
> (SHA1: 6fe7da342a235957fbb6b6144b4838af843b4e38)
> /org/wso2/carbon/devicemgt-plugins/org.wso2.carbon.
> device.mgt.iot.raspberrypi.analytics/3.0.6/org.wso2.carbon.device.mgt.iot.
> raspberrypi.analytics-3.0.6.pom
> 
> (SHA1: 2ca56e779ec00ae262a012bac1f7b9e05a41b5eb)
> /org/wso2/carbon/devicemgt-plugins/org.wso2.carbon.
> device.mgt.iot.raspberrypi.analytics/3.0.6/org.wso2.carbon.device.mgt.iot.
> raspberrypi.analytics-3.0.6.zip
> 
> (SHA1: f22eb1df7fc7147cdaf8cd0eb234bcef04415253)
> /org/wso2/carbon/devicemgt-plugins/mb-extensions/3.0.6/
> mb-extensions-3.0.6.pom
> 
> (SHA1: 53f7dd41a37254d95c1404ac6785116a1dca5711)
> /org/wso2/carbon/devicemgt-plugins/org.wso2.carbon.
> device.mgt.mobile.windows.feature/3.0.6/org.wso2.carbon.
> device.mgt.mobile.windows.feature-3.0.6.zip
> 
> (SHA1: 44d7e619c880fc6fd10612c201921d56698dd753)
> /org/wso2/carbon/devicemgt-plugins/org.wso2.carbon.
> device.mgt.mobile.windows.feature/3.0.6/org.wso2.carbon.
> device.mgt.mobile.windows.feature-3.0.6.pom
> 
> (SHA1: 045391bcad6a0b47a02c75259ec44d4553cb4f5e)
> /org/wso2/carbon/devicemgt-plugins/windows-plugin/3.0.6/
> windows-plugin-3.0.6.pom
> 
> (SHA1: f01c0fc5dc21d0021435fd91ac45c2c9e0f26faf)
> /org/wso2/carbon/devicemgt-plugins/org.wso2.carbon.device.mgt.iot.
> virtualfirealarm.api/3.0.6/org.wso2.carbon.device.mgt.
> iot.virtualfirealarm.api-3.0.6-sources.jar
> 
> (SHA1: d342b5d2c2d3abf9bc8df07ac16ce3cad552dd00)
> /org/wso2/carbon/devicemgt-plugins/org.wso2.carbon.device.mgt.iot.
> virtualfirealarm.api/3.0.6/org.wso2.carbon.device.mgt.
> iot.virtualfirealarm.api-3.0.6-javadoc.jar
> 
> (SHA1: dd44f059fd99bee41dbfb4cba432af43c222b359)
> /org/wso2/carbon/devicemgt-plugins/org.wso2.carbon.device.mgt.iot.
> virtualfirealarm.api/3.0.6/org.wso2.carbon.device.mgt.
> iot.virtualfirealarm.api-3.0.6.pom
> 
> (SHA1: 76282ae3f8aa28e51d75d45e808a4e2119884ce2)
> 

[Dev] [IS6 M1] LDAP Userstore implementation and documentation

2017-01-14 Thread KasunG Gajasinghe
Hi,

Opening this thread to keep track of the LDAP userstore feature that goes
into the M1. We are on the final stage of this implementation which is
maintained at [1]. @Ishara is working on this.

We need to get the PR for carbon-jndi merged [2] since the current JNDI
impl does not load JNDI provides coming from the JRE.

@Samuel, please note on docs.

[1] https://github.com/wso2-extensions/carbon-security-user-store-ldap
[2] https://github.com/wso2/carbon-jndi/pull/32

-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Random scrolling when clicking on Profile -> Default/Employee links

2017-01-12 Thread KasunG Gajasinghe
Hi Minoli,

The HTML pages scrolls randomly when clicking on sub-items in the tab-view
in IS 6 User Portal. As you mentioned, there are some changes required from
styling side to fix this.

Can we get a rough date on when this will be available? Please note that we
a week away from the M1.

Thanks,
KasunG

-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Print UUF Application URLs in server startup logs

2017-01-12 Thread KasunG Gajasinghe
On Fri, Jan 13, 2017 at 10:14 AM, Kishanthan Thangarajah <
kishant...@wso2.com> wrote:

> https://github.com/wso2/carbon-uuf/issues/136 :)
>
>
+1. :)


> On Fri, Jan 13, 2017 at 10:12 AM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>>
>> Thanks Kishanthan. Where can I raise a ticket for this?
>>
>> On Fri, Jan 13, 2017 at 7:17 AM, Kishanthan Thangarajah <
>> kishant...@wso2.com> wrote:
>>
>>> +1 for this suggestion. Yes, we get the app context(s) during server
>>> startup and uuf-core could log the context or the URL when starting up.
>>>
>>> On Fri, Jan 13, 2017 at 1:01 AM, KasunG Gajasinghe <kas...@wso2.com>
>>> wrote:
>>>
>>>> Hi Kishanthan/Sajith,
>>>>
>>>> Since the applications are lazily deployed, there is no sign of UUF
>>>> applications available in the system in the server startup logs. But, I
>>>> believe the UUF deployer receives the apps during startup. Therefore, can
>>>> we do $subject?
>>>>
>>>> Thanks,
>>>> KasunG
>>>>
>>>> --
>>>>
>>>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>>>> email: kasung AT spamfree wso2.com
>>>> linked-in: http://lk.linkedin.com/in/gajasinghe
>>>> blog: http://kasunbg.org
>>>> phone: +1 650-745-4499 <(650)%20745-4499>, 77 678 0813
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> *Kishanthan Thangarajah*
>>> Technical Lead,
>>> Platform Technologies Team,
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>>
>>> Mobile - +94773426635 <+94%2077%20342%206635>
>>> Blog - *http://kishanthan.wordpress.com
>>> <http://kishanthan.wordpress.com>*
>>> Twitter - *http://twitter.com/kishanthan
>>> <http://twitter.com/kishanthan>*
>>>
>>
>>
>>
>> --
>>
>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>> email: kasung AT spamfree wso2.com
>> linked-in: http://lk.linkedin.com/in/gajasinghe
>> blog: http://kasunbg.org
>> phone: +1 650-745-4499 <(650)%20745-4499>, 77 678 0813
>>
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635 <077%20342%206635>
> Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
> Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Print UUF Application URLs in server startup logs

2017-01-12 Thread KasunG Gajasinghe
Thanks Kishanthan. Where can I raise a ticket for this?

On Fri, Jan 13, 2017 at 7:17 AM, Kishanthan Thangarajah <kishant...@wso2.com
> wrote:

> +1 for this suggestion. Yes, we get the app context(s) during server
> startup and uuf-core could log the context or the URL when starting up.
>
> On Fri, Jan 13, 2017 at 1:01 AM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>> Hi Kishanthan/Sajith,
>>
>> Since the applications are lazily deployed, there is no sign of UUF
>> applications available in the system in the server startup logs. But, I
>> believe the UUF deployer receives the apps during startup. Therefore, can
>> we do $subject?
>>
>> Thanks,
>> KasunG
>>
>> --
>>
>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>> email: kasung AT spamfree wso2.com
>> linked-in: http://lk.linkedin.com/in/gajasinghe
>> blog: http://kasunbg.org
>> phone: +1 650-745-4499 <(650)%20745-4499>, 77 678 0813
>>
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635 <+94%2077%20342%206635>
> Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
> Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Print UUF Application URLs in server startup logs

2017-01-12 Thread KasunG Gajasinghe
Hi Kishanthan/Sajith,

Since the applications are lazily deployed, there is no sign of UUF
applications available in the system in the server startup logs. But, I
believe the UUF deployer receives the apps during startup. Therefore, can
we do $subject?

Thanks,
KasunG

-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [UUF] Document onRequest() method in the UUF developer's guide

2017-01-12 Thread KasunG Gajasinghe
On Thu, Jan 12, 2017 at 11:39 PM, Manuranga Perera <m...@wso2.com> wrote:

> @UUF team
>
> It's OK to provide a POST in theory, but we have to see what they are
> going to do with it. I think they are trying to do a self accepting page.
> In Jaggery is was very hard to unsaturated the code when same code is
> responsible for showing and adding (let say a new user).
>

Yes. This was done not just in Jaggery, some of our Mgt console JSP UI
pages also have this incorrect behavior. In Java, use of Servlets for
handling POSTs is quite clear. But, how it should be handled in a framework
like UUF? (Or Jaggery for that matter?)


> Let's not repeat that error.
>
> And it's a very common use cause to show whet you just added.
>
> So UUF, Please don't just impalement the feature, think about the full use
> case and give a sample (eg: should they use ajax to submit button?, should
> it go to the same page or different page, if error occurred on POST where
> is that viewed? maybe ask UX?)
>
> Let's give a sample on "how to do a form in UUF". Let's have a chat if
> needed.
>
>
On, how to do a form in UUF. Currently, this is how we are handling it  --

$ cat sample.js
function onRequest(env) {
if (env.request.method == "POST" &&
env.request.formParams["formId"]="myform")
{
// do stuff related to myform
}

if (env.request.method == "GET") {
// do stuff for GET
}
}


>
> On Wed, Jan 11, 2017 at 3:42 PM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>> Hi Sajith,
>>
>> +1. Having one single method like #onRequest to handle both GET and POST
>> is considered a bad practice as per HTTP specification since these HTTP
>> methods serve different purposes entirely.
>>
>> In Servlets, we have #doGet and #doPost to handle GET and POST requests
>> separately. Something to think about, since we cannot easily change the API
>> once the GA is out!
>>
>> Thanks.
>>
>>
>> On Wed, Jan 11, 2017 at 6:15 PM, Sagara Gunathunga <sag...@wso2.com>
>> wrote:
>>
>>>
>>> Shouldn't we add and maintain this doc in UUF Github repo itself ?
>>>
>>> Thanks !
>>>
>>> On Wed, Jan 11, 2017 at 5:59 PM, SajithAR Ariyarathna <sajit...@wso2.com
>>> > wrote:
>>>
>>>> [+ShanM]
>>>>
>>>> On Wed, Jan 11, 2017 at 5:54 PM, Indunil Upeksha Rathnayake <
>>>> indu...@wso2.com> wrote:
>>>>
>>>>> Hi UUF team,
>>>>>
>>>>> I think it's better to give some description about the "onRequest()"
>>>>> method and how it works in [1], since for a beginner, it might be somewhat
>>>>> difficult to understand.
>>>>>
>>>>> [1] https://docs.google.com/document/d/10UDdArHV1eYEfiONu8saqPnn
>>>>> JyUjH3vxOrv0k0rK5hc/edit
>>>>>
>>>>> Thanks and Regards
>>>>> --
>>>>> Indunil Upeksha Rathnayake
>>>>> Software Engineer | WSO2 Inc
>>>>> Emailindu...@wso2.com
>>>>> Mobile   0772182255 <077%20218%202255>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sajith Janaprasad Ariyarathna
>>>> Software Engineer; WSO2, Inc.;  http://wso2.com/
>>>> <https://wso2.com/signature>
>>>>
>>>> ___
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> Sagara Gunathunga
>>>
>>> Associate Director / Architect; WSO2, Inc.;  http://wso2.com
>>> V.P Apache Web Services;http://ws.apache.org/
>>> Linkedin; http://www.linkedin.com/in/ssagara
>>> Blog ;  http://ssagara.blogspot.com
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>> email: kasung AT spamfree wso2.com
>> linked-in: http://lk.linkedin.com/in/gajasinghe
>> blog: http://kasunbg.org
>> phone: +1 650-745-4499 <(650)%20745-4499>, 77 678 0813
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> With regards,
> *Manu*ranga Perera.
>
> phone : 071 7 70 20 50
> mail : m...@wso2.com
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499 <+1%20650-745-4499>, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [UUF] Document onRequest() method in the UUF developer's guide

2017-01-11 Thread KasunG Gajasinghe
Hi Sajith,

+1. Having one single method like #onRequest to handle both GET and POST is
considered a bad practice as per HTTP specification since these HTTP
methods serve different purposes entirely.

In Servlets, we have #doGet and #doPost to handle GET and POST requests
separately. Something to think about, since we cannot easily change the API
once the GA is out!

Thanks.


On Wed, Jan 11, 2017 at 6:15 PM, Sagara Gunathunga  wrote:

>
> Shouldn't we add and maintain this doc in UUF Github repo itself ?
>
> Thanks !
>
> On Wed, Jan 11, 2017 at 5:59 PM, SajithAR Ariyarathna 
> wrote:
>
>> [+ShanM]
>>
>> On Wed, Jan 11, 2017 at 5:54 PM, Indunil Upeksha Rathnayake <
>> indu...@wso2.com> wrote:
>>
>>> Hi UUF team,
>>>
>>> I think it's better to give some description about the "onRequest()"
>>> method and how it works in [1], since for a beginner, it might be somewhat
>>> difficult to understand.
>>>
>>> [1] https://docs.google.com/document/d/10UDdArHV1eYEfiONu8saqPnn
>>> JyUjH3vxOrv0k0rK5hc/edit
>>>
>>> Thanks and Regards
>>> --
>>> Indunil Upeksha Rathnayake
>>> Software Engineer | WSO2 Inc
>>> Emailindu...@wso2.com
>>> Mobile   0772182255 <077%20218%202255>
>>>
>>
>>
>>
>> --
>> Sajith Janaprasad Ariyarathna
>> Software Engineer; WSO2, Inc.;  http://wso2.com/
>> 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Sagara Gunathunga
>
> Associate Director / Architect; WSO2, Inc.;  http://wso2.com
> V.P Apache Web Services;http://ws.apache.org/
> Linkedin; http://www.linkedin.com/in/ssagara
> Blog ;  http://ssagara.blogspot.com
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Clarification on invoking particular fragment in UUF

2017-01-11 Thread KasunG Gajasinghe
Hi Shan/Sajith,

On Wed, Jan 11, 2017 at 12:57 PM, Shan Mahanama <sh...@wso2.com> wrote:

> Hi all,
>
> We can solve this by adding a hidden field to each form.
>
> 
>
> Then inside of the onRequest function, we can check the value of the
> hidden field.
>
> if (env.request.method == "POST" && env.request.formParams["tabId"]="tab1") {
>
> // do stuff related to tab1
>
> }
>
>
As discussed separately, any page that has more than one html form will
face this problem. And, to be in the safe side, we'll be forced to add this
hidden field to all the forms. Having to do this in all the #onRequests is
not a good work-around. :-(

In Java world, this is handled by having servlets for each form since that
is how the forms are usually processed. So, the action attribute has the
servlet's url. After processing, the servlet forwards (note: not redirect!)
you to a jsp page.

Can we support something similar to jsp forwards in UUF? This may mean we
could directly invoke a JS content. I see that we already have
#sendRedirect method which is analogous to jsp redirect. The missing piece
is the forward.


If a fragment is used only in one place, that means that fragment is not
> reused. So you can remove the fragment and add the fragment content
> directly into the page. Our recommendation is, not to create a fragment
> until the code is reused somewhere else.
>
>
This could occur if one page has two forms as well.

Thanks,
KasunG



> Thanks,
> Shan.
>
> On Wed, Jan 11, 2017 at 11:44 AM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>> +Dev
>>
>> On Wed, Jan 11, 2017 at 12:49 AM, Denuwanthi De Silva <
>> denuwan...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> During user-portal implementations for IS, I can see that the POST
>>> methods of all fragments get invoked if you do a POST only in one fragment.
>>>
>>> Ex:
>>> we have base account-settings page.
>>> It has several tabs/menu like "profiles", "password"
>>> We define fragment for each tab inside account-setting.hbs
>>>
>>> But when we go inside one tab and do a Submit (POST) it invokes the POST
>>> methods inside ''onReuest" methods of each fragment.
>>>
>>> Is there a way we can make only needed fragment is invoked when it is
>>> selected?
>>>
>>> Ex: provide an env.param for each fragment
>>>
>>> {{fragment "org.wso2.carbon.iam.user-portal.feature.profile" 
>>> envParam="profile"}}
>>>
>>> and and and AND statement like
>>>
>>> if (env.request.method == "POST" && env.params.envParam="profile") {
>>>
>>>
>>> Then, only the desired fragment will be invoked.
>>>
>>> Can anyone shed some light on this matter as it is affecting the update
>>> password flow due to and update calim happening inside profile.js
>>>
>>>
>>> Thanks
>>>
>>> --
>>> Denuwanthi De Silva
>>> Senior Software Engineer;
>>> WSO2 Inc.; http://wso2.com,
>>> Email: denuwan...@wso2.com
>>> Blog: https://denuwanthi.wordpress.com/
>>>
>>
>>
>>
>> --
>>
>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>> email: kasung AT spamfree wso2.com
>> linked-in: http://lk.linkedin.com/in/gajasinghe
>> blog: http://kasunbg.org
>> phone: +1 650-745-4499 <(650)%20745-4499>, 77 678 0813
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Shan Mahanama
>
> Software Engineer, WSO2 Inc. http://wso2.com
> <http://l.facebook.com/l.php?u=http%3A%2F%2Fwso2.com=gAQEswASa>
> Email: sh...@wso2.com
> Mobile: +94 71 2000 498
>
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499 <+1%20650-745-4499>, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Clarification on invoking particular fragment in UUF

2017-01-10 Thread KasunG Gajasinghe
+Dev

On Wed, Jan 11, 2017 at 12:49 AM, Denuwanthi De Silva 
wrote:

> Hi,
>
> During user-portal implementations for IS, I can see that the POST methods
> of all fragments get invoked if you do a POST only in one fragment.
>
> Ex:
> we have base account-settings page.
> It has several tabs/menu like "profiles", "password"
> We define fragment for each tab inside account-setting.hbs
>
> But when we go inside one tab and do a Submit (POST) it invokes the POST
> methods inside ''onReuest" methods of each fragment.
>
> Is there a way we can make only needed fragment is invoked when it is
> selected?
>
> Ex: provide an env.param for each fragment
>
> {{fragment "org.wso2.carbon.iam.user-portal.feature.profile" 
> envParam="profile"}}
>
> and and and AND statement like
>
> if (env.request.method == "POST" && env.params.envParam="profile") {
>
>
> Then, only the desired fragment will be invoked.
>
> Can anyone shed some light on this matter as it is affecting the update
> password flow due to and update calim happening inside profile.js
>
>
> Thanks
>
> --
> Denuwanthi De Silva
> Senior Software Engineer;
> WSO2 Inc.; http://wso2.com,
> Email: denuwan...@wso2.com
> Blog: https://denuwanthi.wordpress.com/
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Issue in carbon-uuf-common feature

2017-01-05 Thread KasunG Gajasinghe
Hi Sajith,

With the latest changes to carbon-uuf repo, we cannot seem to build
product-is. We fixed most of the issues, but we are now getting the
following error.

It seems carbon-uuf-common [1] is not up-to-date with the changes to
carbon-uuf, but I may be wrong. It still has config.yaml but no app.yaml
nor component.yaml. Can you please have a look?

[ERROR] Failed to execute goal
org.wso2.carbon.uuf.maven:carbon-uuf-maven-plugin:1.0.0-m9:create-app
(create) on project org.wso2.carbon.iam.user-portal.feature: Cannot create
final configuration for {org.wso2.carbon.iam.user-portal.feature,
6.0.0-SNAPSHOT}. *Cannot parse 'component.yaml' of
{org.wso2.carbon.uuf.common.foundation, 1.0.0-SNAPSHOT}* which read from
'/Users/kasun/wso2/checkouts/git-repos/product-is/portal/apps/org.wso2.carbon.iam.user-portal.app/target/maven-shared-archive-resources/uufapps/org.wso2.carbon.iam.user-portal/components/foundation/component.yaml'
path. Mandatory configuration file
'/Users/kasun/wso2/checkouts/git-repos/product-is/portal/apps/org.wso2.carbon.iam.user-portal.app/target/maven-shared-archive-resources/uufapps/org.wso2.carbon.iam.user-portal/components/foundation/component.yaml'
does not exists. -> [Help 1]

[1] https://github.com/wso2/carbon-uuf-common

Thanks,
KasunG

-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Any way to know the life-cycle of a tenant on AS?

2016-12-05 Thread KasunG Gajasinghe
org.wso2.carbon.stratos.common.listeners.TenantMgtListener is for tenant
creation/activation/deactivation events.

org.wso2.carbon.utils.AbstractAxis2ConfigurationContextObserver is for
tenant loading/unloading events. I think you are looking for this. See a
sample impl here -

https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.ndatasource.core/src/main/java/org/wso2/carbon/ndatasource/core/DataSourceAxis2ConfigurationContextObserver.java


On Mon, Dec 5, 2016 at 1:41 PM, wenxing zheng 
wrote:

> Thanks to Dilan.
>
> One example is to load/unload some special data of a specific tenant after
> the loading and unloading. I know Carbon supports the caching of tenant
> data, but the housekeeping is run in 15 mins interval by default. It's a
> little late for us.
>
> Regards, Wenxing
>
>
>
> On Mon, Dec 5, 2016 at 3:38 PM, Dilan Udara Ariyaratne 
> wrote:
>
>> Hi Zheng,
>>
>> Tenancy concept [1] is common to any WSO2 product including AS and a core
>> feature facilitated by WSO2 Carbon Kernel [2], the core framework of all
>> WSO2 based Products.
>>
>> Can you elaborate a bit on what kind of customization you are hoping to
>> do on top of the existing life-cycle states for a tenant ?
>>
>> References :
>> [1] https://docs.wso2.com/display/ESB510/Multi+Tenant+Architecture
>> [2] https://docs.wso2.com/display/Carbon4410/Features
>>
>> Thanks,
>> Dilan.
>>
>>
>> *Dilan U. Ariyaratne*
>> Senior Software Engineer
>> WSO2 Inc. 
>> Mobile: +94766405580 <%2B94766405580>
>> lean . enterprise . middleware
>>
>>
>> On Mon, Dec 5, 2016 at 11:48 AM, wenxing zheng 
>> wrote:
>>
>>> Dear all,
>>>
>>> I need to do some customization on following AS tenant states:
>>> 1. loaded
>>> 2. unloaded
>>>
>>> Beside the one mentioned in [1], any other way?
>>>
>>> [1]: http://wso2.markmail.org/search/?q=list%3Aorg.wso2.dev+
>>> tenant+loaded+event#query:list%3Aorg.wso2.dev%20tenant%20loaded%2
>>> 0event+page:9+mid:mla6cls7gsoxnstu+state:results
>>>
>>> Thanks, Wenxing
>>>
>>> ___
>>> 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
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] javax.naming.NameNotFoundException Name [jdbc/WSO2CarbonDB] is not bound in this Context

2016-12-02 Thread KasunG Gajasinghe
Looking up jdbc/WSO2CarbonDB as it is does not work. All the datasources
are registered under the JNDI context java:comp/env. So, if your jndi key
is jdbc/WSO2CarbonDB, then it can be found at java:comp/env /jdbc/WSO2Ca
rbonDB.

This ambiguity is coming from JNDI itself. See [1] for a detailed
explanation if required.

[1] http://stackoverflow.com/a/4099163/388714

On Fri, Dec 2, 2016 at 5:01 PM, wenxing zheng 
wrote:

> Thanks to Manuri. I will have a try later and update here.
>
> On Fri, Dec 2, 2016 at 1:25 PM, Manuri Amaya Perera 
> wrote:
>
>> Hi Wenxing,
>>
>> Did you try prepending "java:comp/env/" to your JNDI name where you use
>> it inside the webapp. (eg: java:comp/env/jdbc/WSO2CarbonDB).
>>
>> Thanks,
>> Manuri
>>
>> On Fri, Dec 2, 2016 at 8:47 AM, wenxing zheng 
>> wrote:
>>
>>> I fixed the issue with a workaround by introducing a
>>> ServletContextListener in order to first create my singleton object:
>>> MasterDataSource.java -> the object will get the DataSource as a shared
>>> object.
>>>
>>> But I am still confused why it didn't work without my workaround.
>>>
>>>
>>> On Thu, Dec 1, 2016 at 6:59 PM, wenxing zheng 
>>> wrote:
>>>
 Please kindly advice how to fix this issue as it blocked our work.

 Note: we are working on AS 5.3.0 and it's a WEB application.

 Thank you very much
 Regards, Wenxing

 On Thu, Dec 1, 2016 at 4:10 PM, wenxing zheng 
 wrote:

> Hello all,
>
> How to make sure the ConfigurationContextService is Active whenever I
> need to access to the DataSource? Is there any way to make it?
>
> Thanks, Wenxing
>
> On Wed, Nov 30, 2016 at 3:11 PM, wenxing zheng <
> wenxing.zh...@gmail.com> wrote:
>
>> Hi Maduranga,
>>
>> In the wso2as-5.3.0\repository\conf\datasources\master-datasources.xml,
>> I do find a jndiConfig item:
>> [image: Inline image 1]
>>
>> Is the problem related with the post [1].
>>
>> [1]: http://wso2.markmail.org/search/?q=list%3Aorg.wso2.dev+
>> failed+to+get+WSO2+data+source%3A+Name+%5Bjdbc%2FWSO2CarbonD
>> B%5D+is+not+bound+in+this+Context#query:list%3Aorg.wso2.dev%
>> 20failed%20to%20get%20WSO2%20data%20source%3A%20Name%20%5Bjd
>> bc%2FWSO2CarbonDB%5D%20is%20not%20bound%20in%20this%20Contex
>> t+page:1+mid:rzmyfyyqvnf4h7w2+state:results
>>
>> Thanks, Wenxing
>>
>> On Wed, Nov 30, 2016 at 1:36 PM, Maduranga Siriwardena <
>> madura...@wso2.com> wrote:
>>
>>> Hi wenxing,
>>>
>>> Have you defined a datasource in any of the xml files in
>>> /repository/conf/datasources folder with jndi name as
>>> jdbc/WSO2CarbonDB like below?
>>>
>>> 
>>>jdbc/WSO2CarbonDB
>>> 
>>>
>>> Thanks,
>>> Maduranga.
>>>
>>> On Wed, Nov 30, 2016 at 9:56 AM, Rajith Roshan 
>>> wrote:
>>>
 Hi,

 Once the server is started (ConfigurationContextService is active)
 you should be able to get the datasources as below. All the jndi 
 configs
 should be bound to context by then.

 Context ctx = new InitialContext();
 dataSource = (DataSource) ctx.lookup(dataSourceName);


 Thanks!

 Rajith


 On Wed, Nov 30, 2016 at 7:22 AM, wenxing zheng <
 wenxing.zh...@gmail.com> wrote:

> Dear all,
>
> I met with an issue in getting the JNDI datasource with the
> callstack below. Appreciated for any hint on this problem:
>
> AS: 5.3.0
> javax.naming.NameNotFoundException: Name [jdbc/WSO2CarbonDB] is
> not bound in this Context. Unable to find [jdbc].
> at org.apache.naming.NamingContex
> t.lookup(NamingContext.java:819)
> at org.apache.naming.NamingContex
> t.lookup(NamingContext.java:167)
> at org.wso2.carbon.tomcat.jndi.Ca
> rbonSelectorContext.lookup(CarbonSelectorContext.java:67)
> at org.wso2.carbon.context.intern
> al.CarbonContextDataHolder$CarbonInitialJNDIContext.lookup(C
> arbonContextDataHolder.java:705)
> at javax.naming.InitialContext.lo
> okup(InitialContext.java:411)
> at test.das.server.dao.common.Mas
> terDataSource.createDataSource(MasterDataSource.java:20)
> at test.das.server.dao.common.Mas
> terDataSource.getDataSource(MasterDataSource.java:30)
> at test.das.server.dao.common.Com
> monDao.getDBConnection(CommonDao.java:21)
> at test.das.server.dao.users.Grou
> pDao.getGroupsByUserID(GroupDao.java:224)
> at test.das.server.usermgt.users.
> 

Re: [Dev] How to clear up the Registry Cache?

2016-11-06 Thread KasunG Gajasinghe
This sounds like a bug. When a tenant is deleted, the cache should be
cleared automatically. You shouldn't have to wait for the periodic cache
cleanup.

My suggestion is to write a TenantMgtListener extension, and add it to the
product. In there, you can add a cache clearing operation for the tenant
pre/post delete method.

On Monday, November 7, 2016, wenxzhen  wrote:

> Dear all,
>
> I am trying to remove a Tenant from the WSO2, but I found the following
> exception after removing a Tenant and then re-create it:
>
> Caused by: java.lang.SecurityException: Illegal access attempt to cache ]
> owned by tenant {[testdomain7],[17]} by tenant {[testdomain7],[18]}
> at org.wso2.carbon.caching.impl.Util.checkAccess(Util.java:46)
> at org.wso2.carbon.caching.impl.CarbonCacheManager.getCache(
> CarbonCacheManager.java:111)
> at org.wso2.carbon.registry.core.utils.RegistryUtils.
> getResourceCache(RegistryUtils.java:297)
> at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.
> getCache(CacheBackedRegistry.java:62)
> at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.
> resourceExists(CacheBackedRegistry.java:289)
> at org.wso2.carbon.registry.core.session.UserRegistry.
> resourceExistsInternal(UserRegistry.java:770)
> at org.wso2.carbon.registry.core.session.UserRegistry.access$
> 800(UserRegistry.java:60)
> at org.wso2.carbon.registry.core.session.UserRegistry$9.run(
> UserRegistry.java:753)
> at org.wso2.carbon.registry.core.session.UserRegistry$9.run(
> UserRegistry.java:750)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.wso2.carbon.registry.core.session.UserRegistry.
> resourceExists(UserRegistry.java:750)
> ... 62 more
>
> My question is how I can remove the related Registry cache of a tenant?
> Thank you very much.
>
> Regards, Wenxing
>
>

-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Nexus] Drop unwanted proxy repositories from WSO2 Nexus

2016-10-19 Thread KasunG Gajasinghe
Hi,

The WSO2 Nexus maven repository has run out of space, so we need to remove
any cruft that does not need to be there. While having a quick look, it
seems we proxy who bunch of external repositories within our nexus. This
just puts unnecessary burden on it.

Initially, following repo [1] which is proxied through [2] seems to be a
big one. If we can get rid of it, we could save some valuable space.

*If you have any objections, please holler ASAP. *Otherwise, we are
thinking to take the repo [2] down. We have to do this soon, probably in
the coming weekend. (All the artifacts you need will still be available via
[1])

[1] http://repository.apache.org/snapshots/
[2] https://maven.wso2.org/nexus/content/repositories/apache-snapshots/

Regards,
KasunG

-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Latency in Deployment Synchronizer

2016-10-12 Thread KasunG Gajasinghe
On Wed, Oct 12, 2016 at 10:51 AM, Fathima Dilhasha 
wrote:

> Hi All,
>
> I had a chat with KasunG and following are the facts I got to know which
> explains the latency I was experiencing.
>
> 1. There is a scheduled task which is running in the DepSync enabled
> manager nodes to commit new artifacts.
> (The *DeploymentUpdateInterval* in carbon.xml defines how often the
> task is run).
>
>  But this task is run only if the tenant is loaded at the specific
> node.
>  When there are new artifacts, the manager node sends a cluster
> message to the other node indicating that there are new artifacts.
>
> 2. To compensate for any lost cluster messages there is a mandatory sync
> mechanism run at each node irrespective of tenant loading.
>  This task is run every 5-10 mins.
>

It is 5-15 mins by default. The max time is configurable. But, this won't
run if the tenant is not loaded.


>
> So, if tenant is not loaded at Node 1 and a file is changed at
> "APIM/repository/tenants//..,
> There is a latency of up to *15mins* until the changes are committed to
> SVN.
>
> @KasunG, Please correct me if I've understood anything wrong.
>
>
This is correct.


> Thanks and Regards,
> Dilhasha
>
>
>
> On Thu, Oct 6, 2016 at 10:15 AM, Fathima Dilhasha 
> wrote:
>
>> Thanks Thilini. I will go through the webinar.
>>
>> On Thu, Oct 6, 2016 at 10:13 AM, Thilini Cooray 
>> wrote:
>>
>>> Hi Fathima,
>>>
>>> The delay in committing to svn can be caused by network latency.
>>> Have you specifically defined a checkout time period in your worker
>>> nodes?
>>>
>>> [1] is the webinar which clearly explains about the Dep-Sync mechanism.
>>>
>>> Hope it will give you an idea about the dep-sync behvior.
>>>
>>> [1] http://wso2.com/library/webinars/2012/10/enterprise-use-
>>> case-webinar-wso2-depsync-data-synchronization-between-nodes-cluster/
>>>
>>> Thanks.
>>>
>>> On Thu, Oct 6, 2016 at 10:02 AM, Fathima Dilhasha 
>>> wrote:
>>>
 I have a cluster with two nodes of WSO2 API Manager 1.10.0 with the
 following configurations for DeploymentSynchronizer.
 (Note that both the nodes are capable of committing.)

  120
 
   
   true
   true
   true
  ...
   

 I had the following observations when changing files at the path
 "APIM/repository/tenants//.."

 When I change a file within a folder in above path at 1 node,
 there is a latency of about 8mins until the change is committed to svn
 repo. (Note that update interval is only 2mins)

 I am not very clear about why there is a latency more than expected?
 Can this be due to added network latency?

 I would appreciate if you can point me to any documentation with
 details about the internals of depSync.

 I have referred to [1]

 [1] https://docs.wso2.com/display/CLUSTER420/Introduction+to
 +Deployment+Synchronizer

 Thanks & Regards,
 Dilhasha

 --
 Fathima Dilhasha
 *Software Engineer*
 Mobile : +94 (0) 771663314 <%2B94%20%280%29%20773655496>
 <%2B94%20%280%29%20773%20451194>
 dilha...@wso2.com 

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


>>>
>>>
>>> --
>>> Best Regards,
>>>
>>> *Thilini Cooray*
>>> Software Engineer
>>> Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20774%20570112>
>>> E-mail : thili...@wso2.com
>>>
>>> WSO2 Inc. www.wso2.com
>>> lean.enterprise.middleware
>>>
>>
>>
>>
>> --
>> Fathima Dilhasha
>> *Software Engineer*
>> Mobile : +94 (0) 771663314 <%2B94%20%280%29%20773655496>
>> <%2B94%20%280%29%20773%20451194>
>> dilha...@wso2.com 
>>
>
>
>
> --
> Fathima Dilhasha
> *Software Engineer*
> Mobile : +94 (0) 771663314 <%2B94%20%280%29%20773655496>
> <%2B94%20%280%29%20773%20451194>
> dilha...@wso2.com 
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499, 77 678 0813
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] About the runtime architecture of WSO2 Application Server

2016-09-13 Thread KasunG Gajasinghe
On Tue, Sep 13, 2016 at 5:51 PM, wenxzhen <zhen...@csdn.net> wrote:

> The CarbonTomcatRealm is good to do the Authentication, sorry to miss that
> the Applications need to create their own Users, Roles and etc. Therefore
> we do need a Service endpoint for User Management or we need to provide a
> common library.
>
>
>
Furthermore, the Client Web applications provides the JSON messages in
> HTTP/HTTPs to AS, How to workaround this requirement?
>


I've used the AuthenticationAdmin with XML. See the following curl request.
I figured out the message format by looking at the 'login' operation of the
WSDL [3].

curl -vk *https://localhost:9443/services/AuthenticationAdmin/login
<https://localhost:9443/services/AuthenticationAdmin/login>* -d
"*adminadmin*"
--header 'Content-Type: application/xml'

User management can be done with UserAdmin service which is mentioned in
the same link I sent before.

[3]
https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.authenticator.proxy/src/main/resources/AuthenticationAdmin.wsdl#L192


>
> Thanks, Wenxing
>
>
>
> *From:* KasunG Gajasinghe [mailto:kas...@wso2.com]
> *Sent:* Tuesday, September 13, 2016 7:59 PM
> *To:* wenxzhen
> *Cc:* Thusitha Thilina Dayaratne; WSO2 Developers' List
>
> *Subject:* Re: [Dev] About the runtime architecture of WSO2 Application
> Server
>
>
>
> Hi wenxzhen,
>
>
>
> User management is one of the strong suites of the WSO2 platform. For web
> applications, a Tomcat realm called CarbonTomcatRealm [1] is provided that
> can authenticate web applications. This transparently works with web.xml
> security-constraints for "container managed security" of Tomcat.
>
>
>
> But if you do require a more flexible way to handle authentication and
> authorization, then you can use the *AuthenticationAdmin* endpoint. This
> is not a REST API though, it is based on SOAP. Checkout the doc [2] for
> more info on this. If you are interested in this route, we can discuss how
> to workaround the SOAP requirements though!
>
>
>
>
>
> [1] https://github.com/wso2/carbon-kernel/blob/4.4.x/core/
> org.wso2.carbon.tomcat.ext/src/main/java/org/wso2/carbon/
> tomcat/ext/realms/CarbonTomcatRealm.java
>
>
>
> [2] https://docs.wso2.com/display/AM170/WSO2+Admin+Services
>
>
>
> Regards,
>
> KasunG
>
>
>
> On Tue, Sep 13, 2016 at 5:09 PM, wenxzhen <zhen...@csdn.net> wrote:
>
> Yes, in some extent, we need to use the SSO but we need more:
>
> 1. We have App1 for CustomerA
>
> 2. We have another App2 for CustomerB
>
> 3. Both App1 and App2 are Web applications running on WSO2 AS,
> and both Apps needs to do the authorization and authentication
>
> 4. What would be the best practice to re-use the codes? I am
> thinking to wrap the User Management into a REST/JSON API, so that both
> App1 and App2 can access and JSON would be much more light weight
>
>
>
> Please kindly advice
>
> Thanks, Wenxing
>
>
>
> *From:* Thusitha Thilina Dayaratne [mailto:thusit...@wso2.com]
> *Sent:* Tuesday, September 13, 2016 7:28 PM
> *To:* wenxzhen
>
>
> *Cc:* WSO2 Developers' List
> *Subject:* Re: [Dev] About the runtime architecture of WSO2 Application
> Server
>
>
>
> Hi Wenxing,
>
>
>
> Can you use the SingleSignOn for your requirment[1]?
>
> [1] - https://docs.wso2.com/display/AS530/Using+SSO+with+Web+Applications
> <https://docs.wso2.com/display/AS530/Using+SSO+with+Web+Applications>
>
>
>
> Thanks
>
>
>
> On Tue, Sep 13, 2016 at 4:25 PM, wenxzhen <zhen...@csdn.net> wrote:
>
> Thanks to Rasika. We are using AS530. From the description of docs[2], it
> seems the Services in Jar file are being executed on the AXIS2 engine,
> therefore it should be in SOAP message.
>
>
>
> As we may have different/multiple SaaS applications, every application
> needs to do the authorization and authentication against the user
> management tables. Does the Carbon or AS by default provides a REST API to
> do the work? Or can we provide a REST/JSON API for the user management to
> simplify the work or reuse the codes? Any potential issue we may meet on
> the way to go?
>
>
>
> Thanks again,
>
> Best, Wenxing
>
>
>
> *From:* Rasika Perera [mailto:rasi...@wso2.com]
> *Sent:* Tuesday, September 13, 2016 6:29 PM
> *To:* 郑文兴
> *Cc:* WSO2 Developers' List
> *Subject:* Re: [Dev] About the runtime architecture of WSO2 Application
> Server
>
>
>
> Hi Wenxing,
>
>
>
> Please refer docs [1] and [2] for Services/Applications deployment. WSO2
> Applications Server deploys the web applications

Re: [Dev] About the runtime architecture of WSO2 Application Server

2016-09-13 Thread KasunG Gajasinghe
Hi wenxzhen,

User management is one of the strong suites of the WSO2 platform. For web
applications, a Tomcat realm called CarbonTomcatRealm [1] is provided that
can authenticate web applications. This transparently works with web.xml
security-constraints for "container managed security" of Tomcat.

But if you do require a more flexible way to handle authentication and
authorization, then you can use the *AuthenticationAdmin* endpoint. This is
not a REST API though, it is based on SOAP. Checkout the doc [2] for more
info on this. If you are interested in this route, we can discuss how to
workaround the SOAP requirements though!


[1]
https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.tomcat.ext/src/main/java/org/wso2/carbon/tomcat/ext/realms/CarbonTomcatRealm.java

[2] https://docs.wso2.com/display/AM170/WSO2+Admin+Services

Regards,
KasunG

On Tue, Sep 13, 2016 at 5:09 PM, wenxzhen  wrote:

> Yes, in some extent, we need to use the SSO but we need more:
>
> 1. We have App1 for CustomerA
>
> 2. We have another App2 for CustomerB
>
> 3. Both App1 and App2 are Web applications running on WSO2 AS,
> and both Apps needs to do the authorization and authentication
>
> 4. What would be the best practice to re-use the codes? I am
> thinking to wrap the User Management into a REST/JSON API, so that both
> App1 and App2 can access and JSON would be much more light weight
>
>
>
> Please kindly advice
>
> Thanks, Wenxing
>
>
>
> *From:* Thusitha Thilina Dayaratne [mailto:thusit...@wso2.com]
> *Sent:* Tuesday, September 13, 2016 7:28 PM
> *To:* wenxzhen
>
> *Cc:* WSO2 Developers' List
> *Subject:* Re: [Dev] About the runtime architecture of WSO2 Application
> Server
>
>
>
> Hi Wenxing,
>
>
>
> Can you use the SingleSignOn for your requirment[1]?
>
> [1] - https://docs.wso2.com/display/AS530/Using+SSO+with+Web+Applications
> 
>
>
>
> Thanks
>
>
>
> On Tue, Sep 13, 2016 at 4:25 PM, wenxzhen  wrote:
>
> Thanks to Rasika. We are using AS530. From the description of docs[2], it
> seems the Services in Jar file are being executed on the AXIS2 engine,
> therefore it should be in SOAP message.
>
>
>
> As we may have different/multiple SaaS applications, every application
> needs to do the authorization and authentication against the user
> management tables. Does the Carbon or AS by default provides a REST API to
> do the work? Or can we provide a REST/JSON API for the user management to
> simplify the work or reuse the codes? Any potential issue we may meet on
> the way to go?
>
>
>
> Thanks again,
>
> Best, Wenxing
>
>
>
> *From:* Rasika Perera [mailto:rasi...@wso2.com]
> *Sent:* Tuesday, September 13, 2016 6:29 PM
> *To:* 郑文兴
> *Cc:* WSO2 Developers' List
> *Subject:* Re: [Dev] About the runtime architecture of WSO2 Application
> Server
>
>
>
> Hi Wenxing,
>
>
>
> Please refer docs [1] and [2] for Services/Applications deployment. WSO2
> Applications Server deploys the web applications on an internal embedded
> Tomcat server. Hence, apps are served through tomcats threads pool.
>
>
>
> You can find more higher level architecture of WSO2 AS on doc link[3].
>
>
>
> Let us know which version you are using If you need further details.
>
>
>
> Thanks,
>
> Rasika
>
>
>
> [1] https://docs.wso2.com/display/AS530/Application+Development+
> and+Deployment
>
> [2] https://docs.wso2.com/display/AS530/Services+
> Development+and+Deployment
>
> [3] https://docs.wso2.com/display/AS530/Architecture
>
>
>
> On Tue, Sep 13, 2016 at 10:57 AM, 郑文兴  wrote:
>
> Dear all,
>
>
>
> During the running of the WSO2 AS, how will the Services/Applications be
> run or scheduled on the Application Server? Are they running on different
> processes or threads?
>
>
>
> Please shed some light and share more details on the architecture.
> Appreciated for your kindly help.
>
>
>
> Best, Wenxing
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
>
> --
>
> With Regards,
>
>
> *Rasika Perera*
> Software Engineer
>
> LinkedIn: http://lk.linkedin.com/in/rasika90
>
> [image: wso2-signature-general.png] 
>
>
>
> WSO2 Inc. www.wso2.com
>
> lean.enterprise.middleware
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
>
> --
>
> Thusitha Dayaratne
>
> Software Engineer
>
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
>
>
> Mobile  +94712756809
>
> Blog  alokayasoya.blogspot.com
>
> Abouthttp://about.me/thusithathilina
>
> 
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT 

Re: [Dev] Why some of the features aren't shown in the Available Feature UI

2016-08-16 Thread KasunG Gajasinghe
This is derived through the "adviceFile" properties of your features.

On Tue, Aug 16, 2016 at 5:35 PM, Abimaran Kugathasan 
wrote:

> Hi Dev,
>
> When I tried to install features on latest Identity Server 5.2.0 SNAPHOT,
> I could observe that, the features listed under a category are not shown in
> the list of feature when I don't select either of below checkbox.
>Show only the latest versions
>Group features by category
>
> For example, there is a feature called  "Api management Key Manager"
> version 5.0.3 and it's listed under API Key Manager/API Key Manager 5.0.3.
> But, if you use Find Feature without selecting above two check boxes, You
> won't see this feature anyware in the list.
>
> Why is that? This happens only for some features.
>
> --
> Thanks
> Abimaran Kugathasan
> Senior Software Engineer - API Technologies
>
> Email : abima...@wso2.com
> Mobile : +94 773922820
>
> 
> 
>   
> 
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Merge changes done for https://wso2.org/jira/browse/CPARENT-6

2016-08-10 Thread KasunG Gajasinghe
On Wed, Aug 10, 2016 at 11:45 AM, Isuru Perera <isu...@wso2.com> wrote:

> Hi,
>
> I also don't keep all sources locally. For a Maven Dependency, I expect
> the sources jar in Maven Repository.
>
> Even in Carbon Kernel 4.x, I don't see source jars [1]. In Carbon 5.x, I
> see the sources [2].
>
>
That was because we have defined an older version of the
maven-source-plugin in 4.4.7. If we didn't explicitly mention this, then
there the version will be inherited from the already defined
maven-source-plugin in wso2 parent pom. That's a separate issue we need to
fix. @*Lakshman*, please remove the plugin definition from kernel parent
for the next release.



> My opinion is that we should have source jars always.
>

You already have the sources locally!


>
> It's same for Java Docs. We must make sure Java Docs is written properly
> and there are no warnings. Having the java doc plugin helps us to fix any
> issues with docs during the development time, rather than waiting to fix
> such issues whenever there is a release.
>

If has issues, then checkstyle complains to some extent. If you want to
verify javadocs, then, you can run maven-source-plugin:jar-no-fork goal and
generate the javadocs. There is no need to run it everytime.
Even for the compiler plugin, we have a incremental build plugin which
skips building already built modules.

Thanks,
KasunG


> Anyway, please merge other changes and make sure all plugins are up to
> date in Carbon Parent. As I mentioned, I didn't update all.
>
> Thanks!
>
> Best Regards,
>
> [1] https://maven.wso2.org/nexus/content/repositories/releases/
> org/wso2/carbon/org.wso2.carbon.core/4.4.7/
> [2] https://maven.wso2.org/nexus/content/repositories/releases/
> org/wso2/carbon/org.wso2.carbon.core/5.1.0/
>
> On Wed, Aug 10, 2016 at 11:28 AM, Isuru Perera <isu...@wso2.com> wrote:
>
>> Hi Kasun,
>>
>> On Wed, Aug 10, 2016 at 9:54 AM, KasunG Gajasinghe <kas...@wso2.com>
>> wrote:
>>
>>> Hi Isuru,
>>>
>>> Javadoc and source generation happens when you use the maven release
>>> plugin. We are already doing it. [1]
>>>
>> I don't see the source jar in the location you mentioned.
>>
>>> That is the only place we need these two plugins as I understand. When
>>> doing a build locally, you don't really need sources/javadoc jars because
>>> you already have the source code.
>>>
>>> [1] https://maven.wso2.org/nexus/content/repositories/releas
>>> es/org/wso2/carbon/org.wso2.carbon.ndatasource.core/4.4.7/
>>>
>>> Thanks,
>>> KasunG
>>>
>>> On Tue, Aug 9, 2016 at 7:24 PM, Isuru Perera <isu...@wso2.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> On Tue, Aug 9, 2016 at 3:10 PM, Jayanga Dissanayake <jaya...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi Isuru,
>>>>>
>>>>> It seems to be the culprit. I removed the jacoco plugin from
>>>>> carbon-kernel/parent/pom.xml and it builds.
>>>>>
>>>>> One other concern is, in this PR, you have moved the doc and source
>>>>> plugins into plugin section, which cause it to run always. But we usually
>>>>>  don't want src and docs to be generated at each build. Could you please
>>>>> explain why those plugins were moved into plugin section.
>>>>>
>>>> I added java doc and source plugins to parent pom as we need to have
>>>> sources jars and java docs every time we build the source.
>>>>
>>>> If you look at our previous releases based on Carbon 4.x, there are no
>>>> source jars for most of the components. Without having sources jars, it is
>>>> very difficult to debug as well.
>>>>
>>>> Even though, we expected our developers to release the sources jars
>>>> during release time, we can see that it's not happening most of the time.
>>>>
>>>> Java Doc generation is also very important and Java Doc Plugin shows
>>>> warnings if there are any issues with our Java Docs. It's easy to fix such
>>>> warnings before the release.
>>>>
>>>> If the build time is the main concern for local builds, we can disable
>>>> Java doc plugin as it takes some time. The source plugin doesn't take much
>>>> time.
>>>>
>>>> For local builds, we can skip java docs using the parameter:
>>>> "-Dmaven.javadoc.skip=true".
>>>>
>>>> I think having these plugins in parent pom is very important.
>>>>
>>>

Re: [Dev] Merge changes done for https://wso2.org/jira/browse/CPARENT-6

2016-08-09 Thread KasunG Gajasinghe
Hi Isuru,

Javadoc and source generation happens when you use the maven release
plugin. We are already doing it. [1] That is the only place we need these
two plugins as I understand. When doing a build locally, you don't really
need sources/javadoc jars because you already have the source code.

[1]
https://maven.wso2.org/nexus/content/repositories/releases/org/wso2/carbon/org.wso2.carbon.ndatasource.core/4.4.7/

Thanks,
KasunG

On Tue, Aug 9, 2016 at 7:24 PM, Isuru Perera  wrote:

> Hi,
>
> On Tue, Aug 9, 2016 at 3:10 PM, Jayanga Dissanayake 
> wrote:
>
>> Hi Isuru,
>>
>> It seems to be the culprit. I removed the jacoco plugin from
>> carbon-kernel/parent/pom.xml and it builds.
>>
>> One other concern is, in this PR, you have moved the doc and source
>> plugins into plugin section, which cause it to run always. But we usually
>>  don't want src and docs to be generated at each build. Could you please
>> explain why those plugins were moved into plugin section.
>>
> I added java doc and source plugins to parent pom as we need to have
> sources jars and java docs every time we build the source.
>
> If you look at our previous releases based on Carbon 4.x, there are no
> source jars for most of the components. Without having sources jars, it is
> very difficult to debug as well.
>
> Even though, we expected our developers to release the sources jars during
> release time, we can see that it's not happening most of the time.
>
> Java Doc generation is also very important and Java Doc Plugin shows
> warnings if there are any issues with our Java Docs. It's easy to fix such
> warnings before the release.
>
> If the build time is the main concern for local builds, we can disable
> Java doc plugin as it takes some time. The source plugin doesn't take much
> time.
>
> For local builds, we can skip java docs using the parameter:
> "-Dmaven.javadoc.skip=true".
>
> I think having these plugins in parent pom is very important.
>
>>
>> Thanks,
>> Jayanga.
>>
>> Thanks,
>> Jayanga.
>>
>> *Jayanga Dissanayake*
>> Associate Technical Lead
>> WSO2 Inc. - http://wso2.com/
>> lean . enterprise . middleware
>> email: jaya...@wso2.com
>> mobile: +94772207259
>> 
>>
>> On Tue, Aug 9, 2016 at 2:34 PM, Isuru Perera  wrote:
>>
>>> Did you remove existing Jacoco plugin in Carbon Kernel?
>>>
>>> Isuru Perera
>>>
>>> On 9 Aug 2016 2:29 p.m., "Jayanga Dissanayake"  wrote:
>>>
 Hi Isuru,

 When I try to build the carbon kernel with new parent pom with your
 updates, the following error happens.
 It seems to be an issue in jacoco plugin, any idea?

 [ERROR] Failed to execute goal 
 org.jacoco:jacoco-maven-plugin:0.7.5.201505241946:report
 (post-unit-test) on project org.wso2.carbon.launcher: An error has occurred
 in JaCoCo Test report generation. Error while creating report: Error while
 analyzing class /tmp/1/carbon-kernel/launcher/
 target/classes/org/wso2/carbon/launcher/CarbonServer.class. Class
 org/wso2/carbon/launcher/CarbonServer is already instrumented. ->
 [Help 1]

 Thanks,
 Jayanga.

 *Jayanga Dissanayake*
 Associate Technical Lead
 WSO2 Inc. - http://wso2.com/
 lean . enterprise . middleware
 email: jaya...@wso2.com
 mobile: +94772207259
 

 On Tue, Aug 9, 2016 at 12:24 PM, Isuru Perera  wrote:

> Hi Jayanga,
>
> I didn't update maven bundle plugin. Could you please check on that
> too?
>
> Please use following command to check plugin updates.
>
> mvn versions:display-plugin-updates
>
> Thanks!
>
> On Tue, Aug 9, 2016 at 11:39 AM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> Hi Jayanga,
>>
>> Let's merge this and do a release along with kernel 5.2.0.
>>
>> On Wed, Jul 27, 2016 at 3:44 PM, Isuru Perera 
>> wrote:
>>
>>> Hi,
>>>
>>> Could you please review the PR in [1].
>>>
>>> I also noticed that carbon-parent version 5 is released [2], but the
>>> master branch still has 5-SNAPSHOT [3].
>>>
>>> [1] https://wso2.org/jira/browse/CPARENT-6
>>> [2] https://github.com/wso2/carbon-parent/releases/tag/carbon-pa
>>> rent-5
>>> [3] https://github.com/wso2/carbon-parent/blob/master/pom.xml#L22
>>>
>>> --
>>> Isuru Perera
>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>> Contact: +IsuruPereraWSO2
>>> 
>>>
>>
>>
>>
>> --
>> *Kishanthan Thangarajah*
>> Technical Lead,
>> Platform Technologies Team,
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - +94773426635
>> Blog - *http://kishanthan.wordpress.com
>> 

Re: [Dev] Integration tests are failing due to NoClassDefFoundError

2016-08-04 Thread KasunG Gajasinghe
We have seen this happening when there are multiple different versions of
the same bundle. When webapps uses classes from both these bundles,
class-space violations occur. The error is shown as a java.lang.
NoClassDefFoundError.

On Wed, Aug 3, 2016 at 5:23 PM, Lakshani Gamage  wrote:

> Hi all,
>
> When running App Manager test cases, few test cases are randomly failing
> due to following [1] and [2] errors.
>
> Does anyone know a reason for this? Appreciate your help to find the
> reason.
>
> [1]
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - [2016-08-03 11:12:29,623] ERROR - ContextLoader Context initialization
> failed
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'services': Cannot create inner bean
> 'org.wso2.carbon.appmgt.rest.api.publisher.AppsApi#5c6bbc21' of type
> [org.wso2.carbon.appmgt.rest.api.publisher.AppsApi] while setting bean
> property 'serviceBeans' with key [2]; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.wso2.carbon.appmgt.rest.api.publisher.AppsApi#5c6bbc21'
> defined in ServletContext resource [/WEB-INF/beans.xml]: Instantiation of
> bean failed; nested exception is 
> org.springframework.beans.BeanInstantiationException:
> Failed to instantiate [org.wso2.carbon.appmgt.rest.api.publisher.AppsApi]:
> Constructor threw exception; nested exception is 
> java.lang.NoClassDefFoundError:
> org/wso2/carbon/appmgt/impl/AppRepository
>
>
> [2]
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - [2016-08-03 11:13:47,982] ERROR - ApplicationContext
> StandardWrapper.Throwable
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'mobileAppServiceV1': Cannot resolve reference to bean
> 'discoveryServiceV1' while setting bean property 'serviceBeans' with key
> [1]; nested exception is 
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'discoveryServiceV1' defined in URL
> [jndi:/localhost/api/WEB-INF/cxf-servlet.xml]: Instantiation of bean
> failed; nested exception is 
> org.springframework.beans.BeanInstantiationException:
> Could not instantiate bean class [org.wso2.carbon.appmgt.
> services.api.v1.apps.discovery.service.DiscoveryService]: Constructor
> threw exception; nested exception is java.lang.NoClassDefFoundError:
> org/wso2/carbon/appmgt/impl/discovery/DiscoveryCredentials
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - at org.springframework.beans.factory.support.
> BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.
> java:328)
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - at org.springframework.beans.factory.support.
> BeanDefinitionValueResolver.resolveValueIfNecessary(
> BeanDefinitionValueResolver.java:106)
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - at org.springframework.beans.factory.support.
> BeanDefinitionValueResolver.resolveManagedList(
> BeanDefinitionValueResolver.java:353)
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - at org.springframework.beans.factory.support.
> BeanDefinitionValueResolver.resolveValueIfNecessary(
> BeanDefinitionValueResolver.java:153)
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - at org.springframework.beans.factory.support.
> AbstractAutowireCapableBeanFactory.applyPropertyValues(
> AbstractAutowireCapableBeanFactory.java:1327)
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - at org.springframework.beans.factory.support.
> AbstractAutowireCapableBeanFactory.populateBean(
> AbstractAutowireCapableBeanFactory.java:1085)
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - at org.springframework.beans.factory.support.
> AbstractAutowireCapableBeanFactory.doCreateBean(
> AbstractAutowireCapableBeanFactory.java:516)
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - at org.springframework.beans.factory.support.
> AbstractAutowireCapableBeanFactory.createBean(
> AbstractAutowireCapableBeanFactory.java:455)
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - at org.springframework.beans.factory.support.AbstractBeanFactory$1.
> getObject(AbstractBeanFactory.java:293)
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - at org.springframework.beans.factory.support.
> DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.
> java:222)
> INFO  [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
> - 

Re: [Dev] Is it possible to define a global response header in a MSF4J service

2016-08-01 Thread KasunG Gajasinghe
Hi Sumedha,

As I see, this is not provided by the JAX-RS 2.0 specification. If this is
set at the class-level, then the header names and values will need to be
hard-coded. Can you explain the usecase here?

On Mon, Aug 1, 2016 at 2:32 PM, Sumedha Kodithuwakku 
wrote:

> Hi all,
>
> $subject.?
>
> I can set a response header within each response as below;
>
> Response.status(Response.Status.OK).entity(object).header("Header", 
> "Value").build();
>
> However is it possible to define such a header at global level.? For
> example like *@Header({ Header", "Value" } public class ClassName(**)* at
> class level.
>
> Appreciate your thoughts on this..
>
> Thanks
> SumedhaS
>
> --
> *Sumedha Kodithuwakku*
> Senior Software Engineer
> WSO2 Inc. : http://wso2.com
> lean . enterprise . middleware
>
> Mobile: +94 71 808 1124
> Blog: http://sumedhask.blogspot.com/
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Improve startup time in AS 6.0.0

2016-07-24 Thread KasunG Gajasinghe
On Sun, Jul 24, 2016 at 10:39 AM, Lakshman Udayakantha 
wrote:

> [+dev]
>
> On Sat, Jul 23, 2016 at 8:17 PM, Lakshman Udayakantha 
> wrote:
>
>> I copied all the jars in lib in AS 6.0.0 to a pure tomcat and I could see
>> 40(s) startup time there also. According to the jprofiler also most of the
>> time is going for jar scanning. So I added additional jars in AS than
>> tomcat to the tomcat.util.scan.StandardJarScanFilter.jarsToSkip section in
>> catalina.properties file because we don't want to scan them for
>> configurations. After adding them I could reduce uptime to 2.5 seconds. I
>> think we can go with this in next milestone. WDYT?
>>
>>
+1 Lakshman. We should try to go further down since 2.5sec is also a bit
high compared to Vanilla Tomcat. :-)


> Thanks
>> --
>> Lakshman Udayakantha
>> WSO2 Inc. www.wso2.com
>> lean.enterprise.middleware
>> Mobile: *0717429601 <0717429601>*
>>
>>
>
>
> --
> Lakshman Udayakantha
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
> Mobile: *0717429601 <0717429601>*
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Update - Provide runtime environment for jaggery apps in AS6

2016-07-18 Thread KasunG Gajasinghe
On Mon, Jul 18, 2016 at 2:45 PM, Nisala Nanayakkara <nis...@wso2.com> wrote:

> Hi KasunG,
>
> Yes.This is the branch. Currently we are maintaining two branches as this
> tomcat version(tomcat 8) will not work with carbon 4.4.x products due to
> the tomcat API changes.
>


> So we have to maintain two branches now. But we will move the current
> master to branch 0.12.x branch and merger tomcat-8.0.x-jaggery to master.
> Then its a two different versions, not a feature branch.
>

Since the code bases are pretty similar, it would be much better if these
two can be merged together instead! What are the possible alternatives we
have?

Maintaining two different branches in the same repo would mean that we will
need to have two major versions. One for the existing development, and
another for the new development.

Thanks,
KasunG


> Thanks,
> Nisala
>
> On Mon, Jul 18, 2016 at 2:05 PM, KasunG Gajasinghe <kas...@wso2.com>
> wrote:
>
>> Hi Nisala,
>>
>> On Thu, Jun 30, 2016 at 7:17 AM, Nisala Nanayakkara <nis...@wso2.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> Please find the branch here.
>>>
>>> [1] - https://github.com/wso2/jaggery/tree/tomcat-8.0.x-jaggery
>>>
>>
>>
>> From what I understood, this is a feature branch, is it not? Then, this
>> does not really need a separate jenkins job since you will merge this into
>> master soon. Please note that, you shouldn't have two diverged features in
>> branches of the same repo.
>>
>> Thanks,
>> KasunG
>>
>>
>>>
>>> Thanks,
>>> Nisala
>>>
>>> On Thu, Jun 30, 2016 at 7:12 AM, Nisala Nanayakkara <nis...@wso2.com>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> We have created a seperate branch[1] with the changes required for
>>>> providing runtime environment for jaggery apps in AS6. Currently there is
>>>> no jenkins builder setup for this, Please get the 1.0.0-SNAPSHOT version by
>>>> building the branch in local repo. Please inform me if there are any 
>>>> issues.
>>>>
>>>> Thanks,
>>>> Nisala
>>>>
>>>> --
>>>> *Nisala Niroshana Nanayakkara,*
>>>> Software Engineer
>>>> Mobile:(+94)717600022
>>>> WSO2 Inc., http://wso2.com/
>>>>
>>>
>>>
>>>
>>> --
>>> *Nisala Niroshana Nanayakkara,*
>>> Software Engineer
>>> Mobile:(+94)717600022
>>> WSO2 Inc., http://wso2.com/
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>> email: kasung AT spamfree wso2.com
>> linked-in: http://lk.linkedin.com/in/gajasinghe
>> blog: http://kasunbg.org
>>
>>
>>
>
>
>
> --
> *Nisala Niroshana Nanayakkara,*
> Software Engineer
> Mobile:(+94)717600022
> WSO2 Inc., http://wso2.com/
>



-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Update - Provide runtime environment for jaggery apps in AS6

2016-07-18 Thread KasunG Gajasinghe
Hi Nisala,

On Thu, Jun 30, 2016 at 7:17 AM, Nisala Nanayakkara  wrote:

> Hi all,
>
> Please find the branch here.
>
> [1] - https://github.com/wso2/jaggery/tree/tomcat-8.0.x-jaggery
>


>From what I understood, this is a feature branch, is it not? Then, this
does not really need a separate jenkins job since you will merge this into
master soon. Please note that, you shouldn't have two diverged features in
branches of the same repo.

Thanks,
KasunG


>
> Thanks,
> Nisala
>
> On Thu, Jun 30, 2016 at 7:12 AM, Nisala Nanayakkara 
> wrote:
>
>> Hi all,
>>
>> We have created a seperate branch[1] with the changes required for
>> providing runtime environment for jaggery apps in AS6. Currently there is
>> no jenkins builder setup for this, Please get the 1.0.0-SNAPSHOT version by
>> building the branch in local repo. Please inform me if there are any issues.
>>
>> Thanks,
>> Nisala
>>
>> --
>> *Nisala Niroshana Nanayakkara,*
>> Software Engineer
>> Mobile:(+94)717600022
>> WSO2 Inc., http://wso2.com/
>>
>
>
>
> --
> *Nisala Niroshana Nanayakkara,*
> Software Engineer
> Mobile:(+94)717600022
> WSO2 Inc., http://wso2.com/
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 AS integration with TomEE

2016-07-14 Thread KasunG Gajasinghe
On Thu, Jul 14, 2016 at 4:27 PM, Lakshman Udayakantha 
wrote:

> Hi KasunG,
>
> This was almost done except jaxrs_basic web app not deploying properly.
> Got exception [1]. Anyway I checked for the class which says CNF and it was
> there in classpath.  This jaxrs_basic  web app needs CXF runtime jars and
> this web app using to demonstrate custom runtime environment support.
> Anyhow TomEE already bundling CXF runtime, it seems not appropriate CXF as
> a separate runtime. right?.
>

Yes, that seems to be the case. Since CXF is coming from TomEE, CXF is not
needed as a runtime. But, TomEE only packs CXF's jax-rs related libs. We
need to ship jax-ws libs as well.


> How about creating a separate run time rather than CXF and creating
> another web app to test that and bundling current CXF jars in lib itself?
>
> [1]  SEVERE [localhost-startStop-1]
> org.apache.catalina.core.StandardContext.listenerStart Exception sending
> context initialized event to listener instance of class
> org.springframework.web.context.ContextLoaderListener
>
>  org.springframework.beans.factory.BeanDefinitionStoreException:
> Unexpected exception parsing XML document from ServletContext resource
> [/WEB-INF/customBeans.xml]; nested exception is
> org.springframework.beans.FatalBeanException: Invalid NamespaceHandler
> class [org.apache.cxf.jaxrs.spring.NamespaceHandler] for namespace [
> http://cxf.apache.org/jaxrs]: problem with handler class file or
> dependent class; nested exception is java.lang.NoClassDefFoundError:
> org/springframework/beans/factory/xml/NamespaceHandlerSupport
>
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:414)
>
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
>
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
>
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
>
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)
>
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
>
> at
> org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
>
> at
> org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
>
> at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
>
> at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:609)
>
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:510)
>
> at
> org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
>
> at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
>
> at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
>
> at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4716)
>
> at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5178)
>
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
>
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
>
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
>
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
>
> at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
>
> at
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
>
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>
> at java.lang.Thread.run(Thread.java:745)
>
> Caused by: org.springframework.beans.FatalBeanException: Invalid
> NamespaceHandler class [org.apache.cxf.jaxrs.spring.NamespaceHandler] for
> namespace [http://cxf.apache.org/jaxrs]: problem with handler class file
> or dependent class; nested exception is java.lang.NoClassDefFoundError:
> org/springframework/beans/factory/xml/NamespaceHandlerSupport
>
> at
> org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:140)
>
> at
> 

  1   2   3   4   >