Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2018-02-15 Thread Afkham Azeez
Yeah get rid of it!

On Thu, Feb 15, 2018 at 7:11 PM, Sagara Gunathunga  wrote:

>
> It seems -Dsetup is broken in some products, the correct action should be
> get rid of this non-production feature instead of fixing. Going forward we
> will remove relevant doc content from IS 5.0.0 and will try to remove code
> from next release.
>
> Thanks !
>
> On Fri, May 6, 2016 at 1:31 PM, Isuru Perera  wrote:
>
>> Hi Sameera,
>>
>> Thanks for confirming!
>>
>> So, the products also should not try to implement this feature. (This is
>> what I wanted to confirm. Not just implementing -Dsetup support in C5).
>>
>> On Fri, May 6, 2016 at 1:24 PM, Sameera Jayasoma 
>> wrote:
>>
>>> Hi Isuru,
>>>
>>> As I've explained earlier. We will not implement -Dsetup support in C5.
>>>
>>> Thanks,
>>> Sameera.
>>>
>>> On Fri, May 6, 2016 at 1:11 PM, Isuru Perera  wrote:
>>>
 Yes. -Dsetup is easier, but let's avoid setting up database from the
 server. In Wiki, we can give instructions on setting up databases for each
 vendor.

 Carbon Team, could you please let us know your conclusion on this?

 On Wed, May 4, 2016 at 4:55 PM, Isuru Haththotuwa 
 wrote:

> Hi Sagara,
>
> On Fri, Apr 29, 2016 at 5:31 PM, Sagara Gunathunga 
> wrote:
>
>>
>>
>> On Fri, Apr 29, 2016 at 4:21 PM, Isuru Perera 
>> wrote:
>>
>>> Hi Sameera,
>>>
>>> As Thilini mentioned, most of the products need a database to keep
>>> data. With -Dsetup we could execute scripts based on the vendor. We need
>>> some way of setting up the database in C5 as well.
>>>
>>> I'm sorry I couldn't create a JIRA for $subject yet.
>>>
>>> In C5, what is the recommended way to setup a database (by creating
>>> required tables) for a WSO2 product?
>>>
>>> On Fri, Apr 29, 2016 at 3:45 PM, Thilini Cooray 
>>> wrote:
>>>
 Hi,

 In many of our carbon 4.x.x based products, we use -Dsetup option
 allowing users to create databases on their preferred vendor (instead 
 of
 our inbuilt H2 database).
 Without this option, users will have to run database scripts
 against each of the databases by themselves prior to server startup.

 Therefor I think it is a useful option to have in C5.

>>>
>>  I'm -1 to include this option into C5 products due to following
>> reasons.
>>
>> 1.) This option available with C4 product is just a demoware only,
>> nobody use this option to populate databases in production systems.
>> Recommended practise for production environments is  DB admin/team 
>> populate
>> databases manually and create user with limited privileges so that
>> applications use this limited-privileged user to access the database
>> server.
>>
>
>> 2.) In production systems, those admin rights are not anyway assign
>> to generic users hence not usable feature even if we include this option 
>> it
>> will use for demos only. Also previously we found some lazy practises 
>> where
>> developer assumed DB user always got admin rights and try to perform DB
>> admin tasks through our Java codes[1].
>>
>> 3.) Having this option in production systems increase security risks.
>>
> Fully agreed that this should not be the recommended method for
> creating DB tables in production environments. However IMHO the ease of
> trying out/demonstrating is very important.
>
> As an example scenario, we are focusing more and more on making wso2
> products container friendly and easy to try out. A user trying out a
> distributed deployment deployment on a containerized environment (docker,
> kubernetes, etc.) will expect to deploy it with minimal steps: start a
> mysql container and start the products pointing to the mysql container. If
> a method similar to -Dsetup is available, it will make the life of the 
> user
> much easier, rather than having to run the DB scripts manually.
>
>
> [1] - "TrustedIdPDBInitializer Class should not create any tables,
> indexes when -Dsetup is not given"
>
>
> Thanks !
>
>>
>>> Thanks.
>>>
>>> On Fri, Apr 29, 2016 at 3:24 PM, Sameera Jayasoma 
>>> wrote:
>>>
 Hi Isuru,

 Can you explain the need to have a -Dsetup option? Can we simply
 remove this in C5?

 Thanks,
 Sameera.


 On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera 
 wrote:

> Hi,
>
> In Carbon 4.x.x, we extend [1] 
> org.wso2.carbon.utils.dbcreator.DatabaseCreator
> [2]. How can we do the same in Carbon 5?
>
> Thanks!
>
> [1] https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&;
> ref=advsearch&type=Code&utf8=%E2%9C%93
> [2] htt

Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2018-02-15 Thread Sagara Gunathunga
It seems -Dsetup is broken in some products, the correct action should be
get rid of this non-production feature instead of fixing. Going forward we
will remove relevant doc content from IS 5.0.0 and will try to remove code
from next release.

Thanks !

On Fri, May 6, 2016 at 1:31 PM, Isuru Perera  wrote:

> Hi Sameera,
>
> Thanks for confirming!
>
> So, the products also should not try to implement this feature. (This is
> what I wanted to confirm. Not just implementing -Dsetup support in C5).
>
> On Fri, May 6, 2016 at 1:24 PM, Sameera Jayasoma  wrote:
>
>> Hi Isuru,
>>
>> As I've explained earlier. We will not implement -Dsetup support in C5.
>>
>> Thanks,
>> Sameera.
>>
>> On Fri, May 6, 2016 at 1:11 PM, Isuru Perera  wrote:
>>
>>> Yes. -Dsetup is easier, but let's avoid setting up database from the
>>> server. In Wiki, we can give instructions on setting up databases for each
>>> vendor.
>>>
>>> Carbon Team, could you please let us know your conclusion on this?
>>>
>>> On Wed, May 4, 2016 at 4:55 PM, Isuru Haththotuwa 
>>> wrote:
>>>
 Hi Sagara,

 On Fri, Apr 29, 2016 at 5:31 PM, Sagara Gunathunga 
 wrote:

>
>
> On Fri, Apr 29, 2016 at 4:21 PM, Isuru Perera  wrote:
>
>> Hi Sameera,
>>
>> As Thilini mentioned, most of the products need a database to keep
>> data. With -Dsetup we could execute scripts based on the vendor. We need
>> some way of setting up the database in C5 as well.
>>
>> I'm sorry I couldn't create a JIRA for $subject yet.
>>
>> In C5, what is the recommended way to setup a database (by creating
>> required tables) for a WSO2 product?
>>
>> On Fri, Apr 29, 2016 at 3:45 PM, Thilini Cooray 
>> wrote:
>>
>>> Hi,
>>>
>>> In many of our carbon 4.x.x based products, we use -Dsetup option
>>> allowing users to create databases on their preferred vendor (instead of
>>> our inbuilt H2 database).
>>> Without this option, users will have to run database scripts against
>>> each of the databases by themselves prior to server startup.
>>>
>>> Therefor I think it is a useful option to have in C5.
>>>
>>
>  I'm -1 to include this option into C5 products due to following
> reasons.
>
> 1.) This option available with C4 product is just a demoware only,
> nobody use this option to populate databases in production systems.
> Recommended practise for production environments is  DB admin/team 
> populate
> databases manually and create user with limited privileges so that
> applications use this limited-privileged user to access the database
> server.
>

> 2.) In production systems, those admin rights are not anyway assign to
> generic users hence not usable feature even if we include this option it
> will use for demos only. Also previously we found some lazy practises 
> where
> developer assumed DB user always got admin rights and try to perform DB
> admin tasks through our Java codes[1].
>
> 3.) Having this option in production systems increase security risks.
>
 Fully agreed that this should not be the recommended method for
 creating DB tables in production environments. However IMHO the ease of
 trying out/demonstrating is very important.

 As an example scenario, we are focusing more and more on making wso2
 products container friendly and easy to try out. A user trying out a
 distributed deployment deployment on a containerized environment (docker,
 kubernetes, etc.) will expect to deploy it with minimal steps: start a
 mysql container and start the products pointing to the mysql container. If
 a method similar to -Dsetup is available, it will make the life of the user
 much easier, rather than having to run the DB scripts manually.


 [1] - "TrustedIdPDBInitializer Class should not create any tables,
 indexes when -Dsetup is not given"


 Thanks !

>
>> Thanks.
>>
>> On Fri, Apr 29, 2016 at 3:24 PM, Sameera Jayasoma 
>> wrote:
>>
>>> Hi Isuru,
>>>
>>> Can you explain the need to have a -Dsetup option? Can we simply
>>> remove this in C5?
>>>
>>> Thanks,
>>> Sameera.
>>>
>>>
>>> On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera 
>>> wrote:
>>>
 Hi,

 In Carbon 4.x.x, we extend [1] 
 org.wso2.carbon.utils.dbcreator.DatabaseCreator
 [2]. How can we do the same in Carbon 5?

 Thanks!

 [1] https://github.com/search?l=&q=DatabaseCreator++user%
 3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
 [2] https://github.com/wso2/carbon-kernel/blob/4.4.x/core/
 org.wso2.carbon.utils/src/main/java/org/wso2/carbon/
 utils/dbcreator/DatabaseCreator.java

 --
 Isuru Perera
 Associate Technical Lead | WSO2, Inc. | http://wso2.

Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-05-06 Thread Isuru Perera
Hi Sameera,

Thanks for confirming!

So, the products also should not try to implement this feature. (This is
what I wanted to confirm. Not just implementing -Dsetup support in C5).

On Fri, May 6, 2016 at 1:24 PM, Sameera Jayasoma  wrote:

> Hi Isuru,
>
> As I've explained earlier. We will not implement -Dsetup support in C5.
>
> Thanks,
> Sameera.
>
> On Fri, May 6, 2016 at 1:11 PM, Isuru Perera  wrote:
>
>> Yes. -Dsetup is easier, but let's avoid setting up database from the
>> server. In Wiki, we can give instructions on setting up databases for each
>> vendor.
>>
>> Carbon Team, could you please let us know your conclusion on this?
>>
>> On Wed, May 4, 2016 at 4:55 PM, Isuru Haththotuwa 
>> wrote:
>>
>>> Hi Sagara,
>>>
>>> On Fri, Apr 29, 2016 at 5:31 PM, Sagara Gunathunga 
>>> wrote:
>>>


 On Fri, Apr 29, 2016 at 4:21 PM, Isuru Perera  wrote:

> Hi Sameera,
>
> As Thilini mentioned, most of the products need a database to keep
> data. With -Dsetup we could execute scripts based on the vendor. We need
> some way of setting up the database in C5 as well.
>
> I'm sorry I couldn't create a JIRA for $subject yet.
>
> In C5, what is the recommended way to setup a database (by creating
> required tables) for a WSO2 product?
>
> On Fri, Apr 29, 2016 at 3:45 PM, Thilini Cooray 
> wrote:
>
>> Hi,
>>
>> In many of our carbon 4.x.x based products, we use -Dsetup option
>> allowing users to create databases on their preferred vendor (instead of
>> our inbuilt H2 database).
>> Without this option, users will have to run database scripts against
>> each of the databases by themselves prior to server startup.
>>
>> Therefor I think it is a useful option to have in C5.
>>
>
  I'm -1 to include this option into C5 products due to following
 reasons.

 1.) This option available with C4 product is just a demoware only,
 nobody use this option to populate databases in production systems.
 Recommended practise for production environments is  DB admin/team populate
 databases manually and create user with limited privileges so that
 applications use this limited-privileged user to access the database
 server.

>>>
 2.) In production systems, those admin rights are not anyway assign to
 generic users hence not usable feature even if we include this option it
 will use for demos only. Also previously we found some lazy practises where
 developer assumed DB user always got admin rights and try to perform DB
 admin tasks through our Java codes[1].

 3.) Having this option in production systems increase security risks.

>>> Fully agreed that this should not be the recommended method for creating
>>> DB tables in production environments. However IMHO the ease of trying
>>> out/demonstrating is very important.
>>>
>>> As an example scenario, we are focusing more and more on making wso2
>>> products container friendly and easy to try out. A user trying out a
>>> distributed deployment deployment on a containerized environment (docker,
>>> kubernetes, etc.) will expect to deploy it with minimal steps: start a
>>> mysql container and start the products pointing to the mysql container. If
>>> a method similar to -Dsetup is available, it will make the life of the user
>>> much easier, rather than having to run the DB scripts manually.
>>>
>>>
>>> [1] - "TrustedIdPDBInitializer Class should not create any tables,
>>> indexes when -Dsetup is not given"
>>>
>>>
>>> Thanks !
>>>

> Thanks.
>
> On Fri, Apr 29, 2016 at 3:24 PM, Sameera Jayasoma 
> wrote:
>
>> Hi Isuru,
>>
>> Can you explain the need to have a -Dsetup option? Can we simply
>> remove this in C5?
>>
>> Thanks,
>> Sameera.
>>
>>
>> On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera 
>> wrote:
>>
>>> Hi,
>>>
>>> In Carbon 4.x.x, we extend [1]
>>> org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the 
>>> same
>>> in Carbon 5?
>>>
>>> Thanks!
>>>
>>> [1]
>>> https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
>>> [2]
>>> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java
>>>
>>> --
>>> Isuru Perera
>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>> Contact: +IsuruPereraWSO2
>>> 
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Sameera Jayasoma,
>> Software Architect,
>>
>> WSO2, Inc. (http://wso2.

Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-05-06 Thread Sameera Jayasoma
Hi Isuru,

As I've explained earlier. We will not implement -Dsetup support in C5.

Thanks,
Sameera.

On Fri, May 6, 2016 at 1:11 PM, Isuru Perera  wrote:

> Yes. -Dsetup is easier, but let's avoid setting up database from the
> server. In Wiki, we can give instructions on setting up databases for each
> vendor.
>
> Carbon Team, could you please let us know your conclusion on this?
>
> On Wed, May 4, 2016 at 4:55 PM, Isuru Haththotuwa  wrote:
>
>> Hi Sagara,
>>
>> On Fri, Apr 29, 2016 at 5:31 PM, Sagara Gunathunga 
>> wrote:
>>
>>>
>>>
>>> On Fri, Apr 29, 2016 at 4:21 PM, Isuru Perera  wrote:
>>>
 Hi Sameera,

 As Thilini mentioned, most of the products need a database to keep
 data. With -Dsetup we could execute scripts based on the vendor. We need
 some way of setting up the database in C5 as well.

 I'm sorry I couldn't create a JIRA for $subject yet.

 In C5, what is the recommended way to setup a database (by creating
 required tables) for a WSO2 product?

 On Fri, Apr 29, 2016 at 3:45 PM, Thilini Cooray 
 wrote:

> Hi,
>
> In many of our carbon 4.x.x based products, we use -Dsetup option
> allowing users to create databases on their preferred vendor (instead of
> our inbuilt H2 database).
> Without this option, users will have to run database scripts against
> each of the databases by themselves prior to server startup.
>
> Therefor I think it is a useful option to have in C5.
>

>>>  I'm -1 to include this option into C5 products due to following
>>> reasons.
>>>
>>> 1.) This option available with C4 product is just a demoware only,
>>> nobody use this option to populate databases in production systems.
>>> Recommended practise for production environments is  DB admin/team populate
>>> databases manually and create user with limited privileges so that
>>> applications use this limited-privileged user to access the database
>>> server.
>>>
>>
>>> 2.) In production systems, those admin rights are not anyway assign to
>>> generic users hence not usable feature even if we include this option it
>>> will use for demos only. Also previously we found some lazy practises where
>>> developer assumed DB user always got admin rights and try to perform DB
>>> admin tasks through our Java codes[1].
>>>
>>> 3.) Having this option in production systems increase security risks.
>>>
>> Fully agreed that this should not be the recommended method for creating
>> DB tables in production environments. However IMHO the ease of trying
>> out/demonstrating is very important.
>>
>> As an example scenario, we are focusing more and more on making wso2
>> products container friendly and easy to try out. A user trying out a
>> distributed deployment deployment on a containerized environment (docker,
>> kubernetes, etc.) will expect to deploy it with minimal steps: start a
>> mysql container and start the products pointing to the mysql container. If
>> a method similar to -Dsetup is available, it will make the life of the user
>> much easier, rather than having to run the DB scripts manually.
>>
>>
>> [1] - "TrustedIdPDBInitializer Class should not create any tables,
>> indexes when -Dsetup is not given"
>>
>>
>> Thanks !
>>
>>>
 Thanks.

 On Fri, Apr 29, 2016 at 3:24 PM, Sameera Jayasoma 
 wrote:

> Hi Isuru,
>
> Can you explain the need to have a -Dsetup option? Can we simply
> remove this in C5?
>
> Thanks,
> Sameera.
>
>
> On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:
>
>> Hi,
>>
>> In Carbon 4.x.x, we extend [1]
>> org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the 
>> same
>> in Carbon 5?
>>
>> Thanks!
>>
>> [1]
>> https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
>> [2]
>> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java
>>
>> --
>> Isuru Perera
>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>> Contact: +IsuruPereraWSO2
>> 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Sameera Jayasoma,
> Software Architect,
>
> WSO2, Inc. (http://wso2.com)
> email: same...@wso2.com
> blog: http://blog.sameera.org
> twitter: https://twitter.com/sameerajayasoma
> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
> Mobile: 0094776364456
>
> Lean . Enterprise . Middleware
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi

Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-05-06 Thread Isuru Perera
Yes. -Dsetup is easier, but let's avoid setting up database from the
server. In Wiki, we can give instructions on setting up databases for each
vendor.

Carbon Team, could you please let us know your conclusion on this?

On Wed, May 4, 2016 at 4:55 PM, Isuru Haththotuwa  wrote:

> Hi Sagara,
>
> On Fri, Apr 29, 2016 at 5:31 PM, Sagara Gunathunga 
> wrote:
>
>>
>>
>> On Fri, Apr 29, 2016 at 4:21 PM, Isuru Perera  wrote:
>>
>>> Hi Sameera,
>>>
>>> As Thilini mentioned, most of the products need a database to keep data.
>>> With -Dsetup we could execute scripts based on the vendor. We need some way
>>> of setting up the database in C5 as well.
>>>
>>> I'm sorry I couldn't create a JIRA for $subject yet.
>>>
>>> In C5, what is the recommended way to setup a database (by creating
>>> required tables) for a WSO2 product?
>>>
>>> On Fri, Apr 29, 2016 at 3:45 PM, Thilini Cooray 
>>> wrote:
>>>
 Hi,

 In many of our carbon 4.x.x based products, we use -Dsetup option
 allowing users to create databases on their preferred vendor (instead of
 our inbuilt H2 database).
 Without this option, users will have to run database scripts against
 each of the databases by themselves prior to server startup.

 Therefor I think it is a useful option to have in C5.

>>>
>>  I'm -1 to include this option into C5 products due to following reasons.
>>
>> 1.) This option available with C4 product is just a demoware only, nobody
>> use this option to populate databases in production systems. Recommended
>> practise for production environments is  DB admin/team populate databases
>> manually and create user with limited privileges so that applications use
>> this limited-privileged user to access the database server.
>>
>
>> 2.) In production systems, those admin rights are not anyway assign to
>> generic users hence not usable feature even if we include this option it
>> will use for demos only. Also previously we found some lazy practises where
>> developer assumed DB user always got admin rights and try to perform DB
>> admin tasks through our Java codes[1].
>>
>> 3.) Having this option in production systems increase security risks.
>>
> Fully agreed that this should not be the recommended method for creating
> DB tables in production environments. However IMHO the ease of trying
> out/demonstrating is very important.
>
> As an example scenario, we are focusing more and more on making wso2
> products container friendly and easy to try out. A user trying out a
> distributed deployment deployment on a containerized environment (docker,
> kubernetes, etc.) will expect to deploy it with minimal steps: start a
> mysql container and start the products pointing to the mysql container. If
> a method similar to -Dsetup is available, it will make the life of the user
> much easier, rather than having to run the DB scripts manually.
>
>
> [1] - "TrustedIdPDBInitializer Class should not create any tables, indexes
> when -Dsetup is not given"
>
>
> Thanks !
>
>>
>>> Thanks.
>>>
>>> On Fri, Apr 29, 2016 at 3:24 PM, Sameera Jayasoma 
>>> wrote:
>>>
 Hi Isuru,

 Can you explain the need to have a -Dsetup option? Can we simply remove
 this in C5?

 Thanks,
 Sameera.


 On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:

> Hi,
>
> In Carbon 4.x.x, we extend [1]
> org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the 
> same
> in Carbon 5?
>
> Thanks!
>
> [1]
> https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
> [2]
> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2
> 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 Sameera Jayasoma,
 Software Architect,

 WSO2, Inc. (http://wso2.com)
 email: same...@wso2.com
 blog: http://blog.sameera.org
 twitter: https://twitter.com/sameerajayasoma
 flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
 Mobile: 0094776364456

 Lean . Enterprise . Middleware


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


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

Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-05-04 Thread Isuru Haththotuwa
Hi Sagara,

On Fri, Apr 29, 2016 at 5:31 PM, Sagara Gunathunga  wrote:

>
>
> On Fri, Apr 29, 2016 at 4:21 PM, Isuru Perera  wrote:
>
>> Hi Sameera,
>>
>> As Thilini mentioned, most of the products need a database to keep data.
>> With -Dsetup we could execute scripts based on the vendor. We need some way
>> of setting up the database in C5 as well.
>>
>> I'm sorry I couldn't create a JIRA for $subject yet.
>>
>> In C5, what is the recommended way to setup a database (by creating
>> required tables) for a WSO2 product?
>>
>> On Fri, Apr 29, 2016 at 3:45 PM, Thilini Cooray 
>> wrote:
>>
>>> Hi,
>>>
>>> In many of our carbon 4.x.x based products, we use -Dsetup option
>>> allowing users to create databases on their preferred vendor (instead of
>>> our inbuilt H2 database).
>>> Without this option, users will have to run database scripts against
>>> each of the databases by themselves prior to server startup.
>>>
>>> Therefor I think it is a useful option to have in C5.
>>>
>>
>  I'm -1 to include this option into C5 products due to following reasons.
>
> 1.) This option available with C4 product is just a demoware only, nobody
> use this option to populate databases in production systems. Recommended
> practise for production environments is  DB admin/team populate databases
> manually and create user with limited privileges so that applications use
> this limited-privileged user to access the database server.
>

> 2.) In production systems, those admin rights are not anyway assign to
> generic users hence not usable feature even if we include this option it
> will use for demos only. Also previously we found some lazy practises where
> developer assumed DB user always got admin rights and try to perform DB
> admin tasks through our Java codes[1].
>
> 3.) Having this option in production systems increase security risks.
>
Fully agreed that this should not be the recommended method for creating DB
tables in production environments. However IMHO the ease of trying
out/demonstrating is very important.

As an example scenario, we are focusing more and more on making wso2
products container friendly and easy to try out. A user trying out a
distributed deployment deployment on a containerized environment (docker,
kubernetes, etc.) will expect to deploy it with minimal steps: start a
mysql container and start the products pointing to the mysql container. If
a method similar to -Dsetup is available, it will make the life of the user
much easier, rather than having to run the DB scripts manually.

[1] - "TrustedIdPDBInitializer Class should not create any tables, indexes
when -Dsetup is not given"


Thanks !

>
>> Thanks.
>>
>> On Fri, Apr 29, 2016 at 3:24 PM, Sameera Jayasoma 
>> wrote:
>>
>>> Hi Isuru,
>>>
>>> Can you explain the need to have a -Dsetup option? Can we simply remove
>>> this in C5?
>>>
>>> Thanks,
>>> Sameera.
>>>
>>>
>>> On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:
>>>
 Hi,

 In Carbon 4.x.x, we extend [1]
 org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the same
 in Carbon 5?

 Thanks!

 [1]
 https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
 [2]
 https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java

 --
 Isuru Perera
 Associate Technical Lead | WSO2, Inc. | http://wso2.com/
 Lean . Enterprise . Middleware

 about.me/chrishantha
 Contact: +IsuruPereraWSO2
 

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


>>>
>>>
>>> --
>>> Sameera Jayasoma,
>>> Software Architect,
>>>
>>> WSO2, Inc. (http://wso2.com)
>>> email: same...@wso2.com
>>> blog: http://blog.sameera.org
>>> twitter: https://twitter.com/sameerajayasoma
>>> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
>>> Mobile: 0094776364456
>>>
>>> Lean . Enterprise . Middleware
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Best Regards,
>>
>> *Thilini Cooray*
>> Software Engineer
>> Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20773%20451194>
>> E-mail : thili...@wso2.com
>>
>> WSO2 Inc. www.wso2.com
>> lean.enterprise.middleware
>>
>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
> --
> Sagara Gunathunga
>
> Architect; WSO2, Inc.;  http://wso2.com
> V.P Apache Web Services;http://ws.apache.org/
> Linke

Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-05-03 Thread Isuru Perera
+1. I also think that we can remove the support for -Dsetup in C5 products
and I agree with Sagara's points.

I just wanted to check what we should do about the missing feature when
migrating the metrics code to C5 based products.

Shall we send a mail to architecture@ and tell that we will no longer
support -Dsetup and the reasons for doing that. We should also tell the
recommended ways to setup the databases.

Thanks!

On Fri, Apr 29, 2016 at 6:33 PM, Aruna Karunarathna  wrote:

>
> On Fri, Apr 29, 2016 at 5:31 PM, Sagara Gunathunga 
> wrote:
>
>>
>>
>> On Fri, Apr 29, 2016 at 4:21 PM, Isuru Perera  wrote:
>>
>>> Hi Sameera,
>>>
>>> As Thilini mentioned, most of the products need a database to keep data.
>>> With -Dsetup we could execute scripts based on the vendor. We need some way
>>> of setting up the database in C5 as well.
>>>
>>> I'm sorry I couldn't create a JIRA for $subject yet.
>>>
>>> In C5, what is the recommended way to setup a database (by creating
>>> required tables) for a WSO2 product?
>>>
>>> On Fri, Apr 29, 2016 at 3:45 PM, Thilini Cooray 
>>> wrote:
>>>
 Hi,

 In many of our carbon 4.x.x based products, we use -Dsetup option
 allowing users to create databases on their preferred vendor (instead of
 our inbuilt H2 database).
 Without this option, users will have to run database scripts against
 each of the databases by themselves prior to server startup.

 Therefor I think it is a useful option to have in C5.

>>>
>>  I'm -1 to include this option into C5 products due to following reasons.
>>
>> 1.) This option available with C4 product is just a demoware only, nobody
>> use this option to populate databases in production systems. Recommended
>> practise for production environments is  DB admin/team populate databases
>> manually and create user with limited privileges so that applications use
>> this limited-privileged user to access the database server.
>>
>> 2.) In production systems, those admin rights are not anyway assign to
>> generic users hence not usable feature even if we include this option it
>> will use for demos only. Also previously we found some lazy practises where
>> developer assumed DB user always got admin rights and try to perform DB
>> admin tasks through our Java codes[1].
>>
>> 3.) Having this option in production systems increase security risks.
>>
>>
>> [1] - "TrustedIdPDBInitializer Class should not create any tables,
>> indexes when -Dsetup is not given"
>>
>>
>> +1.
> IMO We need to provide a way to try out the products on the go. Maybe
> adding a H2/file-based database as we did in C4. and packing the necessary
> db scripts for running in production will be good enough.
>
>> Thanks !
>>
>>>
 Thanks.

 On Fri, Apr 29, 2016 at 3:24 PM, Sameera Jayasoma 
 wrote:

> Hi Isuru,
>
> Can you explain the need to have a -Dsetup option? Can we simply
> remove this in C5?
>
> Thanks,
> Sameera.
>
>
> On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:
>
>> Hi,
>>
>> In Carbon 4.x.x, we extend [1]
>> org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the 
>> same
>> in Carbon 5?
>>
>> Thanks!
>>
>> [1]
>> https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
>> [2]
>> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java
>>
>> --
>> Isuru Perera
>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>> Contact: +IsuruPereraWSO2
>> 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Sameera Jayasoma,
> Software Architect,
>
> WSO2, Inc. (http://wso2.com)
> email: same...@wso2.com
> blog: http://blog.sameera.org
> twitter: https://twitter.com/sameerajayasoma
> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
> Mobile: 0094776364456
>
> Lean . Enterprise . Middleware
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 Best Regards,

 *Thilini Cooray*
 Software Engineer
 Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20773%20451194>
 E-mail : thili...@wso2.com

 WSO2 Inc. www.wso2.com
 lean.enterprise.middleware

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

Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-04-29 Thread Aruna Karunarathna
On Fri, Apr 29, 2016 at 5:31 PM, Sagara Gunathunga  wrote:

>
>
> On Fri, Apr 29, 2016 at 4:21 PM, Isuru Perera  wrote:
>
>> Hi Sameera,
>>
>> As Thilini mentioned, most of the products need a database to keep data.
>> With -Dsetup we could execute scripts based on the vendor. We need some way
>> of setting up the database in C5 as well.
>>
>> I'm sorry I couldn't create a JIRA for $subject yet.
>>
>> In C5, what is the recommended way to setup a database (by creating
>> required tables) for a WSO2 product?
>>
>> On Fri, Apr 29, 2016 at 3:45 PM, Thilini Cooray 
>> wrote:
>>
>>> Hi,
>>>
>>> In many of our carbon 4.x.x based products, we use -Dsetup option
>>> allowing users to create databases on their preferred vendor (instead of
>>> our inbuilt H2 database).
>>> Without this option, users will have to run database scripts against
>>> each of the databases by themselves prior to server startup.
>>>
>>> Therefor I think it is a useful option to have in C5.
>>>
>>
>  I'm -1 to include this option into C5 products due to following reasons.
>
> 1.) This option available with C4 product is just a demoware only, nobody
> use this option to populate databases in production systems. Recommended
> practise for production environments is  DB admin/team populate databases
> manually and create user with limited privileges so that applications use
> this limited-privileged user to access the database server.
>
> 2.) In production systems, those admin rights are not anyway assign to
> generic users hence not usable feature even if we include this option it
> will use for demos only. Also previously we found some lazy practises where
> developer assumed DB user always got admin rights and try to perform DB
> admin tasks through our Java codes[1].
>
> 3.) Having this option in production systems increase security risks.
>
>
> [1] - "TrustedIdPDBInitializer Class should not create any tables, indexes
> when -Dsetup is not given"
>
>
> +1.
IMO We need to provide a way to try out the products on the go. Maybe
adding a H2/file-based database as we did in C4. and packing the necessary
db scripts for running in production will be good enough.

> Thanks !
>
>>
>>> Thanks.
>>>
>>> On Fri, Apr 29, 2016 at 3:24 PM, Sameera Jayasoma 
>>> wrote:
>>>
 Hi Isuru,

 Can you explain the need to have a -Dsetup option? Can we simply remove
 this in C5?

 Thanks,
 Sameera.


 On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:

> Hi,
>
> In Carbon 4.x.x, we extend [1]
> org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the 
> same
> in Carbon 5?
>
> Thanks!
>
> [1]
> https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
> [2]
> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2
> 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 Sameera Jayasoma,
 Software Architect,

 WSO2, Inc. (http://wso2.com)
 email: same...@wso2.com
 blog: http://blog.sameera.org
 twitter: https://twitter.com/sameerajayasoma
 flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
 Mobile: 0094776364456

 Lean . Enterprise . Middleware


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


>>>
>>>
>>> --
>>> Best Regards,
>>>
>>> *Thilini Cooray*
>>> Software Engineer
>>> Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20773%20451194>
>>> E-mail : thili...@wso2.com
>>>
>>> WSO2 Inc. www.wso2.com
>>> lean.enterprise.middleware
>>>
>>
>>
>>
>> --
>> Isuru Perera
>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>> Contact: +IsuruPereraWSO2 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Sagara Gunathunga
>
> Architect; WSO2, Inc.;  http://wso2.com
> V.P Apache Web Services;http://ws.apache.org/
> Linkedin; http://www.linkedin.com/in/ssagara
> Blog ;  http://ssagara.blogspot.com
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Aruna Sujith Karunarathna *
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 9040362 | Work: +94

Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-04-29 Thread Sagara Gunathunga
On Fri, Apr 29, 2016 at 4:21 PM, Isuru Perera  wrote:

> Hi Sameera,
>
> As Thilini mentioned, most of the products need a database to keep data.
> With -Dsetup we could execute scripts based on the vendor. We need some way
> of setting up the database in C5 as well.
>
> I'm sorry I couldn't create a JIRA for $subject yet.
>
> In C5, what is the recommended way to setup a database (by creating
> required tables) for a WSO2 product?
>
> On Fri, Apr 29, 2016 at 3:45 PM, Thilini Cooray  wrote:
>
>> Hi,
>>
>> In many of our carbon 4.x.x based products, we use -Dsetup option
>> allowing users to create databases on their preferred vendor (instead of
>> our inbuilt H2 database).
>> Without this option, users will have to run database scripts against each
>> of the databases by themselves prior to server startup.
>>
>> Therefor I think it is a useful option to have in C5.
>>
>
 I'm -1 to include this option into C5 products due to following reasons.

1.) This option available with C4 product is just a demoware only, nobody
use this option to populate databases in production systems. Recommended
practise for production environments is  DB admin/team populate databases
manually and create user with limited privileges so that applications use
this limited-privileged user to access the database server.

2.) In production systems, those admin rights are not anyway assign to
generic users hence not usable feature even if we include this option it
will use for demos only. Also previously we found some lazy practises where
developer assumed DB user always got admin rights and try to perform DB
admin tasks through our Java codes[1].

3.) Having this option in production systems increase security risks.


[1] - "TrustedIdPDBInitializer Class should not create any tables, indexes
when -Dsetup is not given"


Thanks !

>
>> Thanks.
>>
>> On Fri, Apr 29, 2016 at 3:24 PM, Sameera Jayasoma 
>> wrote:
>>
>>> Hi Isuru,
>>>
>>> Can you explain the need to have a -Dsetup option? Can we simply remove
>>> this in C5?
>>>
>>> Thanks,
>>> Sameera.
>>>
>>>
>>> On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:
>>>
 Hi,

 In Carbon 4.x.x, we extend [1]
 org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the same
 in Carbon 5?

 Thanks!

 [1]
 https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
 [2]
 https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java

 --
 Isuru Perera
 Associate Technical Lead | WSO2, Inc. | http://wso2.com/
 Lean . Enterprise . Middleware

 about.me/chrishantha
 Contact: +IsuruPereraWSO2
 

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


>>>
>>>
>>> --
>>> Sameera Jayasoma,
>>> Software Architect,
>>>
>>> WSO2, Inc. (http://wso2.com)
>>> email: same...@wso2.com
>>> blog: http://blog.sameera.org
>>> twitter: https://twitter.com/sameerajayasoma
>>> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
>>> Mobile: 0094776364456
>>>
>>> Lean . Enterprise . Middleware
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Best Regards,
>>
>> *Thilini Cooray*
>> Software Engineer
>> Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20773%20451194>
>> E-mail : thili...@wso2.com
>>
>> WSO2 Inc. www.wso2.com
>> lean.enterprise.middleware
>>
>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Sagara Gunathunga

Architect; WSO2, Inc.;  http://wso2.com
V.P Apache Web Services;http://ws.apache.org/
Linkedin; http://www.linkedin.com/in/ssagara
Blog ;  http://ssagara.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-04-29 Thread Sameera Jayasoma
Hi All,

If we provide necessary scripts, wouldn't that be enough. When you are
setting up a deployment, users anyway populate tables using our DB scripts.
 -Dsetup is good enough only during the development period.

When you are setting up production deployments, I don't think users utilize
the -Dsetup option that much. Its much easier to populate the required
schemas using the scripts.

Thanks,
Sameera.

On Fri, Apr 29, 2016 at 4:21 PM, Isuru Perera  wrote:

> Hi Sameera,
>
> As Thilini mentioned, most of the products need a database to keep data.
> With -Dsetup we could execute scripts based on the vendor. We need some way
> of setting up the database in C5 as well.
>
> I'm sorry I couldn't create a JIRA for $subject yet.
>
> In C5, what is the recommended way to setup a database (by creating
> required tables) for a WSO2 product?
>
> On Fri, Apr 29, 2016 at 3:45 PM, Thilini Cooray  wrote:
>
>> Hi,
>>
>> In many of our carbon 4.x.x based products, we use -Dsetup option
>> allowing users to create databases on their preferred vendor (instead of
>> our inbuilt H2 database).
>> Without this option, users will have to run database scripts against each
>> of the databases by themselves prior to server startup.
>>
>> Therefor I think it is a useful option to have in C5.
>>
>> Thanks.
>>
>> On Fri, Apr 29, 2016 at 3:24 PM, Sameera Jayasoma 
>> wrote:
>>
>>> Hi Isuru,
>>>
>>> Can you explain the need to have a -Dsetup option? Can we simply remove
>>> this in C5?
>>>
>>> Thanks,
>>> Sameera.
>>>
>>>
>>> On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:
>>>
 Hi,

 In Carbon 4.x.x, we extend [1]
 org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the same
 in Carbon 5?

 Thanks!

 [1]
 https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
 [2]
 https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java

 --
 Isuru Perera
 Associate Technical Lead | WSO2, Inc. | http://wso2.com/
 Lean . Enterprise . Middleware

 about.me/chrishantha
 Contact: +IsuruPereraWSO2
 

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


>>>
>>>
>>> --
>>> Sameera Jayasoma,
>>> Software Architect,
>>>
>>> WSO2, Inc. (http://wso2.com)
>>> email: same...@wso2.com
>>> blog: http://blog.sameera.org
>>> twitter: https://twitter.com/sameerajayasoma
>>> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
>>> Mobile: 0094776364456
>>>
>>> Lean . Enterprise . Middleware
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Best Regards,
>>
>> *Thilini Cooray*
>> Software Engineer
>> Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20773%20451194>
>> E-mail : thili...@wso2.com
>>
>> WSO2 Inc. www.wso2.com
>> lean.enterprise.middleware
>>
>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>



-- 
Sameera Jayasoma,
Software Architect,

WSO2, Inc. (http://wso2.com)
email: same...@wso2.com
blog: http://blog.sameera.org
twitter: https://twitter.com/sameerajayasoma
flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
Mobile: 0094776364456

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


Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-04-29 Thread Isuru Perera
Hi Sameera,

As Thilini mentioned, most of the products need a database to keep data.
With -Dsetup we could execute scripts based on the vendor. We need some way
of setting up the database in C5 as well.

I'm sorry I couldn't create a JIRA for $subject yet.

In C5, what is the recommended way to setup a database (by creating
required tables) for a WSO2 product?

On Fri, Apr 29, 2016 at 3:45 PM, Thilini Cooray  wrote:

> Hi,
>
> In many of our carbon 4.x.x based products, we use -Dsetup option allowing
> users to create databases on their preferred vendor (instead of our inbuilt
> H2 database).
> Without this option, users will have to run database scripts against each
> of the databases by themselves prior to server startup.
>
> Therefor I think it is a useful option to have in C5.
>
> Thanks.
>
> On Fri, Apr 29, 2016 at 3:24 PM, Sameera Jayasoma 
> wrote:
>
>> Hi Isuru,
>>
>> Can you explain the need to have a -Dsetup option? Can we simply remove
>> this in C5?
>>
>> Thanks,
>> Sameera.
>>
>>
>> On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:
>>
>>> Hi,
>>>
>>> In Carbon 4.x.x, we extend [1]
>>> org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the same
>>> in Carbon 5?
>>>
>>> Thanks!
>>>
>>> [1]
>>> https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
>>> [2]
>>> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java
>>>
>>> --
>>> Isuru Perera
>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>> Contact: +IsuruPereraWSO2
>>> 
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Sameera Jayasoma,
>> Software Architect,
>>
>> WSO2, Inc. (http://wso2.com)
>> email: same...@wso2.com
>> blog: http://blog.sameera.org
>> twitter: https://twitter.com/sameerajayasoma
>> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
>> Mobile: 0094776364456
>>
>> Lean . Enterprise . Middleware
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Best Regards,
>
> *Thilini Cooray*
> Software Engineer
> Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20773%20451194>
> E-mail : thili...@wso2.com
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>



-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-04-29 Thread Thilini Cooray
Hi,

In many of our carbon 4.x.x based products, we use -Dsetup option allowing
users to create databases on their preferred vendor (instead of our inbuilt
H2 database).
Without this option, users will have to run database scripts against each
of the databases by themselves prior to server startup.

Therefor I think it is a useful option to have in C5.

Thanks.

On Fri, Apr 29, 2016 at 3:24 PM, Sameera Jayasoma  wrote:

> Hi Isuru,
>
> Can you explain the need to have a -Dsetup option? Can we simply remove
> this in C5?
>
> Thanks,
> Sameera.
>
>
> On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:
>
>> Hi,
>>
>> In Carbon 4.x.x, we extend [1]
>> org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the same
>> in Carbon 5?
>>
>> Thanks!
>>
>> [1]
>> https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
>> [2]
>> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java
>>
>> --
>> Isuru Perera
>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>> Contact: +IsuruPereraWSO2 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Sameera Jayasoma,
> Software Architect,
>
> WSO2, Inc. (http://wso2.com)
> email: same...@wso2.com
> blog: http://blog.sameera.org
> twitter: https://twitter.com/sameerajayasoma
> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
> Mobile: 0094776364456
>
> Lean . Enterprise . Middleware
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Best Regards,

*Thilini Cooray*
Software Engineer
Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20773%20451194>
E-mail : thili...@wso2.com

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


Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-04-29 Thread Sameera Jayasoma
Hi Isuru,

Can you explain the need to have a -Dsetup option? Can we simply remove
this in C5?

Thanks,
Sameera.


On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:

> Hi,
>
> In Carbon 4.x.x, we extend [1]
> org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the same
> in Carbon 5?
>
> Thanks!
>
> [1]
> https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
> [2]
> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Sameera Jayasoma,
Software Architect,

WSO2, Inc. (http://wso2.com)
email: same...@wso2.com
blog: http://blog.sameera.org
twitter: https://twitter.com/sameerajayasoma
flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
Mobile: 0094776364456

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


Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-04-12 Thread Kishanthan Thangarajah
Can you create a jira for this, so that will track and add it to
kernel/platform?

On Thu, Apr 7, 2016 at 5:37 PM, Isuru Perera  wrote:

> Hi Carbon team,
>
> When will this feature be implemented in Carbon? As I understand, most of
> the products need this feature.
>
> Thanks!
>
> On Tue, Mar 29, 2016 at 11:51 AM, Asitha Nanayakkara 
> wrote:
>
>> +1 for having this as a common feature. MB will also be using this
>> feature to create the database schema based on the database vendor.
>>
>> On Tue, Mar 29, 2016 at 11:09 AM, Isuru Perera  wrote:
>>
>>> Hi Aruna,
>>>
>>> I think this feature will be important for other products as most of the
>>> products will eventually need to create the database schema based on the
>>> database vendor.
>>>
>>> I hope MB team will also need this feature soon and it would be good if
>>> this feature can be supported in next platform release.
>>>
>>> Thanks!
>>>
>>> On Fri, Mar 25, 2016 at 2:03 PM, Aruna Karunarathna 
>>> wrote:
>>>


 On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:

> Hi,
>
> In Carbon 4.x.x, we extend [1]
> org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the 
> same
> in Carbon 5?
>

 Hi Isuru,

 There is no such feature planned or available ATM for hamming platform
 release.
 Regards,
 Aruna

>
> Thanks!
>
> [1]
> https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
> [2]
> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2
> 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --

 *Aruna Sujith Karunarathna *
 WSO2, Inc | lean. enterprise. middleware.
 #20, Palm Grove, Colombo 03, Sri Lanka
 Mobile: +94 71 9040362 | Work: +94 112145345
 Email: ar...@wso2.com | Web: www.wso2.com


>>>
>>>
>>>
>>> --
>>> Isuru Perera
>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>> Contact: +IsuruPereraWSO2
>>> 
>>>
>>
>>
>>
>> --
>> *Asitha Nanayakkara*
>> Software Engineer
>> WSO2, Inc. http://wso2.com/
>> Mob: +94 77 853 0682
>>
>>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>



-- 
*Kishanthan Thangarajah*
Associate Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com *
Twitter - *http://twitter.com/kishanthan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-04-07 Thread Isuru Perera
Hi Carbon team,

When will this feature be implemented in Carbon? As I understand, most of
the products need this feature.

Thanks!

On Tue, Mar 29, 2016 at 11:51 AM, Asitha Nanayakkara 
wrote:

> +1 for having this as a common feature. MB will also be using this feature
> to create the database schema based on the database vendor.
>
> On Tue, Mar 29, 2016 at 11:09 AM, Isuru Perera  wrote:
>
>> Hi Aruna,
>>
>> I think this feature will be important for other products as most of the
>> products will eventually need to create the database schema based on the
>> database vendor.
>>
>> I hope MB team will also need this feature soon and it would be good if
>> this feature can be supported in next platform release.
>>
>> Thanks!
>>
>> On Fri, Mar 25, 2016 at 2:03 PM, Aruna Karunarathna 
>> wrote:
>>
>>>
>>>
>>> On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:
>>>
 Hi,

 In Carbon 4.x.x, we extend [1]
 org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the same
 in Carbon 5?

>>>
>>> Hi Isuru,
>>>
>>> There is no such feature planned or available ATM for hamming platform
>>> release.
>>> Regards,
>>> Aruna
>>>

 Thanks!

 [1]
 https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
 [2]
 https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java

 --
 Isuru Perera
 Associate Technical Lead | WSO2, Inc. | http://wso2.com/
 Lean . Enterprise . Middleware

 about.me/chrishantha
 Contact: +IsuruPereraWSO2
 

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


>>>
>>>
>>> --
>>>
>>> *Aruna Sujith Karunarathna *
>>> WSO2, Inc | lean. enterprise. middleware.
>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>> Mobile: +94 71 9040362 | Work: +94 112145345
>>> Email: ar...@wso2.com | Web: www.wso2.com
>>>
>>>
>>
>>
>>
>> --
>> Isuru Perera
>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>> Contact: +IsuruPereraWSO2 
>>
>
>
>
> --
> *Asitha Nanayakkara*
> Software Engineer
> WSO2, Inc. http://wso2.com/
> Mob: +94 77 853 0682
>
>


-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-03-28 Thread Asitha Nanayakkara
+1 for having this as a common feature. MB will also be using this feature
to create the database schema based on the database vendor.

On Tue, Mar 29, 2016 at 11:09 AM, Isuru Perera  wrote:

> Hi Aruna,
>
> I think this feature will be important for other products as most of the
> products will eventually need to create the database schema based on the
> database vendor.
>
> I hope MB team will also need this feature soon and it would be good if
> this feature can be supported in next platform release.
>
> Thanks!
>
> On Fri, Mar 25, 2016 at 2:03 PM, Aruna Karunarathna 
> wrote:
>
>>
>>
>> On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:
>>
>>> Hi,
>>>
>>> In Carbon 4.x.x, we extend [1]
>>> org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the same
>>> in Carbon 5?
>>>
>>
>> Hi Isuru,
>>
>> There is no such feature planned or available ATM for hamming platform
>> release.
>> Regards,
>> Aruna
>>
>>>
>>> Thanks!
>>>
>>> [1]
>>> https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
>>> [2]
>>> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java
>>>
>>> --
>>> Isuru Perera
>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>> Contact: +IsuruPereraWSO2
>>> 
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> *Aruna Sujith Karunarathna *
>> WSO2, Inc | lean. enterprise. middleware.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> Mobile: +94 71 9040362 | Work: +94 112145345
>> Email: ar...@wso2.com | Web: www.wso2.com
>>
>>
>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>



-- 
*Asitha Nanayakkara*
Software Engineer
WSO2, Inc. http://wso2.com/
Mob: +94 77 853 0682
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-03-28 Thread Isuru Perera
Hi Aruna,

I think this feature will be important for other products as most of the
products will eventually need to create the database schema based on the
database vendor.

I hope MB team will also need this feature soon and it would be good if
this feature can be supported in next platform release.

Thanks!

On Fri, Mar 25, 2016 at 2:03 PM, Aruna Karunarathna  wrote:

>
>
> On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:
>
>> Hi,
>>
>> In Carbon 4.x.x, we extend [1]
>> org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the same
>> in Carbon 5?
>>
>
> Hi Isuru,
>
> There is no such feature planned or available ATM for hamming platform
> release.
> Regards,
> Aruna
>
>>
>> Thanks!
>>
>> [1]
>> https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
>> [2]
>> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java
>>
>> --
>> Isuru Perera
>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>> Contact: +IsuruPereraWSO2 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> *Aruna Sujith Karunarathna *
> WSO2, Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 9040362 | Work: +94 112145345
> Email: ar...@wso2.com | Web: www.wso2.com
>
>



-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to create database tables with -Dsetup in Carbon 5?

2016-03-25 Thread Aruna Karunarathna
On Fri, Mar 25, 2016 at 1:45 PM, Isuru Perera  wrote:

> Hi,
>
> In Carbon 4.x.x, we extend [1]
> org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the same
> in Carbon 5?
>

Hi Isuru,

There is no such feature planned or available ATM for hamming platform
release.
Regards,
Aruna

>
> Thanks!
>
> [1]
> https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
> [2]
> https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Aruna Sujith Karunarathna *
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 9040362 | Work: +94 112145345
Email: ar...@wso2.com | Web: www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] How to create database tables with -Dsetup in Carbon 5?

2016-03-25 Thread Isuru Perera
Hi,

In Carbon 4.x.x, we extend [1]
org.wso2.carbon.utils.dbcreator.DatabaseCreator [2]. How can we do the same
in Carbon 5?

Thanks!

[1]
https://github.com/search?l=&q=DatabaseCreator++user%3Awso2&ref=advsearch&type=Code&utf8=%E2%9C%93
[2]
https://github.com/wso2/carbon-kernel/blob/4.4.x/core/org.wso2.carbon.utils/src/main/java/org/wso2/carbon/utils/dbcreator/DatabaseCreator.java

-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev