Re: [Dev] Avoid loading multiple copies of React

2018-02-14 Thread Nisala Nanayakkara
Hi Aruna,

+1 for the approach. We have faced a similar issue in Product SP and tested
the above-mentioned fix in our local environment. It is working fine.

Thanks,
Nisala

On Thu, Feb 15, 2018 at 12:04 PM, Aruna Herath  wrote:

> Loading multiple copies of React in the same page creates problems
> ,
> such as errors with discriptions like "Element ref was specified as a
> string (myRefName) but no owner was set. You may have multiple copies of
> React loaded."
>
> In our dashboards, we have widgets that can be added by dragging and
> dropping. Since it should be possible to add widgets without building the
> whole app, widgets are bundled separate to the parent app. How ever this
> means react is bundled with both the widget and the parent app.
>
> Adding react as a peerDep doesn't resolve this, as peerDeps only makes
> sense if we add the widget as a dependency of the parent app and build the
> parent app only.
>
> To resolve this something we can do is to export React to the global scope
> and allow widgets to use this global reference to React. So we don't have
> to bundle React with widgets.
>
> To put React into global context in the parent dashboard app we can do,
>
> import React from 'react'
> global.React = React
>
> in the widget to use this global React ref instead of bundling use webpack
> externals .
>
> webpack config should be,
>
> externals: {
>   react: 'React'
> }
>
> Instead of the variable name 'React' we can even use some other name like 
> 'CarbonDashboardReactGlobalRef'
> to avoid  possible conflicts.
>
> --
> Aruna Herath
> Senior Software Engineer | WSO2
> Mobile: 0711 051 799 | 0774 569 555
>
> 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Nisala Niroshana Nanayakkara,*
Software Engineer
Mobile | +94 717600022
WSO2 Inc | http://wso2.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [IS] Return to Dashboard after trying out Forgot UserName/Password (IS-5.4.1)

2018-02-14 Thread Godwin Shrimal
Hi IAM Team,

Please find the steps to create this issue.

1. Configure travelocity application with identity server (Service
providers etc.)
2. Click login button in travelocity application
3. Click on Forgot Password/Username
4. Click cancel button of Forgot password/Username screen
5. Enter valid user name and Password and signin
6. It is redirecting to Identity Server Dashboard

Ideally it should return to correct service provider which initiated the
login request. As per the SAML tracer, once we click on cancel button in
Forget Password/Username, it sends a SAML request with issuer
"wso2.my.dashboard", So after that its proceeding as Dashboard issuer.

Thanks
Godwin

-- 
*Godwin Amila Shrimal*
Associate Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *https://www.linkedin.com/in/godwin-amila-2ba26844/
*
twitter: https://twitter.com/godwinamila

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


[Dev] Avoid loading multiple copies of React

2018-02-14 Thread Aruna Herath
Loading multiple copies of React in the same page creates problems
,
such as errors with discriptions like "Element ref was specified as a
string (myRefName) but no owner was set. You may have multiple copies of
React loaded."

In our dashboards, we have widgets that can be added by dragging and
dropping. Since it should be possible to add widgets without building the
whole app, widgets are bundled separate to the parent app. How ever this
means react is bundled with both the widget and the parent app.

Adding react as a peerDep doesn't resolve this, as peerDeps only makes
sense if we add the widget as a dependency of the parent app and build the
parent app only.

To resolve this something we can do is to export React to the global scope
and allow widgets to use this global reference to React. So we don't have
to bundle React with widgets.

To put React into global context in the parent dashboard app we can do,

import React from 'react'
global.React = React

in the widget to use this global React ref instead of bundling use webpack
externals .

webpack config should be,

externals: {
  react: 'React'
}

Instead of the variable name 'React' we can even use some other name like
'CarbonDashboardReactGlobalRef' to avoid  possible conflicts.

-- 
Aruna Herath
Senior Software Engineer | WSO2
Mobile: 0711 051 799 | 0774 569 555


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


Re: [Dev] Clustering in WSO2 EI 6.1.1

2018-02-14 Thread Senduran Balasubramaniyam
Hi Dhanya,

On Thu, Feb 15, 2018 at 11:25 AM, dhanya  wrote:

> Hi Nandika,
>
> Thanks but now this leaves me confused.
> Is there a difference between clustering agent and load balancer?
>
yes those are different.
Clustering agent is something that overall look after the cluster (like who
are the members joined / left. Communication between the nodes)
Load balancer is a device / a software that will distribute the traffic
among the available nodes in a cluster

>
> And do we use Hazelcast community edition or NginX load balancer in a
> production environment?
>
In a production set up you can have a Nginx load balance to distribute the
request among the clustered nodes.
By default WSO2 products uses Hazelcast community edition based clustering
implementation [1]

In other words. When you enable cluster in wso2 products Hazelcast
clustering agent is already available to take care of your cluster.
But a load balancer is optional,  if you don't want to distribute the
incoming request to the cluster.

[1] https://docs.wso2.com/display/Carbon4411/Clustering+Agent

Regards
Senduran

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



-- 
*Senduran *
Senior Software Engineer,
WSO2, Inc.;  http://wso2.com/ 
Mobile: +94 77 952 6548 <+94%2077%20952%206548>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Proposed widgetConf.json to Allow User Preferences in Widgets of Carbon Dashboards with Widget Configuration Panel

2018-02-14 Thread Irindu Nugawela
Hi All,
Please find the usage of fields described below,
id - to identify which option it is and used to refer to the option within
the dashboard
title - the text displayed to the user in the configuration panel
type - the type of option possible types are text , boolean , and enum
possibleValues - to specify the set of possible values available within the
enumerated data type
defaultData - the dafault Value of Data before the user has made any changes

I will schedule a design review and send you invitations.

On Thu, Feb 15, 2018 at 11:00 AM, Lasantha Samarakoon 
wrote:

> @SajithAR: We have used this file name SP 4.0.0 release. But +1 on
> renaming that to widget-conf.json.
>
> @SajithR: Yes, better to have a design review on this.
>
> @Irindu: Can you pls schedule a design review for this?
>
>
> *Lasantha Samarakoon* | Software Engineer
> WSO2, Inc.
> #20, Palm Grove, Colombo 03, Sri Lanka
> 
> Mobile: +94 (71) 214 1576 <+94%2071%20214%201576>
> Email:  lasant...@wso2.com
> Web:www.wso2.com
>
> lean . enterprise . middleware
>
> On Thu, Feb 15, 2018 at 10:56 AM, Sajith Ravindra 
> wrote:
>
>> Folks, should we have a design review for this ?
>>
>> On Thu, Feb 15, 2018 at 10:55 AM SajithAR Ariyarathna 
>> wrote:
>>
>>> *Side Note:* Shall we rename the "widgetConf.json" to *widget-conf.json*
>>> to be consistent with other file names. In other places we use "-" instead
>>> of camel case.
>>>
>>> Thanks.
>>>
>>> On Thu, Feb 15, 2018 at 10:46 AM, Lasantha Samarakoon <
>>> lasant...@wso2.com> wrote:
>>>
 @Irindu: Can you please explain what are the uses of each and every
 field as well?

 *Lasantha Samarakoon* | Software Engineer
 WSO2, Inc.
 #20, Palm Grove, Colombo 03, Sri Lanka
 
 Mobile: +94 (71) 214 1576 <+94%2071%20214%201576>
 Email:  lasant...@wso2.com
 Web:www.wso2.com

 lean . enterprise . middleware

 On Thu, Feb 15, 2018 at 10:39 AM, Irindu Nugawela 
 wrote:

> Hi,
> Please find the $Subject below  and also as an attachment. Please
> Comment on any further changes required.
>
> {
>   "name": "Widget Name",
>   "id": "WidgetID",
>   "thumbnailURL": "",
>   "configs": {
> "pubsub": {
>   "types": [
> "subscriber"
>   ]
> },
> "options" : [
> {
>   "id": "sampleId1",
>   "title": "sampleTitle1",
>   "type" : "text",
>   "defaultData" : "SamapleData"
> },
> {
>   "id": "sampleId2",
>   "title": "sampleTitle2",
>   "type" : "boolean",
>   "defaultData" : "true"
> },
> {
>   "id": "sampleId3",
>   "title": "sampleTitle3",
>   "type" : "enum",
>   "possibleValues" : ["SamapleEnumeratedData1","Sam
> apleEnumeratedData2","SamapleEnumeratedData3"],
>   "defaultData" : "SamapleEnumeratedData1"
> },
> {
>   "id": "sampleId4",
>   "title": "sampleTitle4",
>   "type" : "text",
>   "defaultData" : "SamapleData"
> }
>   ]
> }
>   }
> }
>
>
> --
> Thanks & regards,
> Irindu
>
> Software Engineer Intern, WSO2 Inc.
> Mobile: +94712325238 <+94%2071%20232%205238>
>
>

>>>
>>>
>>> --
>>> Sajith Janaprasad Ariyarathna
>>> Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
>>> 
>>>
>> --
>> Thanks
>> *,Sajith Ravindra*
>> Associate Technical Lead
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 77 2273550
>> blog: http://sajithr.blogspot.com/
>> 
>>
>
>


-- 
Thanks & regards,
Irindu

Software Engineer Intern, WSO2 Inc.
Mobile: +94712325238 <+94%2071%20232%205238>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Clustering in WSO2 EI 6.1.1

2018-02-14 Thread dhanya
Hi Nandika,

Thanks but now this leaves me confused. 
Is there a difference between clustering agent and load balancer?

And do we use Hazelcast community edition or NginX load balancer in a
production environment?

Thanks and regards
Dhanya





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


[Dev] Branch release-5.5.0-alpha created in product-is for 5.5.0-alpha release

2018-02-14 Thread Sathya Bandara
Hi all,

We have done the $subject. We will be using this branch [1] for Identity
Server 5.5.0-alpha development work and release.

[1] https://github.com/wso2/product-is/tree/release-5.5.0-alpha

Thanks,
Sathya
-- 
Sathya Bandara
Software Engineer
WSO2 Inc. http://wso2.com
Mobile: (+94) 715 360 421 <+94%2071%20411%205032>

<+94%2071%20411%205032>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Performing XA transactions with MYSQL

2018-02-14 Thread Himasha Guruge
Was able to get it working after setting below property in
EI/wso2/lib/transactions.properties file  and using mysql driver 5.1.5.

com.atomikos.icatch.serial_jta_transactions=false


Thanks,
Himasha

On Wed, Feb 14, 2018 at 1:50 PM, Himasha Guruge  wrote:

> Hi,
>
> I have configured master-datasources.xml and used transaction mediator
> similar to [1] with MYSQL.  In a scenario , where  we restart MYSQL server
> while executing a transaction following error is displayed and we cannot
> perform any more transactions without a EI server restart.
>
> Caused by: com.atomikos.datasource.ResourceException: XA resource
> 'TXDB1': resume for XID 
> '3132372E302E302E312E746D30303030383030303639:3132372E302E302E312E746D38'
> raised -7: the XA resource has become unavailable
>
> at com.atomikos.datasource.xa.XAResourceTransaction.resume(
> XAResourceTransaction.java:505)
>
>
> According to [2] it seems to be a known issue with MYSQL XA transactions
> ,which occurs when we try to access the same database multiple times using
> the same transaction. It also suggests a workaround of setting some
> properties, however this does not solve the issue.(Tried with
> mysql-connector-java-6.0.6.jar) Appreciate any feedback on this.
>
>  [1] https://docs.wso2.com/display/EI611/Transaction+Mediator+Example
>  [2]  https://www.atomikos.com/Documentation/KnownProblems#JTDS_XA_Driver_
> Problems
>
> Thanks,
> Himasha Guruge
> Senior Software Engineer
> WS*O2* *Inc.*
> Mobile: +94 777459299 <+94%2077%20745%209299>
> himas...@wso2.com
>



-- 
Himasha Guruge
Senior Software Engineer
WS*O2* *Inc.*
Mobile: +94 777459299
himas...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Clustering in WSO2 EI 6.1.1

2018-02-14 Thread Nandika Jayawardana
Hi Danya,

WSO2 does not ship a load balancer product. Hence we are recommending the
NginX product as a load balancer in our documentation. However, wso2
products will work with any load balancer product (hardware or software )
and the load balancer should be a choice based on your available
infrastructure.

Regards
Nandika

On Wed, Feb 14, 2018 at 4:13 PM, dhanya  wrote:

> Hi Senduran,
>
> Thanks for the reply.
>
> My query about Hazelcast is based on the documentation in
> https://docs.wso2.com/display/EI611/Clustering+the+ESB+Profile.
> Here it mentions that "It is recommended to use NGINX Plus as your load
> balancer of choice."
>
> So wanted to know if WSO2 recommends using a 3rd party load balancer in
> production?
>
> Thanks and regards
> Dhanya
>
>
>
> --
> Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-
> Development-f3.html
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 
Nandika Jayawardana
WSO2 Inc ; http://wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Clustering in WSO2 EI 6.1.1

2018-02-14 Thread dhanya
Hi Senduran,

Thanks for the reply.

My query about Hazelcast is based on the documentation in
https://docs.wso2.com/display/EI611/Clustering+the+ESB+Profile.
Here it mentions that "It is recommended to use NGINX Plus as your load
balancer of choice."

So wanted to know if WSO2 recommends using a 3rd party load balancer in
production?

Thanks and regards
Dhanya



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


Re: [Dev] Disabling JNDI Binding in Carbon Datsources SPI On Demand

2018-02-14 Thread Ruwan Abeykoon
Hi Jayanga,
+1. This is something we need to seamlessly integrate offline tools, which
uses the same Datasource XML.

I propose removing singleton on DatasourceManager, and pass a Properties to
the constructor.

Cheers,
Ruwan

On Wed, Feb 14, 2018 at 2:50 PM, Jayanga Kaushalya 
wrote:

> Hi all,
>
> Carbon Datasources [1] currently do not support JNDI binding in non-osgi
> mode. But it'll try to bind JNDI if there is a JNDI tag presents in the
> datasources.xml. But if we remove or comment the JNDI tags, it'll ignore
> the JNDI bindings as continue with the data source name. It is better if we
> can disable the JNDI binding explicitly by providing a external
> configuration even though JNDI tags are present in the datasources.xml.
> WDYT ?
>
> [1] https://github.com/wso2/carbon-datasources
>
> Thanks!
>
> *Jayanga Kaushalya*
> Senior Software Engineer
> Mobile: +94777860160 <+94%2077%20786%200160>
> WSO2 Inc. | http://wso2.com
> lean.enterprise.middleware
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Disabling JNDI Binding in Carbon Datsources SPI On Demand

2018-02-14 Thread Jayanga Kaushalya
Hi all,

Carbon Datasources [1] currently do not support JNDI binding in non-osgi
mode. But it'll try to bind JNDI if there is a JNDI tag presents in the
datasources.xml. But if we remove or comment the JNDI tags, it'll ignore
the JNDI bindings as continue with the data source name. It is better if we
can disable the JNDI binding explicitly by providing a external
configuration even though JNDI tags are present in the datasources.xml.
WDYT ?

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

Thanks!

*Jayanga Kaushalya*
Senior Software Engineer
Mobile: +94777860160
WSO2 Inc. | http://wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Clustering in WSO2 EI 6.1.1

2018-02-14 Thread Senduran Balasubramaniyam
Hi Dhanya,

EI 6.1.1 does support Worker Manager setup. but we highly *recommend* to
use *nonWorkerManager* setup. Further worker manager setup does not add any
additional value to the cluster.

>
> Also, for a basic environment setup is the Hazelcast enough for a
> production
> box?
>
I am not quite clear on your question.
Anyway. the current clustering agent is Hazelcast and it can be used in a
production environment


Regards
Senduran

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



-- 
*Senduran *
Senior Software Engineer,
WSO2, Inc.;  http://wso2.com/ 
Mobile: +94 77 952 6548
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Clustering in WSO2 EI 6.1.1

2018-02-14 Thread dhanya
Hi,

Also, for a basic environment setup is the Hazelcast enough for a production
box?

Thanks and regards
Dhanya



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


[Dev] Clustering in WSO2 EI 6.1.1

2018-02-14 Thread dhanya
Hi,

Does wso2 EI 6.1.1 supports Worker/Manager clustering? 

https://docs.wso2.com/display/EI611/Clustered+Deployment.
The above mentioned link refers to only the 2 node cluster. Does that mean
other cluster options are not supported in wso2 EI?


Thanks and regards
Dhanya

Ref:https://docs.wso2.com/display/CLUSTER44x/Configuring+Clustering+for+Specific+Products



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


[Dev] Performing XA transactions with MYSQL

2018-02-14 Thread Himasha Guruge
Hi,

I have configured master-datasources.xml and used transaction mediator
similar to [1] with MYSQL.  In a scenario , where  we restart MYSQL server
while executing a transaction following error is displayed and we cannot
perform any more transactions without a EI server restart.

Caused by: com.atomikos.datasource.ResourceException: XA resource 'TXDB1':
resume for XID
'3132372E302E302E312E746D30303030383030303639:3132372E302E302E312E746D38'
raised -7: the XA resource has become unavailable

at
com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:505)


According to [2] it seems to be a known issue with MYSQL XA transactions
,which occurs when we try to access the same database multiple times using
the same transaction. It also suggests a workaround of setting some
properties, however this does not solve the issue.(Tried with
mysql-connector-java-6.0.6.jar) Appreciate any feedback on this.

 [1] https://docs.wso2.com/display/EI611/Transaction+Mediator+Example
 [2]
https://www.atomikos.com/Documentation/KnownProblems#JTDS_XA_Driver_Problems

Thanks,
Himasha Guruge
Senior Software Engineer
WS*O2* *Inc.*
Mobile: +94 777459299
himas...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev