Re: [Dev] [DEV][JAGGERY] Getting Empty JSON when logging(log.info)

2016-02-08 Thread Sajith Ariyarathna
Hi Manu,

Logging full object might break existing code that has logs of Java object
> in other products. If a developer accidentally logs a circular references
> it might even crash the server.
>
 Point taken, logging circular objects is a problem. My concern is that,
logging Java objects details in "JSON string format" is not a good way to
do it. May be we can log details of the Java object without following the
JSON format. Like this,

(class: org.wso2.models.Student, toString: "name: Kamal, age: 25, city:
Colombo")


Thanks.

On Tue, Feb 9, 2016 at 12:29 PM, Manuranga Perera  wrote:

> Hi Sajith,
> +1 not longing full object. Logging full object might break existing code
> that has logs of Java object in other products. If a developer accidentally
> logs a circular references it might even crash the server. Logs are for
> getting a bit of information for debug or operational purposes, it
> shouldn't be heavy or have any side effects.
>
> A log should be something you should be able to put without worrying too
> much.
>
> On Thu, Feb 4, 2016 at 6:41 PM, Sajith Ariyarathna 
> wrote:
>
>> So I am planning to log in-case of Java object as below without logging
>>> whole object.
>>> { "javaObject" : true, "hashCode" : "39d92a", "class" :
>>> "org.wso2.apim.StoreHostObject"}
>>>
>> -1
>>
>>- Think from the JavaScript perspective. When you log an object in
>>Jaggery/JavaScript it gives you the JSON representation of that object.
>>That is the expected behavior. So if you outputs a JSON string as the 
>> above
>>suggestion, it gives a wrong impression that there are 3 properties
>>"javaObject", "hasCode" & "class".
>>- Most of the time we log an object to see what is inside that
>>object. Above suggestion does not help in that situation. See the 
>> beginning
>>of this mail thread. The original problem you had was 'Jaggery gives "{}"
>>when logging a POJO instead of the JSON representation of that POJO'.
>>
>> My suggestion is to just output the JSON string of the POJO, If you
>> really want to add the Java class name then you can try something like this.
>>  (org.wso2.models.Student){"name": "Kamal", "age": "26", "city":
>> "Colombo"}
>>
>> Thanks.
>>
>> On Wed, Feb 3, 2016 at 1:00 PM, Rajeenthini Satkunam <
>> rajeenth...@wso2.com> wrote:
>>
>>> HI all,
>>>
>>> The issue was solved by adding  for
>>> jackson-databind,jackson-annotations,jackson-core for POM[1] .
>>>
>>> By the Way I would like to discuss more regarding this mail.
>>>
>>> *Issue I am trying to solve*
>>>
>>>  - I am getting empty JSON string ("{}") when logging Java object.
>>>  - Empty JSON string("{}") will give wrong information to user.
>>>
>>> *Proposed solution*
>>>
>>>   - give the user proper understandable log message.
>>>   - the logging need to be fast and summarized.
>>>
>>> So I am planning to log in-case of Java object as below without logging
>>> whole object.
>>> { "javaObject" : true, "hashCode" : "39d92a", "class" :
>>> "org.wso2.apim.StoreHostObject"}
>>>
>>> You can find these links[2][3] as resources to get an idea.
>>>
>>> [1] -
>>> https://github.com/wso2/jaggery/blob/master/features/org.jaggeryjs.server.feature/pom.xml
>>> [2] -
>>> https://github.com/wso2/jaggery/blob/master/components/hostobjects/org.jaggeryjs.hostobjects.log/src/main/java/org/jaggeryjs/hostobjects/log/LogHostObject.java
>>> [3] -
>>> https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/src/main/java/org/jaggeryjs/scriptengine/util/HostObjectUtil.java
>>>
>>>
>>> On Wed, Feb 3, 2016 at 10:27 AM, Rajeenthini Satkunam <
>>> rajeenth...@wso2.com> wrote:
>>>
 HI Niranjan,

 Ya sure.I will meet you today.

 On Wed, Feb 3, 2016 at 9:25 AM, Niranjan Karunanandham <
 niran...@wso2.com> wrote:

> Hi Rajeenthini,
>
>
> On Wed, Feb 3, 2016 at 9:19 AM, Rajeenthini Satkunam <
> rajeenth...@wso2.com> wrote:
>
>> HI All,
>>
>> Thank you chamara and sajith for your valuable suggestions.I have
>> done the improvement in Jaggery to log the java Object.
>>
>> improvement
>> -
>> 1)
>> https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/src/main/java/org/jaggeryjs/scriptengine/util/HostObjectUtil.java#L78
>>
>> Added new code segment as per sajith's suggestion
>>
>> try{
>> return (new ObjectMapper().writeValueAsString(obj));
>> }catch (Exception e){
>> log.debug("Object " + obj.toString() + " of class " + obj.getClass() 
>> + " cannot be converted to JSON");
>> }
>>
>> return "{}";
>>
>>
>> 2) https://github.com/wso2/jaggery/blob/master/pom.xml
>>
>> Added maven dependencies for Jackson data-bind and annotations
>>
>> 
>> com.fasterxml.jackson.core
>> jackson-annotations
>> ${jackson.version}
>> 
>> 
>> com.fasterxml.jackson.cor

Re: [Dev] Running WSO2 Products on Cloud Foundry

2016-02-08 Thread Lakmal Warusawithana
Initial stage, don't worry about to use public docker hub images. If it
working with docker hub, we can make it to work with private docker registry

On Tue, Feb 9, 2016 at 12:43 PM, Nanduni Nimalsiri  wrote:

> Hi Chamila,
>
> Yes we can use custom buildpacks to deploy on Cloud Foundry. I am not
> familiar with all WSO2 products, but I suppose that we need to run shell
> files in most cases. So we can customize or build our own buildpack to
> detect those files.
>
> Diego is a separate approach. It is a new run time that replaces DEA in
> Cloud Foundry. With Diego, we can use Docker images to push applications to
> Cloud Foundry, But there are some limitations. We need the images to be
> available in Docker Hub publicly. But I found that there's something new
> called 'Private Docker Registry' in Diego that enables to use private
> Docker images where users are prompted for credentials during staging the
> app. I was unable to run Diego as it requires administrator privileges to
> enable docker support for me.
>
> Also there is a cf-docker buildpack that detects Docker images. It also
> has the above mentioned limitations. I am not sure if we can customize that
> buildpack to detect private images as well. They say that it is just a
> proof of concept.
>
> I have tried to get help from cf-dev mailing lists as well. They suggest
> that I need to have administrator privileges to resolve above scenarios.
>
> Best Regards,
> Nanduni
>
>
>
> *Nanduni Nimalsiri*
> Software Engineering Intern, WSO2 Inc. (http://wso2.com)
> email : nand...@wso2.com
> blog : http://nanduni.blogspot.com/
> mobile : +94714114256
>
>
> On Tue, Feb 9, 2016 at 12:01 PM, Chamila De Alwis 
> wrote:
>
>> Hi Nanduni,
>>
>> Wouldn't writing a custom buildpack (for each product) [1] allow us to
>> deploy a given artifact on CloudFoundry? We'd have to write the detect,
>> compile, and release scripts separately.
>>
>> Is there any difference between that approach and using Docker images?
>>
>> [1] - https://docs.cloudfoundry.org/buildpacks/custom.html
>>
>>
>> Regards,
>> Chamila de Alwis
>> Committer and PMC Member - Apache Stratos
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>> On Mon, Feb 8, 2016 at 9:00 AM, Nanduni Nimalsiri 
>> wrote:
>>
>>> Hi all,
>>>
>>> By now, I have managed to deploy applications in Cloud Foundry via,
>>> 1. bosh-lite ( a vagrant VM that comes with pre-installed BOSH server or
>>> Director)
>>> 2. Hosted solutions such as Pivotal web services (pivotal.io)
>>>
>>> I deployed Tomcat server in Cloud Foundry as well. But I was not able to
>>> deploy Docker in Cloud Foundry via Diego. It gives me some errors regarding
>>> admin permissions.
>>> I found that there are Heroku buildpacks on Docker and they are
>>> perfectly compatible with Cloud Foundry too.
>>>
>>> [1] https://github.com/duglin/cf-docker
>>> [1] is another buildpack that supports Docker, but there are several
>>> limitations as this buildpack requires that you have a Docker host
>>> available for it to access, and you need to also have a Docker container
>>> manager app (cf-docker) running that will sync the Cloud Foundry runtime
>>> with the Docker containers.
>>>
>>> My blog in the following link will be useful for any one to get an idea
>>> on deploying applications in Cloud Foundry.
>>> http://nanduni.blogspot.com/
>>>
>>> Best regards,
>>> Nanduni.
>>>
>>>
>>>
>>> *Nanduni Nimalsiri*
>>> Software Engineering Intern, WSO2 Inc. (http://wso2.com)
>>> email : nand...@wso2.com
>>> blog : http://nanduni.blogspot.com/
>>> mobile : +94714114256
>>>
>>>
>>> On Sun, Feb 7, 2016 at 11:49 PM, Malmee Weerasinghe 
>>> wrote:
>>>
 Hi Imesh,

 I have done a background research on Cloud Foundry and the blog under
 the following link contains the documentation of the research. I will
 include more posts on deploying Cloud Foundry with bosh lite and running
 simple applications on it, as I have studied so far.


 http://malmeeweerasinghe.blogspot.com/2016/02/introduction-to-cloud-foundry.html

 Thanks

 On Fri, Feb 5, 2016 at 10:31 PM, Imesh Gunaratne 
 wrote:

> Hi All,
>
> Shall we summarize the research work we have done so far and our
> approach towards $subject?
>
> I know some of us have already done below, it might be better to
> document this:
>
>- PaaS features of CF
>- Steps for setting up a local environment with Vagrant
>- Running a hello world sample
>- Running a JVM using a standalone framework
>
> Next we might need to check following:
>
> 1. The ability to use Docker on CF
> 2. The process of creating and managing Warden container images
> 3. Find a mechanism to discover the member list of a cluster and
> implement a Carbon membership scheme
> 4. Create standalone frameworks for Carbon products
> 5. Find a way to apply patches and software updates
> 6. 

Re: [Dev] Running WSO2 Products on Cloud Foundry

2016-02-08 Thread Chamila De Alwis
Hi Nanduni,

If we can use the Docker images in CF (Diego), then we will be able to
reuse the existing Dockerfiles in WSO2 Kubernetes Artifacts repository [1].
It will just be the matter of modifying the Heroku (or any other) Docker
build pack to use a private Docker registry.

On Tue, Feb 9, 2016 at 12:43 PM, Nanduni Nimalsiri  wrote:

> But I found that there's something new called 'Private Docker Registry' in
> Diego that enables to use private Docker images where users are prompted
> for credentials during staging the app. I was unable to run Diego as it
> requires administrator privileges to enable docker support for me.
>
> Also there is a cf-docker buildpack that detects Docker images. It also
> has the above mentioned limitations. I am not sure if we can customize that
> buildpack to detect private images as well. They say that it is just a
> proof of concept.
>

When the Docker daemon connects to a private Docker registry, it will
record the token in the config file ~/.dockercfg. Is there any possibility
to provide this configuration to BOSH so that it will not prompt for the
authentication during runtime?

[1] - https://github.com/wso2/kubernetes-artifacts


Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Running WSO2 Products on Cloud Foundry

2016-02-08 Thread Nanduni Nimalsiri
Hi Chamila,

Yes we can use custom buildpacks to deploy on Cloud Foundry. I am not
familiar with all WSO2 products, but I suppose that we need to run shell
files in most cases. So we can customize or build our own buildpack to
detect those files.

Diego is a separate approach. It is a new run time that replaces DEA in
Cloud Foundry. With Diego, we can use Docker images to push applications to
Cloud Foundry, But there are some limitations. We need the images to be
available in Docker Hub publicly. But I found that there's something new
called 'Private Docker Registry' in Diego that enables to use private
Docker images where users are prompted for credentials during staging the
app. I was unable to run Diego as it requires administrator privileges to
enable docker support for me.

Also there is a cf-docker buildpack that detects Docker images. It also has
the above mentioned limitations. I am not sure if we can customize that
buildpack to detect private images as well. They say that it is just a
proof of concept.

I have tried to get help from cf-dev mailing lists as well. They suggest
that I need to have administrator privileges to resolve above scenarios.

Best Regards,
Nanduni



*Nanduni Nimalsiri*
Software Engineering Intern, WSO2 Inc. (http://wso2.com)
email : nand...@wso2.com
blog : http://nanduni.blogspot.com/
mobile : +94714114256


On Tue, Feb 9, 2016 at 12:01 PM, Chamila De Alwis  wrote:

> Hi Nanduni,
>
> Wouldn't writing a custom buildpack (for each product) [1] allow us to
> deploy a given artifact on CloudFoundry? We'd have to write the detect,
> compile, and release scripts separately.
>
> Is there any difference between that approach and using Docker images?
>
> [1] - https://docs.cloudfoundry.org/buildpacks/custom.html
>
>
> Regards,
> Chamila de Alwis
> Committer and PMC Member - Apache Stratos
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Mon, Feb 8, 2016 at 9:00 AM, Nanduni Nimalsiri 
> wrote:
>
>> Hi all,
>>
>> By now, I have managed to deploy applications in Cloud Foundry via,
>> 1. bosh-lite ( a vagrant VM that comes with pre-installed BOSH server or
>> Director)
>> 2. Hosted solutions such as Pivotal web services (pivotal.io)
>>
>> I deployed Tomcat server in Cloud Foundry as well. But I was not able to
>> deploy Docker in Cloud Foundry via Diego. It gives me some errors regarding
>> admin permissions.
>> I found that there are Heroku buildpacks on Docker and they are perfectly
>> compatible with Cloud Foundry too.
>>
>> [1] https://github.com/duglin/cf-docker
>> [1] is another buildpack that supports Docker, but there are several
>> limitations as this buildpack requires that you have a Docker host
>> available for it to access, and you need to also have a Docker container
>> manager app (cf-docker) running that will sync the Cloud Foundry runtime
>> with the Docker containers.
>>
>> My blog in the following link will be useful for any one to get an idea
>> on deploying applications in Cloud Foundry.
>> http://nanduni.blogspot.com/
>>
>> Best regards,
>> Nanduni.
>>
>>
>>
>> *Nanduni Nimalsiri*
>> Software Engineering Intern, WSO2 Inc. (http://wso2.com)
>> email : nand...@wso2.com
>> blog : http://nanduni.blogspot.com/
>> mobile : +94714114256
>>
>>
>> On Sun, Feb 7, 2016 at 11:49 PM, Malmee Weerasinghe 
>> wrote:
>>
>>> Hi Imesh,
>>>
>>> I have done a background research on Cloud Foundry and the blog under
>>> the following link contains the documentation of the research. I will
>>> include more posts on deploying Cloud Foundry with bosh lite and running
>>> simple applications on it, as I have studied so far.
>>>
>>>
>>> http://malmeeweerasinghe.blogspot.com/2016/02/introduction-to-cloud-foundry.html
>>>
>>> Thanks
>>>
>>> On Fri, Feb 5, 2016 at 10:31 PM, Imesh Gunaratne  wrote:
>>>
 Hi All,

 Shall we summarize the research work we have done so far and our
 approach towards $subject?

 I know some of us have already done below, it might be better to
 document this:

- PaaS features of CF
- Steps for setting up a local environment with Vagrant
- Running a hello world sample
- Running a JVM using a standalone framework

 Next we might need to check following:

 1. The ability to use Docker on CF
 2. The process of creating and managing Warden container images
 3. Find a mechanism to discover the member list of a cluster and
 implement a Carbon membership scheme
 4. Create standalone frameworks for Carbon products
 5. Find a way to apply patches and software updates
 6. Find a way to implement a centralized logging solution
 7. Check whether there is a way to monitor the health of the containers
 (similar to cAdvisor and Cockpit UI in Kubernetes)
 8. Create artifacts required for deploying a Carbon server on CF and
 prepare a guideline.

 [1]
 https://github.com/wso2/kubernetes-artifacts/tree/master/common/kubernet

Re: [Dev] Running WSO2 Products on Cloud Foundry

2016-02-08 Thread Gayan Gunarathne
On Tue, Feb 9, 2016 at 12:01 PM, Chamila De Alwis  wrote:

> Hi Nanduni,
>
> Wouldn't writing a custom buildpack (for each product) [1] allow us to
> deploy a given artifact on CloudFoundry? We'd have to write the detect,
> compile, and release scripts separately.
>
> Is there any difference between that approach and using Docker images?
>

Default that uses Warden for its container management. We can try with
heroka buildpack[1] to run the docker images.

[1] https://blog.docker.com/2013/05/heroku-buildpacks-on-docker/
[2] https://devcenter.heroku.com/articles/docker


> [1] - https://docs.cloudfoundry.org/buildpacks/custom.html
>
>
> Regards,
> Chamila de Alwis
> Committer and PMC Member - Apache Stratos
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Mon, Feb 8, 2016 at 9:00 AM, Nanduni Nimalsiri 
> wrote:
>
>> Hi all,
>>
>> By now, I have managed to deploy applications in Cloud Foundry via,
>> 1. bosh-lite ( a vagrant VM that comes with pre-installed BOSH server or
>> Director)
>> 2. Hosted solutions such as Pivotal web services (pivotal.io)
>>
>> I deployed Tomcat server in Cloud Foundry as well. But I was not able to
>> deploy Docker in Cloud Foundry via Diego. It gives me some errors regarding
>> admin permissions.
>> I found that there are Heroku buildpacks on Docker and they are perfectly
>> compatible with Cloud Foundry too.
>>
>> [1] https://github.com/duglin/cf-docker
>> [1] is another buildpack that supports Docker, but there are several
>> limitations as this buildpack requires that you have a Docker host
>> available for it to access, and you need to also have a Docker container
>> manager app (cf-docker) running that will sync the Cloud Foundry runtime
>> with the Docker containers.
>>
>> My blog in the following link will be useful for any one to get an idea
>> on deploying applications in Cloud Foundry.
>> http://nanduni.blogspot.com/
>>
>> Best regards,
>> Nanduni.
>>
>>
>>
>> *Nanduni Nimalsiri*
>> Software Engineering Intern, WSO2 Inc. (http://wso2.com)
>> email : nand...@wso2.com
>> blog : http://nanduni.blogspot.com/
>> mobile : +94714114256
>>
>>
>> On Sun, Feb 7, 2016 at 11:49 PM, Malmee Weerasinghe 
>> wrote:
>>
>>> Hi Imesh,
>>>
>>> I have done a background research on Cloud Foundry and the blog under
>>> the following link contains the documentation of the research. I will
>>> include more posts on deploying Cloud Foundry with bosh lite and running
>>> simple applications on it, as I have studied so far.
>>>
>>>
>>> http://malmeeweerasinghe.blogspot.com/2016/02/introduction-to-cloud-foundry.html
>>>
>>> Thanks
>>>
>>> On Fri, Feb 5, 2016 at 10:31 PM, Imesh Gunaratne  wrote:
>>>
 Hi All,

 Shall we summarize the research work we have done so far and our
 approach towards $subject?

 I know some of us have already done below, it might be better to
 document this:

- PaaS features of CF
- Steps for setting up a local environment with Vagrant
- Running a hello world sample
- Running a JVM using a standalone framework

 Next we might need to check following:

 1. The ability to use Docker on CF
 2. The process of creating and managing Warden container images
 3. Find a mechanism to discover the member list of a cluster and
 implement a Carbon membership scheme
 4. Create standalone frameworks for Carbon products
 5. Find a way to apply patches and software updates
 6. Find a way to implement a centralized logging solution
 7. Check whether there is a way to monitor the health of the containers
 (similar to cAdvisor and Cockpit UI in Kubernetes)
 8. Create artifacts required for deploying a Carbon server on CF and
 prepare a guideline.

 [1]
 https://github.com/wso2/kubernetes-artifacts/tree/master/common/kubernetes-membership-scheme


 Thanks

 --
 *Imesh Gunaratne*
 Senior Technical Lead
 WSO2 Inc: http://wso2.com
 T: +94 11 214 5345 M: +94 77 374 2057
 W: http://imesh.io
 Lean . Enterprise . Middleware


>>>
>>>
>>> --
>>> Malmee Weerasinghe
>>> WSO2 Intern
>>> mobile : (+94)* 71 7601905* |   email :   
>>> mal...@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
>
>


-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV][JAGGERY] Getting Empty JSON when logging(log.info)

2016-02-08 Thread Manuranga Perera
Hi Sajith,
+1 not longing full object. Logging full object might break existing code
that has logs of Java object in other products. If a developer accidentally
logs a circular references it might even crash the server. Logs are for
getting a bit of information for debug or operational purposes, it
shouldn't be heavy or have any side effects.

A log should be something you should be able to put without worrying too
much.

On Thu, Feb 4, 2016 at 6:41 PM, Sajith Ariyarathna 
wrote:

> So I am planning to log in-case of Java object as below without logging
>> whole object.
>> { "javaObject" : true, "hashCode" : "39d92a", "class" :
>> "org.wso2.apim.StoreHostObject"}
>>
> -1
>
>- Think from the JavaScript perspective. When you log an object in
>Jaggery/JavaScript it gives you the JSON representation of that object.
>That is the expected behavior. So if you outputs a JSON string as the above
>suggestion, it gives a wrong impression that there are 3 properties
>"javaObject", "hasCode" & "class".
>- Most of the time we log an object to see what is inside that object.
>Above suggestion does not help in that situation. See the beginning of this
>mail thread. The original problem you had was 'Jaggery gives "{}" when
>logging a POJO instead of the JSON representation of that POJO'.
>
> My suggestion is to just output the JSON string of the POJO, If you really
> want to add the Java class name then you can try something like this.
>  (org.wso2.models.Student){"name": "Kamal", "age": "26", "city": "Colombo"}
>
> Thanks.
>
> On Wed, Feb 3, 2016 at 1:00 PM, Rajeenthini Satkunam  > wrote:
>
>> HI all,
>>
>> The issue was solved by adding  for
>> jackson-databind,jackson-annotations,jackson-core for POM[1] .
>>
>> By the Way I would like to discuss more regarding this mail.
>>
>> *Issue I am trying to solve*
>>
>>  - I am getting empty JSON string ("{}") when logging Java object.
>>  - Empty JSON string("{}") will give wrong information to user.
>>
>> *Proposed solution*
>>
>>   - give the user proper understandable log message.
>>   - the logging need to be fast and summarized.
>>
>> So I am planning to log in-case of Java object as below without logging
>> whole object.
>> { "javaObject" : true, "hashCode" : "39d92a", "class" :
>> "org.wso2.apim.StoreHostObject"}
>>
>> You can find these links[2][3] as resources to get an idea.
>>
>> [1] -
>> https://github.com/wso2/jaggery/blob/master/features/org.jaggeryjs.server.feature/pom.xml
>> [2] -
>> https://github.com/wso2/jaggery/blob/master/components/hostobjects/org.jaggeryjs.hostobjects.log/src/main/java/org/jaggeryjs/hostobjects/log/LogHostObject.java
>> [3] -
>> https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/src/main/java/org/jaggeryjs/scriptengine/util/HostObjectUtil.java
>>
>>
>> On Wed, Feb 3, 2016 at 10:27 AM, Rajeenthini Satkunam <
>> rajeenth...@wso2.com> wrote:
>>
>>> HI Niranjan,
>>>
>>> Ya sure.I will meet you today.
>>>
>>> On Wed, Feb 3, 2016 at 9:25 AM, Niranjan Karunanandham <
>>> niran...@wso2.com> wrote:
>>>
 Hi Rajeenthini,


 On Wed, Feb 3, 2016 at 9:19 AM, Rajeenthini Satkunam <
 rajeenth...@wso2.com> wrote:

> HI All,
>
> Thank you chamara and sajith for your valuable suggestions.I have done
> the improvement in Jaggery to log the java Object.
>
> improvement
> -
> 1)
> https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/src/main/java/org/jaggeryjs/scriptengine/util/HostObjectUtil.java#L78
>
> Added new code segment as per sajith's suggestion
>
> try{
> return (new ObjectMapper().writeValueAsString(obj));
> }catch (Exception e){
> log.debug("Object " + obj.toString() + " of class " + obj.getClass() 
> + " cannot be converted to JSON");
> }
>
> return "{}";
>
>
> 2) https://github.com/wso2/jaggery/blob/master/pom.xml
>
> Added maven dependencies for Jackson data-bind and annotations
>
> 
> com.fasterxml.jackson.core
> jackson-annotations
> ${jackson.version}
> 
> 
> com.fasterxml.jackson.core
> jackson-databind
> ${jackson.version}
> 
>
> 3) 
> https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/pom.xml
>
> Added maven dependencies for Jackson data-bind and annotations
>
>
> I have tried to build(mvn clean install) Jaggery and product-Jaggery
> respectively.I can build Jaggery successfully But It has failed when
> building product Jaggery at Jaggery - Profile Generation.
>
> As per offline discussion with Niranjan I have added 
> and <*dependency*> for Jackson data-bind and annotation in POM.xml[
> https://github.com/wso2/jaggery/blob/master/features/org.jaggeryjs.server.feature/pom.xml]
> file as below.
>
>>>

Re: [Dev] Running WSO2 Products on Cloud Foundry

2016-02-08 Thread Chamila De Alwis
Hi Nanduni,

Wouldn't writing a custom buildpack (for each product) [1] allow us to
deploy a given artifact on CloudFoundry? We'd have to write the detect,
compile, and release scripts separately.

Is there any difference between that approach and using Docker images?

[1] - https://docs.cloudfoundry.org/buildpacks/custom.html


Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Mon, Feb 8, 2016 at 9:00 AM, Nanduni Nimalsiri  wrote:

> Hi all,
>
> By now, I have managed to deploy applications in Cloud Foundry via,
> 1. bosh-lite ( a vagrant VM that comes with pre-installed BOSH server or
> Director)
> 2. Hosted solutions such as Pivotal web services (pivotal.io)
>
> I deployed Tomcat server in Cloud Foundry as well. But I was not able to
> deploy Docker in Cloud Foundry via Diego. It gives me some errors regarding
> admin permissions.
> I found that there are Heroku buildpacks on Docker and they are perfectly
> compatible with Cloud Foundry too.
>
> [1] https://github.com/duglin/cf-docker
> [1] is another buildpack that supports Docker, but there are several
> limitations as this buildpack requires that you have a Docker host
> available for it to access, and you need to also have a Docker container
> manager app (cf-docker) running that will sync the Cloud Foundry runtime
> with the Docker containers.
>
> My blog in the following link will be useful for any one to get an idea on
> deploying applications in Cloud Foundry.
> http://nanduni.blogspot.com/
>
> Best regards,
> Nanduni.
>
>
>
> *Nanduni Nimalsiri*
> Software Engineering Intern, WSO2 Inc. (http://wso2.com)
> email : nand...@wso2.com
> blog : http://nanduni.blogspot.com/
> mobile : +94714114256
>
>
> On Sun, Feb 7, 2016 at 11:49 PM, Malmee Weerasinghe 
> wrote:
>
>> Hi Imesh,
>>
>> I have done a background research on Cloud Foundry and the blog under the
>> following link contains the documentation of the research. I will include
>> more posts on deploying Cloud Foundry with bosh lite and running simple
>> applications on it, as I have studied so far.
>>
>>
>> http://malmeeweerasinghe.blogspot.com/2016/02/introduction-to-cloud-foundry.html
>>
>> Thanks
>>
>> On Fri, Feb 5, 2016 at 10:31 PM, Imesh Gunaratne  wrote:
>>
>>> Hi All,
>>>
>>> Shall we summarize the research work we have done so far and our
>>> approach towards $subject?
>>>
>>> I know some of us have already done below, it might be better to
>>> document this:
>>>
>>>- PaaS features of CF
>>>- Steps for setting up a local environment with Vagrant
>>>- Running a hello world sample
>>>- Running a JVM using a standalone framework
>>>
>>> Next we might need to check following:
>>>
>>> 1. The ability to use Docker on CF
>>> 2. The process of creating and managing Warden container images
>>> 3. Find a mechanism to discover the member list of a cluster and
>>> implement a Carbon membership scheme
>>> 4. Create standalone frameworks for Carbon products
>>> 5. Find a way to apply patches and software updates
>>> 6. Find a way to implement a centralized logging solution
>>> 7. Check whether there is a way to monitor the health of the containers
>>> (similar to cAdvisor and Cockpit UI in Kubernetes)
>>> 8. Create artifacts required for deploying a Carbon server on CF and
>>> prepare a guideline.
>>>
>>> [1]
>>> https://github.com/wso2/kubernetes-artifacts/tree/master/common/kubernetes-membership-scheme
>>>
>>>
>>> Thanks
>>>
>>> --
>>> *Imesh Gunaratne*
>>> Senior Technical Lead
>>> WSO2 Inc: http://wso2.com
>>> T: +94 11 214 5345 M: +94 77 374 2057
>>> W: http://imesh.io
>>> Lean . Enterprise . Middleware
>>>
>>>
>>
>>
>> --
>> Malmee Weerasinghe
>> WSO2 Intern
>> mobile : (+94)* 71 7601905* |   email :   
>> mal...@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


Re: [Dev] Integrating WSO2 IS with Kubernetes

2016-02-08 Thread Nishadi Kirielle
@Imesh : This configuration has to be done in kube api server. It provides
options to set the authorization mode in 'always allow', 'always deny' or
'ABAC' modes. In using ABAC mode, it provides an option
--authorization-policy-file
  to set the user configured authorization policy. [1]

kube-apiserver --authorization-mode=""
kube-apiserver --authorization-policy-file=""

@Chamila:
+1 for OpenLDAP.

[1].
https://github.com/kubernetes/kubernetes/blob/master/pkg/auth/authorizer/abac/example_policy_file.jsonl


On Tue, Feb 9, 2016 at 7:00 AM, Chamila De Alwis  wrote:

> Hi Nishadi,
>
>
> On Mon, Feb 8, 2016 at 11:11 PM, Nishadi Kirielle 
> wrote:
>
>> My initial plan is to connect a LDAP implementation like OpenDS or
>> ApacheDS with Kubernetes.
>>
>
> Is OpenLDAP[1] not an option? It has a long track record and is the case
> when most user scenarios are considered.
>
>
> [1] - http://www.openldap.org/
>
> Regards,
> Chamila de Alwis
> Committer and PMC Member - Apache Stratos
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>


-- 
*Nishadi Kirielle*
*Software Engineering Intern*
Mobile : +94 (0) 714722148
Blog : http://nishadikirielle.blogspot.com/
nish...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Running WSO2 Products on Cloud Foundry

2016-02-08 Thread Gayan Gunarathne
On Tue, Feb 9, 2016 at 9:55 AM, Malmee Weerasinghe  wrote:

> Hi All,
> As an initiative for the $subject I have deployed Cloud Foundry with BOSH
> Lite, have run some sample applications both in BOSH lite and Pivotal Cloud
> Foundry.
>
> BOSH Lite is a pre-built Vagrant box which includes the BOSH Director. BOSH
> Lite is used for developing and testing releases locally.
>
> Cloud Foundry is now owned by Pivotal software and Pivotal Cloud Foundry
> is a commercial implementation.
>
> I have written two blog posts as an introduction to Cloud Foundry [1] and
> Bosh and Bosh Lite in Cloud Foundry [2].
>
> As an approach to the $subject I am deploying tomcat server in Cloud
> Foundry and am expecting to replace the deployment with a WSO2 product
> (docker).
>

How do you going to deploy the server in Cloud foundry? Did you use
Buildpack? Also Did you check with Diego in the case of docker?

>
> Your suggestions on this subject are highly appreciated.
>
> [1]
> http://malmeeweerasinghe.blogspot.com/2016/02/introduction-to-cloud-foundry.html
> 
> [2]
> http://malmeeweerasinghe.blogspot.com/2016/02/bosh-and-bosh-lite-in-cloud-foundry.html
>
> Thanks
>
> --
> Malmee Weerasinghe
> WSO2 Intern
> mobile : (+94)* 71 7601905* |   email :   
> mal...@wso2.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 IoT Server 1.0.0 M3 Released

2016-02-08 Thread Ruwan Yatawara
Correction :

Only the CDMF master branch was synced with this milestone, merging of CDMF
Plugins, master branch is yet to happen.

Thanks and Regards,

Ruwan Yatawara

Senior Software Engineer,
WSO2 Inc.

email : ruw...@wso2.com
mobile : +94 77 9110413
blog : http://ruwansrants.blogspot.com/
www: :http://wso2.com


On Mon, Feb 8, 2016 at 7:17 PM, Ruwan Yatawara  wrote:

> *WSO2 IoT Server 1.0.0 M3 Released*
> Please find below, download link of the third Milestone of WSO2 IoTServer
> 1.0.0.
>
>
> https://github.com/wso2-incubator/product-iot-server/releases/tag/IoTS-1.0.0-M3
>
>
> The list of new features & Bug fixes are as follows.
>
> Features
>
>- Merging with CDMF/CDMF-Plugins Master Branch
>- New Device Type Implemented (Water Dispenser)
>
>
> Bug Fixes
>
> - [IOTS-30 ] - QR Code is not shown
> when user is added
> - [IOTS-32 ] - Doesn't allow to
> edit a user without adding PW value
> - [IOTS-40 ] - Incorrect
> information sequence on the Drone Analyzer device UI page
> - [IOTS-41 ] - Missing wso2Agent.sh
> file for the Digital Display agent
> - [IOTS-42 ] - Page not navigated
> to success page after adding new user
>
> Sub-task
>
>- Enhanced packaging structure of device types
>
>
>
>
> Thanks and Regards,
>
> *~ EMM / IOT Team ~*
>
>
>
> Thanks and Regards,
>
> Ruwan Yatawara
>
> Senior Software Engineer,
> WSO2 Inc.
>
> email : ruw...@wso2.com
> mobile : +94 77 9110413
> blog : http://ruwansrants.blogspot.com/
> www: :http://wso2.com
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Running WSO2 Products on Cloud Foundry

2016-02-08 Thread Malmee Weerasinghe
Hi All,
As an initiative for the $subject I have deployed Cloud Foundry with BOSH
Lite, have run some sample applications both in BOSH lite and Pivotal Cloud
Foundry.

BOSH Lite is a pre-built Vagrant box which includes the BOSH Director. BOSH
Lite is used for developing and testing releases locally.

Cloud Foundry is now owned by Pivotal software and Pivotal Cloud Foundry is
a commercial implementation.

I have written two blog posts as an introduction to Cloud Foundry [1] and
Bosh and Bosh Lite in Cloud Foundry [2].

As an approach to the $subject I am deploying tomcat server in Cloud
Foundry and am expecting to replace the deployment with a WSO2 product
(docker).

Your suggestions on this subject are highly appreciated.

[1]
http://malmeeweerasinghe.blogspot.com/2016/02/introduction-to-cloud-foundry.html

[2]
http://malmeeweerasinghe.blogspot.com/2016/02/bosh-and-bosh-lite-in-cloud-foundry.html

Thanks

-- 
Malmee Weerasinghe
WSO2 Intern
mobile : (+94)* 71 7601905* |   email :   
mal...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Retrieve Development Support Hours from SalesForce

2016-02-08 Thread Lakmini Chathurika
Hi Nirodha,

I used only one datastream .(Data Stream:  SALESFORCE_DATA_STREAM_1 Version
: 1.0.1)

Thanks & Regards.

On Mon, Feb 8, 2016 at 10:54 PM, Nirodha Gallage  wrote:

> +1 for this approach. BTW are we planning to write the data from two
> streams to the same table?
>
> On Mon, Feb 8, 2016 at 8:59 PM, Lakmini Chathurika 
> wrote:
>
>> Hi All,
>>
>> I wrote a proxy service to get development support hours from salesforce .
>> In here I got the data from two tables Line_Item__c  and Opportunity.
>> Because in salesforce Line_Item__c table keeps the records before January
>> and Opportunity table keeps the records January onwards.
>> In the proxy first I wrote a SOQL query to get the data from Line_Item__c
>> table and published to DAS through the data stream
>> "SALESFORCE_DATA_STREAM_1".
>> Then I wrote another SOQL query to get the data from Opportunity table
>> and published to DAS through the same datastream.
>>
>> The Proxy is as shown below.
>>
>> 
>> http://ws.apache.org/ns/synapse";
>>name="SalesForceProxy"
>>transports="https,http"
>>statistics="disable"
>>trace="disable"
>>startOnLoad="true">
>>
>>   
>>  
>>  
>> 200
>> SELECT  LastModifiedDate, Support_Account_ID__c,
>> Dev_Support_Hours__c FROM
>> Line_Item__c WHERE Support_Account_ID__c != 'NULL' AND
>> Support_Account_ID__c != '' AND Support_Account_ID__c
>> LIKE '%DEV' ORDER BY LastModifiedDate DESC NULLS
>> FIRST
>>  
>>  
>>  >   continueParent="true"
>>   id="Iterator_line_item"
>>   expression="//sfn:records"
>>   sequential="true">
>> 
>>
>>   
>>  UD_DAS
>>  SALESFORCE_DATA_STREAM_1
>>  1.0.1
>>  
>> 
>> 
>> 
>>>   name="SupportAccountKey"
>>   type="STRING"
>>   defaultValue=""
>>
>> expression="//sf:Support_Account_ID__c"/>
>>>   name="DevelopmentSupportHours"
>>   type="STRING"
>>   defaultValue=""
>>
>> expression="//sf:Dev_Support_Hours__c"/>
>>>   name="LastModifiedDate"
>>   type="STRING"
>>   defaultValue=""
>>   expression="//sf:LastModifiedDate"/>
>> 
>> 
>>  
>>   
>>
>> 
>>  
>>
>>   
>>   
>> 200
>> SELECT
>> Development_Support_Account_Key__c,Development_Support_Hours__c,LastModifiedDate
>> from Opportunity
>> WHERE Development_Support_Account_Key__c !='NULL' AND
>> Development_Support_Account_Key__c !=''AND
>> Development_Support_Account_Key__c
>> LIKE '%DEV' ORDER BY LastModifiedDate DESC NULLS
>> FIRST
>>  
>>  
>> >   name="valueyy"
>>   expression="//sf:Development_Support_Hours__c"/>
>>  
>>  >   id="RecordsIterator"
>>   expression="//sfn:records"
>>   sequential="true">
>> 
>>
>>   
>>  UD_DAS
>>  SALESFORCE_DATA_STREAM_1
>>  1.0.1
>>  
>> 
>> 
>> 
>>>   name="SupportAccountKey"
>>   type="STRING"
>>   defaultValue=""
>>
>> expression="//sf:Development_Support_Account_Key__c"/>
>>>   name="DevelopmentSupportHours"
>>   type="STRING"
>>   defaultValue=""
>>
>> expression="//sf:Development_Support_Hours__c"/>
>>>   name="LastModifiedDate"
>>   type="STRING"
>>   defaultValue=""
>>   expression="//sf:LastModifiedDate"/>
>> 
>> 
>>  
>>   
>>
>> 
>>  
>>   
>>
>>
>> 
>>
>>
>> Is it ok to get data from these two tables like 

Re: [Dev] [VOTE] Release WSO2 Message Broker 3.1.0 RC 2

2016-02-08 Thread Akalanka Pagoda Arachchi
Hi Devs,

Thanks for testing and verifying the WSO2 Message Broker 3.1.0 RC2. We are
closing this vote now. This vote has passed with 6 +1s and 0 -1s. Therefore
we are proceeding with the WSO2 Message Broker 3.1.0 release.

Thanks & Regards,
Message Broker Team

On Fri, Feb 5, 2016 at 5:47 PM, Hasitha Amal De Silva 
wrote:

> Verified Sample [1] in addition to above tests with ESB 4.9.0 for MQTT.
>
> [1] :
> https://docs.wso2.com/display/ESB490/Sample+272%3AMQTT+axis2+transport
>
>
>
> On Fri, Feb 5, 2016 at 4:59 PM, Hasitha Amal De Silva 
> wrote:
>
>> Checked integration with WSO2 ESB in terms of topics,queues and
>> synchronous / asynchronous publishing and subscribing for JMS.
>>
>> [+] Stable - go ahead and release.
>>
>> Cheers
>>
>> On Fri, Feb 5, 2016 at 1:03 PM, Sasikala Kottegoda 
>> wrote:
>>
>>> Tested the usual test scenarios in a clustered deployment by using the
>>> test suite.
>>>
>>> [+] Stable - go ahead and release
>>>
>>> Thank you,
>>> Sasikala
>>>
>>> On Fri, Feb 5, 2016 at 12:21 PM, Akalanka Pagoda Arachchi <
>>> darsha...@wso2.com> wrote:
>>>
 Test UI scenarios by running UI Tests.

 [+] Stable - go ahead and release

 On Fri, Feb 5, 2016 at 12:00 PM, Hemika Kodikara 
 wrote:

> Tested Failover for queues and durable topics.
>
> [+] Stable - go ahead and release
>
> Thanks,
> Hemika
>
> Hemika Kodikara
> Software Engineer
> WSO2 Inc.
> lean . enterprise . middleware
> http://wso2.com
>
> Mobile : +9477762
>
> On Fri, Feb 5, 2016 at 11:55 AM, Pamod Sylvester 
> wrote:
>
>> Tested MQTT, by running the interop test suite.
>>
>> [+] Stable - go ahead and release
>>
>> Thanks,
>> Pamod
>>
>> On Fri, Feb 5, 2016 at 11:53 AM, Ramith Jayasinghe 
>> wrote:
>>
>>> I tested samples (with compression flag on)
>>>
>>> [+] Stable - go ahead and release
>>>
>>> On Thu, Feb 4, 2016 at 3:25 AM, Akalanka Pagoda Arachchi
>>>  wrote:
>>> > Hi Devs,
>>> >
>>> > This is the second release candidate of WSO2 Message Broker 3.1.0.
>>> >
>>> > This release fixes the following issues:
>>> > https://wso2.org/jira/issues/?filter=12637
>>> >
>>> > Please download MB 3.1.0 RC2 and test the functionality and vote.
>>> Vote will
>>> > be open for 72 hours or as needed.
>>> >
>>> > Source & binary distribution files:
>>> > https://github.com/wso2/product-mb/releases/tag/v3.1.0-RC2
>>> >
>>> > Maven staging repo:
>>> > http://maven.wso2.org/nexus/content/repositories/orgwso2mb-323/
>>> >
>>> > The tag to be voted upon:
>>> > https://github.com/wso2/product-mb/tree/v3.1.0-RC2
>>> >
>>> >
>>> > [+] Stable - go ahead and release
>>> > [-]  Broken - do not release (explain why)
>>> >
>>> > Thanks and Regards,
>>> >
>>> > ~ WSO2 MB Team ~
>>> >
>>> > --
>>> > Darshana Akalanka Pagoda Arachchi,
>>> > Software Engineer
>>> > 078-4721791
>>> >
>>> > ___
>>> > Dev mailing list
>>> > Dev@wso2.org
>>> > http://wso2.org/cgi-bin/mailman/listinfo/dev
>>> >
>>>
>>>
>>>
>>> --
>>> Ramith Jayasinghe
>>> Technical Lead
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> E: ram...@wso2.com
>>> P: +94 777542851
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>
>>
>>
>> --
>> *Pamod Sylvester *
>>
>> *WSO2 Inc.; http://wso2.com *
>> cell: +94 77 7779495
>>
>> ___
>> 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
>
>


 --
 *Darshana Akalanka Pagoda Arachchi,*
 *Software Engineer*
 *078-4721791*

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


>>>
>>>
>>> --
>>> Sasikala Kottegoda
>>> *Software Engineer*
>>> WSO2 Inc., http://wso2.com/
>>> lean. enterprise. middleware
>>> Mobile: +94 774835928/712792401
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Cheers,
>>
>> Hasitha Amal De Silva
>> Software Engineer
>> Mobile : 0772037426
>> Blog: http://devnutshell.tumblr.com/
>> WSO2 Inc.: http://wso2.com ( lean.enterprise.middleware. )
>>
>
>
>
> --
> Cheers,
>
> Hasitha Amal De Silva
> Software Engineer
> Mobile : 0772037426
> Blog: http://dev

Re: [Dev] Integrating WSO2 IS with Kubernetes

2016-02-08 Thread Chamila De Alwis
Hi Nishadi,


On Mon, Feb 8, 2016 at 11:11 PM, Nishadi Kirielle  wrote:

> My initial plan is to connect a LDAP implementation like OpenDS or
> ApacheDS with Kubernetes.
>

Is OpenLDAP[1] not an option? It has a long track record and is the case
when most user scenarios are considered.


[1] - http://www.openldap.org/

Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Integrating WSO2 IS with Kubernetes

2016-02-08 Thread Imesh Gunaratne
Hi Nishadi,

On Mon, Feb 8, 2016 at 11:11 PM, Nishadi Kirielle  wrote:

> Hi All,
>
> As a initial step to be familiar with Kubernetes, I have set up a
> Kubernetes cluster and deployed some sample applications. [1] [2]
>
> In K8s, authorization and authentication happen as two separate steps.
> Available authorization implementations are as follows;
>
>- --authorization-mode=AlwaysDeny
>- --authorization-mode=AlwaysAllow
>- --authorization-mode=ABAC (user configured authorization policy)
>
> Where do we make this configuration?

Thanks

> Authentication policy basically uses client certificates, tokens or http
> basic auth to authenticate users for API calls.
>
> In accessing K8s API, although the provided command line interface is
> *kubectl*, in programmatic approach there are several client libraries
> for accessing K8s API from several languages. [3]
>
> My initial plan is to connect a LDAP implementation like OpenDS or
> ApacheDS with Kubernetes.
> Any suggestions are highly appreciated.
>
> Thanks
>
> [1].
> http://nishadikirielle.blogspot.com/2016/02/getting-started-with-kubernetes.html
> [2].
> http://nishadikirielle.blogspot.com/2016/02/kubernetes-at-first-glance.html
> [3]. http://kubernetes.io/v1.1/docs/devel/client-libraries.html
>
> --
> Nishadi Kirielle
> *Software Engineering Intern*
> Mobile : +94 (0) 714722148
> nish...@wso2.com
>



-- 
*Imesh Gunaratne*
Senior Technical Lead
WSO2 Inc: http://wso2.com
T: +94 11 214 5345 M: +94 77 374 2057
W: http://imesh.gunaratne.org
Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Integrating WSO2 IS with Kubernetes

2016-02-08 Thread Nishadi Kirielle
Hi All,

As a initial step to be familiar with Kubernetes, I have set up a
Kubernetes cluster and deployed some sample applications. [1] [2]

In K8s, authorization and authentication happen as two separate steps.
Available authorization implementations are as follows;

   - --authorization-mode=AlwaysDeny
   - --authorization-mode=AlwaysAllow
   - --authorization-mode=ABAC (user configured authorization policy)

Authentication policy basically uses client certificates, tokens or http
basic auth to authenticate users for API calls.

In accessing K8s API, although the provided command line interface is
*kubectl*, in programmatic approach there are several client libraries for
accessing K8s API from several languages. [3]

My initial plan is to connect a LDAP implementation like OpenDS or ApacheDS
with Kubernetes.
Any suggestions are highly appreciated.

Thanks

[1].
http://nishadikirielle.blogspot.com/2016/02/getting-started-with-kubernetes.html
[2].
http://nishadikirielle.blogspot.com/2016/02/kubernetes-at-first-glance.html
[3]. http://kubernetes.io/v1.1/docs/devel/client-libraries.html

-- 
Nishadi Kirielle
*Software Engineering Intern*
Mobile : +94 (0) 714722148
nish...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Retrieve Development Support Hours from SalesForce

2016-02-08 Thread Nirodha Gallage
+1 for this approach. BTW are we planning to write the data from two
streams to the same table?

On Mon, Feb 8, 2016 at 8:59 PM, Lakmini Chathurika  wrote:

> Hi All,
>
> I wrote a proxy service to get development support hours from salesforce .
> In here I got the data from two tables Line_Item__c  and Opportunity.
> Because in salesforce Line_Item__c table keeps the records before January
> and Opportunity table keeps the records January onwards.
> In the proxy first I wrote a SOQL query to get the data from Line_Item__c
> table and published to DAS through the data stream
> "SALESFORCE_DATA_STREAM_1".
> Then I wrote another SOQL query to get the data from Opportunity table and
> published to DAS through the same datastream.
>
> The Proxy is as shown below.
>
> 
> http://ws.apache.org/ns/synapse";
>name="SalesForceProxy"
>transports="https,http"
>statistics="disable"
>trace="disable"
>startOnLoad="true">
>
>   
>  
>  
> 200
> SELECT  LastModifiedDate, Support_Account_ID__c,
> Dev_Support_Hours__c FROM
> Line_Item__c WHERE Support_Account_ID__c != 'NULL' AND
> Support_Account_ID__c != '' AND Support_Account_ID__c
> LIKE '%DEV' ORDER BY LastModifiedDate DESC NULLS
> FIRST
>  
>  
> continueParent="true"
>   id="Iterator_line_item"
>   expression="//sfn:records"
>   sequential="true">
> 
>
>   
>  UD_DAS
>  SALESFORCE_DATA_STREAM_1
>  1.0.1
>  
> 
> 
> 
>   name="SupportAccountKey"
>   type="STRING"
>   defaultValue=""
>
> expression="//sf:Support_Account_ID__c"/>
>   name="DevelopmentSupportHours"
>   type="STRING"
>   defaultValue=""
>
> expression="//sf:Dev_Support_Hours__c"/>
>   name="LastModifiedDate"
>   type="STRING"
>   defaultValue=""
>   expression="//sf:LastModifiedDate"/>
> 
> 
>  
>   
>
> 
>  
>
>   
>   
> 200
> SELECT
> Development_Support_Account_Key__c,Development_Support_Hours__c,LastModifiedDate
> from Opportunity
> WHERE Development_Support_Account_Key__c !='NULL' AND
> Development_Support_Account_Key__c !=''AND
> Development_Support_Account_Key__c
> LIKE '%DEV' ORDER BY LastModifiedDate DESC NULLS
> FIRST
>  
>  
>name="valueyy"
>   expression="//sf:Development_Support_Hours__c"/>
>  
> id="RecordsIterator"
>   expression="//sfn:records"
>   sequential="true">
> 
>
>   
>  UD_DAS
>  SALESFORCE_DATA_STREAM_1
>  1.0.1
>  
> 
> 
> 
>   name="SupportAccountKey"
>   type="STRING"
>   defaultValue=""
>
> expression="//sf:Development_Support_Account_Key__c"/>
>   name="DevelopmentSupportHours"
>   type="STRING"
>   defaultValue=""
>
> expression="//sf:Development_Support_Hours__c"/>
>   name="LastModifiedDate"
>   type="STRING"
>   defaultValue=""
>   expression="//sf:LastModifiedDate"/>
> 
> 
>  
>   
>
> 
>  
>   
>
>
> 
>
>
> Is it ok to get data from these two tables like this or are there any
> better solutions to do this?
> Any suggestions are highly appreciated.
>
> Thanks & Regards.
> Lakmini.
>
>
>
>
>


-- 

*Nirodha Gallage*
Associate Technical Lead, QA.
WSO2 Inc.: http://wso2.com/
Mobile: +94716429078
___
Dev mailing list
Dev@wso2.org
ht

Re: [Dev] Issue when starting the server - SSLException: Connection has been shutdown

2016-02-08 Thread Imesh Gunaratne
On Wed, Feb 3, 2016 at 1:46 AM, Vishanth Balasubramaniam  wrote:

> Hi Dilini,
>
> Try commenting out the rest of the properties in H2DatabaseConfiguration
> in carbon.xml.
>
> 
>> 
>> 8082
>> 
>>
>> **
>> 
>
>
> Can you please explain the reason for this?

Thanks


> Regards,
> Vishanth
>
> On Tue, Feb 2, 2016 at 5:37 PM, Dilini Gunatilake 
> wrote:
>
>> Hi Carbon Team,
>>
>> I wanted to browse the H2 repository and followed the blog in [1] and
>> configured the carbon.xml file accordingly. But, when I started the pack, I
>> observed the following error. What could be the reason for this?
>>
>> This issue was observed in WSO2 ESB 4.10.0-Milestone 2 and DS 2.0.0 Beta
>> 2 packs. (carbon 4.4.3)
>>
>> ubuntu@ds-long-n1:~/releases/wso2ds-2.0.0-SNAPSHOT/bin$ sh wso2server.sh
>> JAVA_HOME environment variable is set to /home/ubuntu/software/jdk1.8.0_51
>> CARBON_HOME environment variable is set to
>> /home/ubuntu/releases/wso2ds-2.0.0-SNAPSHOT
>> Using Java memory options: -Xms256m -Xmx1024m
>>
>> [2016-02-02 11:26:27,394]  INFO
>> {org.wso2.carbon.h2.osgi.console.ConsoleService} -  Starting H2 Web
>> server...
>> [2016-02-02 11:26:28,006]  INFO
>> {org.wso2.carbon.h2.osgi.console.ConsoleService} -  Starting H2 TCP
>> server...
>> [2016-02-02 11:26:28,030]  INFO
>> {org.wso2.carbon.h2.osgi.console.ConsoleService} -  Starting H2 PG server...
>> org.h2.server.TcpServerThread@273ec7dc Connect
>> Connect
>> Disconnect
>> Close
>> javax.net.ssl.SSLException: Connection has been shutdown:
>> javax.net.ssl.SSLHandshakeException: Remote host closed connection during
>> handshake
>> at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1541)
>> at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1553)
>> at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:71)
>> at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
>> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
>> at java.io.DataOutputStream.flush(DataOutputStream.java:123)
>> at org.h2.value.Transfer.flush(Transfer.java:85)
>> at org.h2.server.TcpServerThread.sendError(TcpServerThread.java:197)
>> at org.h2.server.TcpServerThread.run(TcpServerThread.java:129)
>> at java.lang.Thread.run(Thread.java:745)
>> Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed
>> connection during handshake
>> at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:992)
>> at
>> sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
>> at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:928)
>> at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
>> at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
>> at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
>> at java.io.DataInputStream.readInt(DataInputStream.java:387)
>> at org.h2.value.Transfer.readInt(Transfer.java:145)
>> at org.h2.server.TcpServerThread.run(TcpServerThread.java:71)
>> ... 1 more
>> Caused by: java.io.EOFException: SSL peer shut down incorrectly
>> at sun.security.ssl.InputRecord.read(InputRecord.java:505)
>> at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
>> ... 9 more
>> org.h2.server.TcpServerThread@273ec7dc Disconnect
>> org.h2.server.TcpServerThread@273ec7dc Close
>> [2016-02-02 11:26:29,170]  INFO
>> {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Starting WSO2
>> Carbon...
>> [2016-02-02 11:26:29,177]  INFO
>> {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Operating System :
>> Linux 3.13.0-36-generic, amd64
>> [2016-02-02 11:26:29,177]  INFO
>> {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Home:
>> /home/ubuntu/software/jdk1.8.0_51/jre
>> [2016-02-02 11:26:29,178]  INFO
>> {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java Version :
>> 1.8.0_51
>> [2016-02-02 11:26:29,181]  INFO
>> {org.wso2.carbon.core.internal.CarbonCoreActivator} -  Java VM  :
>> Java HotSpot(TM) 64-Bit Server VM 25.51-b03,Oracle Corporation
>>
>>
>> [1]
>> http://www.vitharana.org/2012/04/how-to-browse-h2-database-of-wso2.html
>>
>>
>> Thank you.
>>
>> Regards,
>>
>> --
>>
>> *Dilini GunatilakeSoftware Engineer - QA Team*
>> Mobile : +94 (0) 771 162518
>> dili...@wso2.com
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Vishanth Balasubramaniam*
> Committer & PMC Member, Apache Stratos,
> Software Engineer, WSO2 Inc.; http://wso2.com
>
> mobile: *+94 77 17 377 18*
> about me: *http://about.me/vishanth *
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Imesh Gunaratne*
Senior Technical Lead
WSO2 Inc: http://wso2.com
T: +94 11 214 5345 M: +94 77 374 2057
W: http://imesh.gunaratne.org
Lean . Enterprise . Middleware
_

[Dev] Retrieve Development Support Hours from SalesForce

2016-02-08 Thread Lakmini Chathurika
Hi All,

I wrote a proxy service to get development support hours from salesforce .
In here I got the data from two tables Line_Item__c  and Opportunity.
Because in salesforce Line_Item__c table keeps the records before January
and Opportunity table keeps the records January onwards.
In the proxy first I wrote a SOQL query to get the data from Line_Item__c
table and published to DAS through the data stream
"SALESFORCE_DATA_STREAM_1".
Then I wrote another SOQL query to get the data from Opportunity table and
published to DAS through the same datastream.

The Proxy is as shown below.


http://ws.apache.org/ns/synapse";
   name="SalesForceProxy"
   transports="https,http"
   statistics="disable"
   trace="disable"
   startOnLoad="true">
   
  
 
 
200
SELECT  LastModifiedDate, Support_Account_ID__c,
Dev_Support_Hours__c FROM
Line_Item__c WHERE Support_Account_ID__c != 'NULL' AND
Support_Account_ID__c != '' AND Support_Account_ID__c
LIKE '%DEV' ORDER BY LastModifiedDate DESC NULLS
FIRST
 
 
 

   
  
 UD_DAS
 SALESFORCE_DATA_STREAM_1
 1.0.1
 



   
   
   


 
  
   

 

  
  
200
SELECT
Development_Support_Account_Key__c,Development_Support_Hours__c,LastModifiedDate
from Opportunity
WHERE Development_Support_Account_Key__c !='NULL' AND
Development_Support_Account_Key__c !=''AND
Development_Support_Account_Key__c
LIKE '%DEV' ORDER BY LastModifiedDate DESC NULLS
FIRST
 
 

 
 

   
  
 UD_DAS
 SALESFORCE_DATA_STREAM_1
 1.0.1
 



   
   
   


 
  
   

 
  
   
   



Is it ok to get data from these two tables like this or are there any
better solutions to do this?
Any suggestions are highly appreciated.

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


[Dev] WSO2 IoT Server 1.0.0 M3 Released

2016-02-08 Thread Ruwan Yatawara
*WSO2 IoT Server 1.0.0 M3 Released*
Please find below, download link of the third Milestone of WSO2 IoTServer
1.0.0.

https://github.com/wso2-incubator/product-iot-server/releases/tag/IoTS-1.0.0-M3


The list of new features & Bug fixes are as follows.

Features

   - Merging with CDMF/CDMF-Plugins Master Branch
   - New Device Type Implemented (Water Dispenser)


Bug Fixes

- [IOTS-30 ] - QR Code is not shown
when user is added
- [IOTS-32 ] - Doesn't allow to edit
a user without adding PW value
- [IOTS-40 ] - Incorrect information
sequence on the Drone Analyzer device UI page
- [IOTS-41 ] - Missing wso2Agent.sh
file for the Digital Display agent
- [IOTS-42 ] - Page not navigated to
success page after adding new user

Sub-task

   - Enhanced packaging structure of device types




Thanks and Regards,

*~ EMM / IOT Team ~*



Thanks and Regards,

Ruwan Yatawara

Senior Software Engineer,
WSO2 Inc.

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


Re: [Dev] Can we get the underling transport details from the CarbonTransport

2016-02-08 Thread Isuru Udana
Hi Jayanga,

On Mon, Feb 8, 2016 at 11:17 AM, Jayanga Dissanayake 
wrote:

> Hi All,
>
> Currently I am working on the feature, axis2 pluggable run-time on C5
> kernel.
> In this feature I had to register Dummy listeners to Axis2, which are
> corresponding to each Carbon Transport.
>
> When I tried to implement the processing related to "GET
> /services/Someservice?wsdl", I found that, It internally invokes the
> "public EndpointReference[] getEPRsForService(String s, String s1)" of each
> listener, in which I have to return proper EPRs. To generate proper EPRs, I
> need to know the ports which are corresponding to each Listener (in HTTP
> and HTTPS scenarios).
>
> I checked the CarbonTransport, it doesn't allow to read the information
> related to the ports.
>
> Why CarbonTransport does not allow to get underling transport details?
>
It is not something we have done intentionally (missing functionality). We
have to provide that functionality from Netty http transport level.

Thanks.

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



-- 
*Isuru Udana*
Associate Technical Lead
WSO2 Inc.; http://wso2.com
email: isu...@wso2.com cell: +94 77 3791887
blog: http://mytecheye.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Fwd: Error while creating init for 4.10

2016-02-08 Thread Malaka Silva
Hi,

I guess it does not support dynamic names (expression) when persiting.If do
go ahead with script mediator.

@Nadeeshaan - Can you please confirm.

-- Forwarded message --
From: Hariprasath Thanarajah 
Date: Mon, Feb 8, 2016 at 4:30 PM
Subject: Error while creating init for 4.10
To: Malaka Silva 
Cc: Keerthika Mahendralingam , Kesavan Yogarajah <
kesav...@wso2.com>


Hi Malaka,

IMHO we can create the salesforce REST connector will support all the ESB
versions. Since there are no difference in performance while we are using
script or property mediator.
Is there any particular reason to create Salesforce REST for 4.10 only by
using property mediator?

I have an issue in use the user defined path to store the values in
registry using property mediator.

This is how i used to store the value in Registry.


Here the value is store in $ctx:uei.var.timeRegistryPath

and

If i using this,



 i got the below error,

ERROR - WSO2Registry Error while saving a resource at
get-property('uri.var.timeRegistryPath')
org.wso2.carbon.registry.core.exceptions.RegistryException: The path
'/_system/governance/get-property('uri.var.timeRegistryPath')' contains one
or more illegal characters (~!@#;%^*()+={}|\<>"',)
at
org.wso2.carbon.registry.core.jdbc.Repository.put(Repository.java:262)
at
org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.put(EmbeddedRegistry.java:709)
at
org.wso2.carbon.registry.core.caching.CacheBackedRegistry.put(CacheBackedRegistry.java:508)
at
org.wso2.carbon.registry.core.session.UserRegistry.putInternal(UserRegistry.java:824)
at
org.wso2.carbon.registry.core.session.UserRegistry.access$1000(UserRegistry.java:60)
at
org.wso2.carbon.registry.core.session.UserRegistry$11.run(UserRegistry.java:800)
at
org.wso2.carbon.registry.core.session.UserRegistry$11.run(UserRegistry.java:797)
at java.security.AccessController.doPrivileged(Native Method)
at
org.wso2.carbon.registry.core.session.UserRegistry.put(UserRegistry.java:797)
at
org.wso2.carbon.mediation.registry.WSO2Registry.newNonEmptyResource(WSO2Registry.java:360)
at
org.apache.synapse.mediators.builtin.PropertyMediator.mediate(PropertyMediator.java:193)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
at
org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:236)
at
org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:240)
at
org.apache.synapse.mediators.template.InvokeMediator.mediate(InvokeMediator.java:169)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:273)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:728)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:273)
at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:529)
at
org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at
org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:251)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[2016-02-08 16:01:03,099]  INFO - LogMediator To:
http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: ,
MessageID: urn:uuid:24c7cbf4-5793-45b1-8cfa-0e8cbee6fd3e, Direction:
request, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 0,
ERROR_MESSAGE = Error while saving a resource at
get-property('uri.var.timeRegistryPath'), Payload:
{"access_token":"00D28017q6q!AQoAQElnJSR6Y3gtxVfqDa_OJl38YmOGJscq6iDCZ.6lfkWSCsmmWp9d669_vWAmL9wnWdbuogXNpDMB_MHQCAjDOWHuRZdL","signature":"9XnwazD8C9igR3rEc9y4BNpea60J5z1e3ABj72r6BuY=","scope":"visualforce
refresh_token wave_api web custom_permissions openid chatter_api api id
full","instance_url":"https://ap2.salesforce.com","id":";
https://login.salesforce.com/id/00D28017q6qEAA/0052801m5RRAAY
","token_type":"Bearer","issued_at":"1454927462120"}

Can i use the script mediator to store the values in Registry?

-- 


*Thank you and Regards**Hariprasath Thanarajah*
Associate Software Engineer | WSO2
E: haripras...@wso2.com
M: +94752806528




-- 

Best Regards,

Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
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
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/


Re: [Dev] [ESB] Http Endpoint Template Documentation

2016-02-08 Thread Nisrin Sheriff
Hi Chathurika,

Looks like this is missing in older versions of ESB docs as well. I checked
in the management consoles of versions 4.8.0, 4.8.1 as well and it seems to
be there.

So I'll check with the ESB team about the version that this was introduced
and add this to the relevant docs.

Will resolve the JIRA once I add the info to the relevant docs.

Thank you

Nisrin Sheriff
Senior Technical Writer

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

On Mon, Feb 8, 2016 at 2:09 PM, Chathurika De Silva 
wrote:

> Hi Nisrin
>
> I couldn't find related documentation on $subject in either [1] or [2]. Is
> there any reason why it's not added? For reference i have recorded a doc
> jira [3] as well
>
> [1] https://docs.wso2.com/display/ESB4100/Adding+a+New+Endpoint+Template
> [2] https://docs.wso2.com/display/ESB490/Adding+a+New+Endpoint+Template
> [3] https://wso2.org/jira/browse/DOCUMENTATION-3010
>
> Thank You
> Erandi
>
> --
> *Chathurika Erandi*
> Software Engineer,
> WSO2 Inc.
>
> *E-mail:* chathuri...@wso2.com
> *Mobile: *+94714 328 612
> *Blog*: chathurikaerandi.blogspot.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] MSF4J dependency resolving failure in gen code from swagger codegen

2016-02-08 Thread Awanthika Senarath
Thanks Samiyuru,

Will attend to this.

I'm not quite sure whether we can do the formatting though.

Regards
Awanthika

Awanthika Senarath
Software Engineer, WSO2 Inc.
Mobile: +94717681791



On Mon, Feb 8, 2016 at 2:27 PM, Samiyuru Senarathne 
wrote:

> Hi,
>
> Structure and the used pattern looks fine. Apart from them,
>
>- We have to remove NotFoundException from the API and implementation
>since that is not how MSF4J send responses in error cases.
>- We can remove ApiResponseMessage class.
>- Can we fix the formatting of the generated code?
>- Can we remove the unused imports? (IE import java.io.InputStream; in
>StockQuoteApiService)
>
> Best Regards,
> Samiyuru
>
> On Mon, Feb 8, 2016 at 1:50 PM, Awanthika Senarath 
> wrote:
>
>> Hi Samyuru,
>>
>> I have edited the swagger codegen tool configurations and removed all
>> unnecessary code being generated. This includes the servlet related codes
>> and swagger annotations
>>
>> Please verify the attached folder structure and content to be of the
>> expected form for the MSF4J server.
>>
>>
>> Please let me know of any further modifications needed.
>>
>> Regards
>> Awanthika
>>
>> Awanthika Senarath
>> Software Engineer, WSO2 Inc.
>> Mobile: +94717681791
>>
>>
>>
>> On Fri, Feb 5, 2016 at 7:00 PM, Awanthika Senarath 
>> wrote:
>>
>>> Hi Samiyuru,
>>>
>>> Thanks! will try with a simpler use case.
>>>
>>> Regards
>>> Awanthika
>>>
>>> Awanthika Senarath
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94717681791
>>>
>>>
>>>
>>> On Fri, Feb 5, 2016 at 9:55 AM, Samiyuru Senarathne 
>>> wrote:
>>>
 Hi,

 Those classes you were refering are not MSF4J service classes.
 Therefore, we don't have to consider them with the tool. IMO, since
 Pet-Sore sample is bit complex it's better if you could first work with
 samples other than the Pet-Store to get the tool running.

 Best Regards,
 Samiyuru

 On Thu, Feb 4, 2016 at 11:27 AM, Awanthika Senarath >>> > wrote:

>
> Hi Samiyuru,
>
> MSF4J tool generated code build fails with the following errors [1].
>
> These imports are introduced by the swagger codegen library we are
> using. I am working on changing these imports to the imports that are
> supported by the MSF4J team.
>
> In going through your petstore sample I could observe the imports [3]
> in the class [2].
>
> I tried building the petstore sample and it builds fine. Could you
> please let me know what causes the build break in the gen code of the
> swagger codegen library? I have attached the gen code.
>
>
> [1]
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.3:compile
> (default-compile) on project SampleTestProjectUsed: Compilation failure:
> Compilation failure:
> [ERROR]
> /home/awanthika/WSO2/master-source/mss-tooling/eclipse-project/runtime-New_configuration/SampleTestProjectUsed/src/main/java/org/wso2/sampole/api/ApiOriginFilter.java:[5,1]
> package javax.servlet does not exist
> [ERROR]
> /home/awanthika/WSO2/master-source/mss-tooling/eclipse-project/runtime-New_configuration/SampleTestProjectUsed/src/main/java/org/wso2/sampole/api/ApiOriginFilter.java:[6,26]
> package javax.servlet.http does not exist
> [ERROR]
> /home/awanthika/WSO2/master-source/mss-tooling/eclipse-project/runtime-New_configuration/SampleTestProjectUsed/src/main/java/org/wso2/sampole/api/ApiOriginFilter.java:[9,54]
> package javax.servlet does not exist
>
>
> [2]package
> org.wso2.msf4j.examples.petstore.util.fe.security.LoginFilter.java;
>
> [3]
> import javax.servlet.ServletException;
> import javax.servlet.ServletRequest;
> import javax.servlet.ServletResponse;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
>
>
> Regards
> Awanthika Senarath
> Software Engineer, WSO2 Inc.
> Mobile: +94717681791
>
>
>


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

>>>
>>>
>>
>
>
> --
> Samiyuru Senarathne
> *Software Engineer*
> Mobile : +94 (0) 71 134 6087
> samiy...@wso2.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] MSF4J dependency resolving failure in gen code from swagger codegen

2016-02-08 Thread Samiyuru Senarathne
Hi,

Structure and the used pattern looks fine. Apart from them,

   - We have to remove NotFoundException from the API and implementation
   since that is not how MSF4J send responses in error cases.
   - We can remove ApiResponseMessage class.
   - Can we fix the formatting of the generated code?
   - Can we remove the unused imports? (IE import java.io.InputStream; in
   StockQuoteApiService)

Best Regards,
Samiyuru

On Mon, Feb 8, 2016 at 1:50 PM, Awanthika Senarath 
wrote:

> Hi Samyuru,
>
> I have edited the swagger codegen tool configurations and removed all
> unnecessary code being generated. This includes the servlet related codes
> and swagger annotations
>
> Please verify the attached folder structure and content to be of the
> expected form for the MSF4J server.
>
>
> Please let me know of any further modifications needed.
>
> Regards
> Awanthika
>
> Awanthika Senarath
> Software Engineer, WSO2 Inc.
> Mobile: +94717681791
>
>
>
> On Fri, Feb 5, 2016 at 7:00 PM, Awanthika Senarath 
> wrote:
>
>> Hi Samiyuru,
>>
>> Thanks! will try with a simpler use case.
>>
>> Regards
>> Awanthika
>>
>> Awanthika Senarath
>> Software Engineer, WSO2 Inc.
>> Mobile: +94717681791
>>
>>
>>
>> On Fri, Feb 5, 2016 at 9:55 AM, Samiyuru Senarathne 
>> wrote:
>>
>>> Hi,
>>>
>>> Those classes you were refering are not MSF4J service classes.
>>> Therefore, we don't have to consider them with the tool. IMO, since
>>> Pet-Sore sample is bit complex it's better if you could first work with
>>> samples other than the Pet-Store to get the tool running.
>>>
>>> Best Regards,
>>> Samiyuru
>>>
>>> On Thu, Feb 4, 2016 at 11:27 AM, Awanthika Senarath 
>>> wrote:
>>>

 Hi Samiyuru,

 MSF4J tool generated code build fails with the following errors [1].

 These imports are introduced by the swagger codegen library we are
 using. I am working on changing these imports to the imports that are
 supported by the MSF4J team.

 In going through your petstore sample I could observe the imports [3]
 in the class [2].

 I tried building the petstore sample and it builds fine. Could you
 please let me know what causes the build break in the gen code of the
 swagger codegen library? I have attached the gen code.


 [1]

 [ERROR] Failed to execute goal
 org.apache.maven.plugins:maven-compiler-plugin:3.3:compile
 (default-compile) on project SampleTestProjectUsed: Compilation failure:
 Compilation failure:
 [ERROR]
 /home/awanthika/WSO2/master-source/mss-tooling/eclipse-project/runtime-New_configuration/SampleTestProjectUsed/src/main/java/org/wso2/sampole/api/ApiOriginFilter.java:[5,1]
 package javax.servlet does not exist
 [ERROR]
 /home/awanthika/WSO2/master-source/mss-tooling/eclipse-project/runtime-New_configuration/SampleTestProjectUsed/src/main/java/org/wso2/sampole/api/ApiOriginFilter.java:[6,26]
 package javax.servlet.http does not exist
 [ERROR]
 /home/awanthika/WSO2/master-source/mss-tooling/eclipse-project/runtime-New_configuration/SampleTestProjectUsed/src/main/java/org/wso2/sampole/api/ApiOriginFilter.java:[9,54]
 package javax.servlet does not exist


 [2]package
 org.wso2.msf4j.examples.petstore.util.fe.security.LoginFilter.java;

 [3]
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;


 Regards
 Awanthika Senarath
 Software Engineer, WSO2 Inc.
 Mobile: +94717681791



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


-- 
Samiyuru Senarathne
*Software Engineer*
Mobile : +94 (0) 71 134 6087
samiy...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [ESB] Http Endpoint Template Documentation

2016-02-08 Thread Chathurika De Silva
Hi Nisrin

I couldn't find related documentation on $subject in either [1] or [2]. Is
there any reason why it's not added? For reference i have recorded a doc
jira [3] as well

[1] https://docs.wso2.com/display/ESB4100/Adding+a+New+Endpoint+Template
[2] https://docs.wso2.com/display/ESB490/Adding+a+New+Endpoint+Template
[3] https://wso2.org/jira/browse/DOCUMENTATION-3010

Thank You
Erandi

-- 
*Chathurika Erandi*
Software Engineer,
WSO2 Inc.

*E-mail:* chathuri...@wso2.com
*Mobile: *+94714 328 612
*Blog*: chathurikaerandi.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [MB] Wait until Qpid server starts on port 5672 and then Connection timed out

2016-02-08 Thread Charitha Goonetilleke
Hi All,

We are using MB features on IoT Server and $subject occur in server startup
time, on Fedora 23 (4.3.4-300.fc23.x86_64), we already test this on ubuntu
and mac os, but no such issue detected. Here is the stack trace of the
error and I already add further few log lines, which is successfully
connected with AMQP on port 5672.


[2016-02-08 13:07:02,857] ERROR
{org.wso2.carbon.andes.internal.QpidServiceComponent} -  Wait until Qpid
server starts on port 5672
java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.(Socket.java:425)
at java.net.Socket.(Socket.java:241)
at
org.wso2.carbon.andes.internal.QpidServiceComponent.startAMQPServer(QpidServiceComponent.java:459)
at
org.wso2.carbon.andes.internal.QpidServiceComponent.startAndesBroker(QpidServiceComponent.java:410)
at
org.wso2.carbon.andes.internal.QpidServiceComponent.activate(QpidServiceComponent.java:155)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at
org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at
org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
at
org.wso2.carbon.server.admin.internal.ServerAdminServiceComponent.activate(ServerAdminServiceComponent.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at
org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at
org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:7