Re: [Dev] [IS] RESTful Fine Grained Authorization-as-a-Service (AZaaS)

2016-05-15 Thread Pushpalanka Jayawardhana
Hi Manujith,

Good progress in getting familiar with the environment.
So let's try to start with the scope of the project too.

Since we are to work on implementing REST service, it is better to go
through WSO2 guidelines for REST service implementation. Please find the
white paper at[1] and the relevant discussion can be found at architecture
mailing list under "REST API Guidelines". Then we can work on defining the
API definition for the endpoint.

You can also have a look at the existing WSO2 REST implementation to
capture the followed patterns referring the SCIM[2] and OAuth endpoints[3].


[1] - http://wso2.com/whitepapers/wso2-rest-apis-design-guidelines/
[2] -
https://github.com/wso2-extensions/identity-inbound-provisioning-scim/tree/master/components/org.wso2.carbon.identity.scim.provider
[3] -
https://github.com/wso2-extensions/identity-inbound-auth-oauth/tree/master/components/org.wso2.carbon.identity.oauth.endpoint

Thanks,
Pushpalanka

On Wed, May 11, 2016 at 3:23 PM, Manujith Pallewatte 
wrote:

> Hi Pushpalanka,
>
> I managed to setup the development environment and build all the sources
> (thanks to Omindu :))
> Then I made the PEP client using the entitlement stubs as you have
> mentioned in a previous thread. It's working in an accepted state. But I
> encountered some questions during the process, so I'm currently building a
> doc with all the questions so I can document them and their answers for
> future reference.
> Other than that I'm trying to write different policies using XACML
>
> Also please let me know of any other steps i can follow to get familiar
> with the components, specially the code since I'm only focusing on
> Entitlement service right now
>
> Thank You
> Manujith
> --
>
>
>
> [image: Manujith Pallewatte on about.me]
>
> Manujith Pallewatte
> about.me/manzzup
>   
>



-- 
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
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Do we have anyway to update Cache in WSO2 products?

2016-05-15 Thread Abimaran Kugathasan
Hi Devs,


How can we update a cache entry in WSO2 products. I'm aware that, we are
using Hazelcast
 based
caching. Do we provide any APIs to update/remove entried from cache?

-- 
Thanks
Abimaran Kugathasan

Software Engineer | WSO2 Inc
Data & APIs Technologies Team
Mobile : +94 773922820


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


Re: [Dev] Decouple capcha validation from Recovery flows

2016-05-15 Thread Isura Karunaratne
On Mon, May 16, 2016 at 10:34 AM, Johann Nallathamby 
wrote:

>
>
> On Mon, May 16, 2016 at 10:25 AM, Isura Karunaratne 
> wrote:
>
>> Hi,
>>
>> We are planning to expose recovery APIS in IS 5.3.0 as rest APIS. And
>> also, we are trying to reduce the complexity and improve the performance in
>> existing recovery java APIs as well.
>>
>> Currently, we have two ways of password recovery methods,
>>
>>
>>- Recover with a notification
>>- Recover with secret questions.
>>
>> *Recover with a notification*
>>
>> It is required to go through following sequences to recover password
>> using an email in existing APIs
>>
>> *getCaptcha*() -­ Generates a captcha.
>> *verifyUser*() -­ Validates the captcha answer and username and returns
>> a new key.
>> *sendRecoveryNotification*() -­ Send an email notification with a
>> confirmation code to the user. Need to provide the key from the previous
>> call.
>> *getCaptcha*() ­- Generates a captcha when the user clicks on the URL.
>> *verifyConfirmationCode*() -­ Validates the captcha answer and
>> confirmation code. This returns a key.
>> *updatePassword* -­ Updates the password in the system. Need to provide
>> the key from the previous call, new password and returns the status of the
>> update, true or false.
>>
>>
>>
>> *Recover with Secret Questions*
>>
>> It is required to go through following sequences to recover password
>> using a secret quesitons in existing APIs
>>
>> *getCaptcha*() ­- Generates a captcha.
>> *verifyUser*() ­- Validates the captcha answer and username and returns
>> a new key.
>> *getUserChallengeQuestionIds*() ­- Retrieve the cliam URI IDs specified
>> for the user with the generated key. Need to provide the key from the
>> previous call.
>> *getUserChallengeQuestion*() ­- Retrieve the user’s challenge question
>> for the specified claim URI ID from the previous call. Need to provide the
>> key from the previous call.
>> *verifyUserChallengeAnswer*() ­- Validates the answer and confirmation
>> code for the specified question. Need to provide the key from the previous
>> call.
>> *updatePassword*() ­- Updates the password in the system. Need to
>> provide the key from the previous call, the new password and return the
>> status of the update, i.e. true or false.
>>
>>
>>
>>
>> Currenlty, we are using kaptcha as the captcha generation engine and in
>> IS5.3.0 we are planning to support reCaptcha[1] instead of kapcha.
>>
>> In both of above recovery scenarios,
>>
>> If we manage captcha validation internally, captcha validation is tightly
>> coupled with the recovery sequences. In 5.3.0, We are planning to decouple
>> the captcha validation with recovery APIs.
>> So, captcha validation should be done by the application.
>>
>
> In IS 5.3.0 by application I guess you also mean the account recovery
> webapp which will be shipped with IS for OOTB account recovery. So
> basically the captcha validation would happen between the user recovery
> webapp and the re-captcha service instead of coming to our backend service
> APIs. Right ?
>
>  Yes.

Thanks
Isura

>
>> WDYT?
>>
>>
>> Thanks
>> Isura
>>
>>
>>
>> [1] https://www.google.com/recaptcha/intro/index.html
>> --
>> Isura Dilhara Karunaratne
>> Senior Software Engineer
>>
>> Mob +94 772 254 810
>>
>>
>
>
> --
> 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 *
>



-- 
Isura Dilhara Karunaratne
Senior Software Engineer

Mob +94 772 254 810
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Developer Studio Server Modification to add Product based Servers

2016-05-15 Thread Awanthika Senarath
Hello All,

We have implemented this through a startup method to ensure that the user
story remains unbroken for general eclipse users and Developer Studio
users. Now the product servers will be queried at startup and hence would
be visible via both Developer Studio dashboard option and eclipse server
view option.

Regards
Awanthika

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



On Wed, May 11, 2016 at 6:21 PM, Awanthika Senarath 
wrote:

> if we open dashboard once, we persist this info so it will appear in show
> view -> servers as well, but if customer first do  show view -> servers it
> wont come, since that action is eclipse inbuilt action we cannot capture
> that event.
>
> We will have to go with a start up option if we have to execute this on
> startup, but since we have a startup method in kernel as well, I don't want
> to introduce more complexity there, we cannot move carbon based
> implementation to kernel as it brakes the kernel concept we are trying to
> have moving forward.
>
>
>
> Regards
> Awanthika
>
> Awanthika Senarath
> Software Engineer, WSO2 Inc.
> Mobile: +94717681791
>
>
>
> On Wed, May 11, 2016 at 6:14 PM, Susinda Perera  wrote:
>
>> Hi Awanthika
>> Can't we do the same on the first time we do show view -> servers option.
>> And then we persists this info.
>>
>>
>> On Tue, May 10, 2016 at 10:15 AM, Awanthika Senarath 
>> wrote:
>>
>>> Hello all,
>>>
>>> We have completed $subject as an improvement for user experience as
>>> follows,
>>>
>>> We have enabled dynamic extension point generation in Developer Studio,
>>> we retrieve the Specific display name from the product plugins when they
>>> register their servers as given in the following example :
>>>
>>> * >> *
>>> point="org.wso2.developerstudio.carbon.product.server.registry">*
>>> * >> *   carbon.server.version="carbon.server.40"*
>>> *   server.display.name ="WSO2 ESB
>>> Server 3.3">*
>>> * *
>>> *  >> *   carbon.server.version="carbon.server.40"*
>>> *   server.display.name ="WSO2 CEP
>>> Server 3.9">*
>>> * *
>>> * >> *   carbon.server.version="carbon.server.42"*
>>> *   server.display.name ="WSO2 ESB
>>> Server 3.7">*
>>> * *
>>> *  >> *   carbon.server.version="carbon.server.42"*
>>> *   server.display.name ="WSO2 CEP
>>> Server 3.0">*
>>> * *
>>> * >> *   carbon.server.version="carbon.server.44"*
>>> *   server.display.name ="WSO2 ESB
>>> Server 3.0">*
>>> * *
>>> *  >> *   carbon.server.version="carbon.server.44"*
>>> *   server.display.name ="WSO2 CEP
>>> Server 3.2">*
>>> * *
>>> *  *
>>>
>>>
>>> The product server can decide which versions of their servers they plan
>>> to support from their tooling versions released.
>>>
>>> *We will be removing the previous support we had for integrating servers
>>> based on the carbon versions, hence it is mandatory that product teams
>>> include these servers versions in their tooling plugins, in the plugin xml
>>> as described above.*
>>>
>>> Also note that the carbon.server.version should contain one of
>>> carbon.server.40
>>> carbon.server.42
>>> carbon.server.44
>>>
>>> as Developer Studio Kernel 4.1.0 we are only going to follow those
>>> carbon versions, If you mention any String other than what is given the
>>> extension point will be ignored by kernel.
>>>
>>> Adopted Approach :
>>>
>>>
>>> ​
>>>
>>> *@ Jasintha / Susinda/ Viraj :* Currently this server retrieval from
>>> product plugins is bind to Developer Studio Dashboard opening action, since
>>> we are accessing WSO2 servers from the dashboard. We need to configure this
>>> in an Eclipse generic startup method if we are to display these servers in
>>> show view -> servers option via eclipse menu.
>>> Since eclipse discourages usage of early startups IMO it is OK to
>>> display the servers only via the dashboard server option.
>>>
>>> WDYT ?
>>>
>>>
>>> [1] Associated Jira : https://wso2.org/jira/browse/DEVTOOLPFM-1
>>>
>>> Awanthika Senarath
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94717681791
>>>
>>>
>>>
>>
>>
>> --
>> *Susinda Perera*
>> Software Engineer
>> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
>> Mobile:(+94)716049075
>> Blog: susinda.blogspot.com
>> WSO2 Inc. http://wso2.com/
>> Tel : 94 11 214 5345 Fax :94 11 2145300
>>
>>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Decouple capcha validation from Recovery flows

2016-05-15 Thread Johann Nallathamby
On Mon, May 16, 2016 at 10:25 AM, Isura Karunaratne  wrote:

> Hi,
>
> We are planning to expose recovery APIS in IS 5.3.0 as rest APIS. And
> also, we are trying to reduce the complexity and improve the performance in
> existing recovery java APIs as well.
>
> Currently, we have two ways of password recovery methods,
>
>
>- Recover with a notification
>- Recover with secret questions.
>
> *Recover with a notification*
>
> It is required to go through following sequences to recover password using
> an email in existing APIs
>
> *getCaptcha*() -­ Generates a captcha.
> *verifyUser*() -­ Validates the captcha answer and username and returns a
> new key.
> *sendRecoveryNotification*() -­ Send an email notification with a
> confirmation code to the user. Need to provide the key from the previous
> call.
> *getCaptcha*() ­- Generates a captcha when the user clicks on the URL.
> *verifyConfirmationCode*() -­ Validates the captcha answer and
> confirmation code. This returns a key.
> *updatePassword* -­ Updates the password in the system. Need to provide
> the key from the previous call, new password and returns the status of the
> update, true or false.
>
>
>
> *Recover with Secret Questions*
>
> It is required to go through following sequences to recover password using
> a secret quesitons in existing APIs
>
> *getCaptcha*() ­- Generates a captcha.
> *verifyUser*() ­- Validates the captcha answer and username and returns a
> new key.
> *getUserChallengeQuestionIds*() ­- Retrieve the cliam URI IDs specified
> for the user with the generated key. Need to provide the key from the
> previous call.
> *getUserChallengeQuestion*() ­- Retrieve the user’s challenge question
> for the specified claim URI ID from the previous call. Need to provide the
> key from the previous call.
> *verifyUserChallengeAnswer*() ­- Validates the answer and confirmation
> code for the specified question. Need to provide the key from the previous
> call.
> *updatePassword*() ­- Updates the password in the system. Need to provide
> the key from the previous call, the new password and return the status of
> the update, i.e. true or false.
>
>
>
>
> Currenlty, we are using kaptcha as the captcha generation engine and in
> IS5.3.0 we are planning to support reCaptcha[1] instead of kapcha.
>
> In both of above recovery scenarios,
>
> If we manage captcha validation internally, captcha validation is tightly
> coupled with the recovery sequences. In 5.3.0, We are planning to decouple
> the captcha validation with recovery APIs.
> So, captcha validation should be done by the application.
>

In IS 5.3.0 by application I guess you also mean the account recovery
webapp which will be shipped with IS for OOTB account recovery. So
basically the captcha validation would happen between the user recovery
webapp and the re-captcha service instead of coming to our backend service
APIs. Right ?


> WDYT?
>
>
> Thanks
> Isura
>
>
>
> [1] https://www.google.com/recaptcha/intro/index.html
> --
> Isura Dilhara Karunaratne
> Senior Software Engineer
>
> Mob +94 772 254 810
>
>


-- 
Thanks & Regards,

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

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


[Dev] Decouple capcha validation from Recovery flows

2016-05-15 Thread Isura Karunaratne
Hi,

We are planning to expose recovery APIS in IS 5.3.0 as rest APIS. And also,
we are trying to reduce the complexity and improve the performance in
existing recovery java APIs as well.

Currently, we have two ways of password recovery methods,


   - Recover with a notification
   - Recover with secret questions.

*Recover with a notification*

It is required to go through following sequences to recover password using
an email in existing APIs

*getCaptcha*() -­ Generates a captcha.
*verifyUser*() -­ Validates the captcha answer and username and returns a
new key.
*sendRecoveryNotification*() -­ Send an email notification with a
confirmation code to the user. Need to provide the key from the previous
call.
*getCaptcha*() ­- Generates a captcha when the user clicks on the URL.
*verifyConfirmationCode*() -­ Validates the captcha answer and confirmation
code. This returns a key.
*updatePassword* -­ Updates the password in the system. Need to provide the
key from the previous call, new password and returns the status of the
update, true or false.



*Recover with Secret Questions*

It is required to go through following sequences to recover password using
a secret quesitons in existing APIs

*getCaptcha*() ­- Generates a captcha.
*verifyUser*() ­- Validates the captcha answer and username and returns a
new key.
*getUserChallengeQuestionIds*() ­- Retrieve the cliam URI IDs specified for
the user with the generated key. Need to provide the key from the previous
call.
*getUserChallengeQuestion*() ­- Retrieve the user’s challenge question for
the specified claim URI ID from the previous call. Need to provide the key
from the previous call.
*verifyUserChallengeAnswer*() ­- Validates the answer and confirmation code
for the specified question. Need to provide the key from the previous call.
*updatePassword*() ­- Updates the password in the system. Need to provide
the key from the previous call, the new password and return the status of
the update, i.e. true or false.




Currenlty, we are using kaptcha as the captcha generation engine and in
IS5.3.0 we are planning to support reCaptcha[1] instead of kapcha.

In both of above recovery scenarios,

If we manage captcha validation internally, captcha validation is tightly
coupled with the recovery sequences. In 5.3.0, We are planning to decouple
the captcha validation with recovery APIs.
So, captcha validation should be done by the application.

WDYT?


Thanks
Isura



[1] https://www.google.com/recaptcha/intro/index.html
-- 
Isura Dilhara Karunaratne
Senior Software Engineer

Mob +94 772 254 810
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ESB][JMS] Documentation - missing main user scenarios and proper clarification on configuration

2016-05-15 Thread Dilshani Subasinghe
Adding Chanaka

On Mon, May 16, 2016 at 8:55 AM, Dilshani Subasinghe 
wrote:

> Hi all,
>
> Currently I am testing JMS transport parameters of ESB 5.0.0 alpha pack
> with MB 3.1.0 as the broker. While testing that, identified following
> factors:
>
>- As the JMS receiver, ESB can use proxy and inbound endpoints.
>- While using jms transport within proxy, that will always pick up
>default parameters defined with in axis2.xml.
>
> While enabling jms transport for ESB, have to uncomment following
> fragments:
>
>  class="org.apache.axis2.transport.jms.JMSListener">
> 
>  locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory
>  locked="false">repository/conf/jndi.properties
>  locked="false">TopicConnectionFactory parameter>
>  locked="false">topic
> 
>
> 
>  locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory
>  locked="false">repository/conf/jndi.properties
>  locked="false">QueueConnectionFactory
> locked="false">queue
> 
>
>
>
>
>
>
> * name="java.naming.factory.initial"
> locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory
>  locked="false">repository/conf/jndi.properties
>  locked="false">QueueConnectionFactory name="transport.jms.ConnectionFactoryType"
> locked="false">queue*
> 
>
> But enabling jms transaction only consider about "default" parameters.
>
>- With above scenario, *user may cannot listen to topic and queue
>within one ESB instance.*
>- As a further identification, found the article [2] which will
>address above scenario with a proper solution. Within that article, user
>have to add extra parameters to override default configurations.
>
> 
>  
>  contentType
>  application/xml
>  
>  
>   name="transport.jms.ConnectionFactory">myQueueConnectionFactory
>  myQueue
>  queue
>
>- With these configuration, it can successfully achieve the use case
>of listening to both topic and queue within one ESB instance.
>
> 1. Is there any other method to fulfill above user requirement ?
>
> 2. When considering documentation noticed following bugs and improvements:
>
>- Docs were not clearly identified enabling jms transport in proxy [1]
>- Docs didn't mention about way of addressing above scenario and the
>need of adding exact parameters for axis2.xml [4]
>
> If above mention method is the only one to achieve the scenario, it may
> have to update docs properly. Added document jira for required
> modifications [5].
>
> @ESB/MB Team - Please correct me if I have any misunderstanding about the
> flow or functionality of features.
> [1] https://docs.wso2.com/display/ESB500/JMS+Transport
> [2]
> http://wso2.com/library/articles/2013/03/configuring-wso2-esb-wso2-message-broker/
> [3] https://docs.wso2.com/display/ESB470/Proxy+Services
> [4]
> https://docs.wso2.com/display/ESB500/Configure+with+WSO2+Message+Broker
>
> Thank you.
>
> --
> Best Regards,
>
> Dilshani Subasinghe
> Software Engineer - QA
> WSO2, Inc.;http://wso2.com/
> 
> lean.enterprise.middleware
> Mobile: +94773375185
> Blog: dilshanilive.blogspot.com
>



-- 
Best Regards,

Dilshani Subasinghe
Software Engineer - QA
WSO2, Inc.;http://wso2.com/

lean.enterprise.middleware
Mobile: +94773375185
Blog: dilshanilive.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fwd: GSOC2016: [ML][CEP] Predictive analytic with online data for WSO2 Machine Learner

2016-05-15 Thread Maheshakya Wijewardena
Hi Mahesh,

Sorry for replying late.

Thank you for the update. I believe you have done some implementations with
with Spark MLLIb algorithms in streaming fashion as we have discussed. If
so, can you please share your code in a Github repo.

Now i want to implements some machine learning algorithms with importing
> mllib and want to run within your code base
>

For the moment you can try out editing the same class
PredictStreamProcessor in the siddhi extension in carbon-ml. Later we will
add this separately. You should be able to add org.apache.spark.mllib.
classes to there.

And i want to see how event streams are coming from cep. As i think it is
> not in a RDD format since it is arriving as the individual samples. I will
> send a email to dev asking about how to get the streams.


Please pay attention to length[1] and lengthbatch[1] inbuilt windows in
siddhi. What you need to write are functions similar to a custom aggregate
function[2].
When you send the email to dev list, explain your requirement. You need to
get a set of event with from a stream with a specified window size (number
of events). Then build a model within that function. You also need to
retain the data (learned weights, cluster centers, etc.) from the previous
window to use in the current window. Ask what can be the most suitable
option for this among the set of siddhi extensions given.

Best regards.

[1]
https://docs.wso2.com/display/CEP400/Inbuilt+Windows#InbuiltWindows-lengthlength
[2] https://docs.wso2.com/display/CEP400/Writing+a+Custom+Aggregate+Function

On Wed, May 11, 2016 at 1:43 PM, Mahesh Dananjaya  wrote:

>
> -- Forwarded message --
> From: Mahesh Dananjaya 
> Date: Wed, May 11, 2016 at 1:43 PM
> Subject: Re: [Dev] GSOC2016: [ML][CEP] Predictive analytic with online
> data for WSO2 Machine Learner
> To: Maheshakya Wijewardena 
>
>
> Hi Maheshakya,
> sorry for not updating. I did what you wanted me to do. I checked the code
> base and train functions. I went through those java docs. I went through
> the carbon-ml current implementation of LG and K-Mean. And i had Apache
> Spark and i tried with several examples. Now i want to implements some
> machine learning algorithms with importing mllib and want to run within
> your code base. Can you help me with that.
> And i want to see how event streams are coming from cep. As i think it is
> not in a RDD format since it is arriving as the individual samples. I will
> send a email to dev asking about how to get the streams. I debugged many of
> those functions in the code base. So need further instructions to
> proceed.thank you.
> regards,
> Mahesh.
>
> On Wed, May 11, 2016 at 10:32 AM, Maheshakya Wijewardena <
> mahesha...@wso2.com> wrote:
>
>> Hi Mahesh,
>>
>> Any update on your progress?
>>
>> Best regards.
>>
>> On Wed, May 4, 2016 at 8:35 PM, Maheshakya Wijewardena <
>> mahesha...@wso2.com> wrote:
>>
>>> Hi Mahesh,
>>>
>>> is that "Put break points in train methods in Linear Regression class"
 means the spark/algorithms/ LinearRegrassion.java class in the
 org.wso2.carbon.ml.core? is that the correct file?
>>>
>>>
>>> Yes, this is the correct place.
>>>
>>> You can refer to spark programming guide[1][2] as well as our ML code
>>> base when you try those algorithms out. Please try to do rough
>>> implementations of the streaming versions of linear regression, logistic
>>> regression and k-means clustering as we have discussed in the proposal in
>>> plain Java. It's better if you can create a git repo and share your code
>>> once you have made some progress.
>>>
>>> Were you able debug and understand the flow of the ML siddhi extension?
>>> I hope you haven't encountered more errors after switching the released
>>> version of CEP.
>>>
>>> Is this Friday okay for you? Afternoon at 2:00 pm?
>>>
>>> Best regards.
>>>
>>>
>>> Best regards.
>>>
>>> [1] http://spark.apache.org/docs/latest/programming-guide.html
>>> [2] http://spark.apache.org/docs/latest/mllib-guide.html
>>>
>>> On Wed, May 4, 2016 at 1:07 PM, Mahesh Dananjaya <
>>> dananjayamah...@gmail.com> wrote:
>>>
 Hi Maheshakya,
 I have been looking into some algorithms related to stochastic gradient
 descent based algorithms.anything i should focus please let me know.Ans
 also i will be available for calling this week and next week.thank you.
 BR,
 Mahesh.

 On Tue, May 3, 2016 at 5:05 PM, Mahesh Dananjaya <
 dananjayamah...@gmail.com> wrote:

> Hi Maheshakya,
> thank you.that's good. i have been trying to fix that for couple of
> days. please inform me when it will be fixed.now i have been testing the 
> ML
> algorithms and trying to identify the flow and the hierarchy. is that "Put
> break points in train methods in Linear Regression class" means the
> spark/algorithms/ LinearRegrassion.java class in the
> org.wso2.carbon.ml.core? is that the correct 

Re: [Dev] [GSoC Dockerfiles] Problems with ESB clustering setup

2016-05-15 Thread Viraj Senevirathne
Hi Abhishek,

Try increasing the MySQL connection limit. This source will be useful [1].

[1] http://stackoverflow.com/questions/22297773/increase-mysql-connections

Thank You.

On Fri, May 13, 2016 at 10:01 AM, Abhishek Tiwari <
abhishek.tiwari0...@gmail.com> wrote:

> Hi Mentors,
>
> I have been trying to run WSO2 ESB in Clustering set up, with one manager
> and two worker nodes. I followed the instructions here [1].
>
> Manager and workers start up fine but after few seconds I see both manager
> and worker nodes running out of database connections.
>
> I am attaching the logs from manager and both the workers.
>
> Thanks
> Abhishek
>
> [1].  https://docs.wso2.com/display/CLUSTER44x/Clustering+ESB+4.9.0
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Viraj Senevirathne
Software Engineer; WSO2, Inc.

Mobile : +94 71 958 0269
Email : vir...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [ESB][JMS] Documentation - missing main user scenarios and proper clarification on configuration

2016-05-15 Thread Dilshani Subasinghe
Hi all,

Currently I am testing JMS transport parameters of ESB 5.0.0 alpha pack
with MB 3.1.0 as the broker. While testing that, identified following
factors:

   - As the JMS receiver, ESB can use proxy and inbound endpoints.
   - While using jms transport within proxy, that will always pick up
   default parameters defined with in axis2.xml.

While enabling jms transport for ESB, have to uncomment following fragments:



org.wso2.andes.jndi.PropertiesFileInitialContextFactory
repository/conf/jndi.properties
TopicConnectionFactory parameter>
topic



org.wso2.andes.jndi.PropertiesFileInitialContextFactory
repository/conf/jndi.properties
QueueConnectionFactory
   queue







*org.wso2.andes.jndi.PropertiesFileInitialContextFactory
repository/conf/jndi.properties
QueueConnectionFactoryqueue*


But enabling jms transaction only consider about "default" parameters.

   - With above scenario, *user may cannot listen to topic and queue within
   one ESB instance.*
   - As a further identification, found the article [2] which will address
   above scenario with a proper solution. Within that article, user have to
   add extra parameters to override default configurations.


 
 contentType
 application/xml
 
 
 myQueueConnectionFactory
 myQueue
 queue

   - With these configuration, it can successfully achieve the use case of
   listening to both topic and queue within one ESB instance.

1. Is there any other method to fulfill above user requirement ?

2. When considering documentation noticed following bugs and improvements:

   - Docs were not clearly identified enabling jms transport in proxy [1]
   - Docs didn't mention about way of addressing above scenario and the
   need of adding exact parameters for axis2.xml [4]

If above mention method is the only one to achieve the scenario, it may
have to update docs properly. Added document jira for required
modifications [5].

@ESB/MB Team - Please correct me if I have any misunderstanding about the
flow or functionality of features.
[1] https://docs.wso2.com/display/ESB500/JMS+Transport
[2]
http://wso2.com/library/articles/2013/03/configuring-wso2-esb-wso2-message-broker/
[3] https://docs.wso2.com/display/ESB470/Proxy+Services
[4] https://docs.wso2.com/display/ESB500/Configure+with+WSO2+Message+Broker

Thank you.

-- 
Best Regards,

Dilshani Subasinghe
Software Engineer - QA
WSO2, Inc.;http://wso2.com/

lean.enterprise.middleware
Mobile: +94773375185
Blog: dilshanilive.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [G-Reg] Added resource file not showing at the management console

2016-05-15 Thread Denuwanthi De Silva
Hi Nalaka,

Before creating the registry, could you please try loading the tenant
registry using 'loadTenantRegistry(tenantId)' method of
'TenantRegistryLoader' class.


Thanks,



On Fri, May 13, 2016 at 6:45 PM, Nalaka Perera  wrote:

> Hi all,
>
> I am adding Log analyzer alert configuration file (JSON file) to the
> registry using TenantRegistryLoader. My code snippets as follows.
>
> public void saveAlertConfiguration (ScheduleAlertBean scheduleAlertBean, int 
> tenantId) throws RegistryException {
> try {
> UserRegistry userRegistry = 
> LAAlertServiceValueHolder.getInstance().getTenantConfigRegistry(tenantId);
> createConfigurationCollection(userRegistry);
> String configurationLocation = 
> getConfigurationLocation(scheduleAlertBean.getAlertName());
> if (!userRegistry.resourceExists(configurationLocation)) {
>Resource resource = getResource(userRegistry, 
> scheduleAlertBean);
> if(!resource.equals(null)){
> userRegistry.put(configurationLocation, resource);
> userRegistry.commitTransaction();
> }
> }
> } catch (RegistryException e) {
> log.error("Unable to save Alert configurations " + 
> e.getMessage(), e);
> throw new RegistryException("Unable to save Alert Configuration " 
> + e.getMessage(), e);
> }
> }
>
> private void createConfigurationCollection(UserRegistry userRegistry) {
> try {
> if 
> (!userRegistry.resourceExists(LAAlertConstant.ALERT_CONFIGURATION_LOCATION)) {
> Collection collection = userRegistry.newCollection();
> userRegistry.put(LAAlertConstant.ALERT_CONFIGURATION_LOCATION, 
> collection);
> }
> } catch (RegistryException e) {
> log.error("Unable to create Configuration Collection in Registry " + 
> e.getMessage(), e);
> }
> }
>
> When I am adding a file and load it's content to Log Analyzer UI(jaggery 
> app), file content  are correctly showing at the LA UI. But file is not 
> showing  at the management console, after restart the server file is showing 
> at the  management console.
>
> I am also updating the content of that file and save, but changes of the 
> content are not showing at the LA UI and management console. Then after 
> restarting the server changes are showing correctly.
>
> Could anyone suggest a solution for this?
>
> Thanks
> Nalaka
>
> --
> *Nalaka Perera*
>
> *Intern - Software Engineering*
> *WSO2*
>
> *Mobile: * *+94 71 9165748 <%2B94%2071%209165748>*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Denuwanthi De Silva
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


Re: [Dev] GSOC 2016 - Project 21 : MongoDB Userstore Development

2016-05-15 Thread Asantha Thilina
Hi Tharindu,

I found the issue after debugging into my code ,my service bundle is not
get activated because i referring into mongodb-driver which is not osgi
comaptible and i just found another library in here[1] and it is worked for
me ,fixed project i pushed into my github repository [2].
i found out that *DefaultRealmService* which is used in Bundle Activator of
JDBCUserstoreManager cannot be used for MongoDB since it used
*java.sql.DataSource*.
Is their having any DataSource class like that for MongoDB? or would i have
to create a different logic to implement that scenario in MongoDB?
waiting for your suggestion

[1]. http://central.maven.org/maven2/org/mongodb/mongo-java-driver/3.2.2/
[2]. https://github.com/asanthamax/mongodbuserstore
Thanks,
Asantha

On Sat, May 14, 2016 at 10:53 AM, Asantha Thilina 
wrote:

> Hi Tharindu,
>
> i faced following issue while i developing ,
> after adding my new json query support i didn't able to see My
> MongoDBUserStore in dropdown in create user store option.
> for json related activites i used an external json dependency from here[1]
> and i added it jar to lib folder in IS as well,i have enabled remote
> debugging and inspect my code and there i found in my 
> *MongoDBUserStoreDSComponent
> *class *activate *method triggered but execute 1st line of code only. it
> will not registered the service but in my osgi console window when i run *ss
> mongo* command i get monodb.userstore bundle and mongodb java driver
> bundle are activated successfully i attached my console output and identity
> server output for your consideration as well
> any suggestion would be grateful
>
> [1]. http://mvnrepository.com/artifact/org.json/json/20160212
> my github repository
>
> https://github.com/asanthamax/mongodbuserstore/tree/master/mongodb.userstoremanager
> Thanks,
> Asantha
>
>
> On Thu, May 12, 2016 at 2:01 AM, Asantha Thilina  > wrote:
>
>> Hi Tharindu,
>>
>> since mongodb driver not having prepared statement support earlier i
>> developed a logic to support prepared statement but i realized that it has
>> a limitation such as parameters has to be pass as same order it exists in
>> prepared statement then as you suggested to use key value relationship
>> instead of order during our hangout conversation i created a new logic same
>> to prepared statement in sql and it will work according to key value
>> relationship and i created standard query format for mongodb with json to
>> support prepared statements and i rewrite the JDBCRealmConstants class with
>> those supporting json queries instead of sql queries
>>
>> All of my prepared statement methods contain in MongoDBPreparedStatement
>> interface and its implementation in MongoDBPreparedStatementImpl class
>>
>> All the changes i have pushed to my repo in here[1]
>>
>> security of this prepared statements has to be improve
>>
>> I'll be grateful if you can provide me some suggestions to improve it and
>> also another small issue i having is can i write a DataSource for MongoDB
>> as in java.sql.DataSource ?
>>
>> [1]
>> https://github.com/asanthamax/mongodbuserstore/tree/master/mongodb.userstoremanager
>>
>> Thanks,
>> Asantha
>>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev