Forums de discussion

RE: creating different different database on each submission of creat_accou

thumbnail
Jorge Díaz, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou

Liferay Master Publications: 753 Date d'inscription: 09/01/14 Publications récentes
I don't understand exactly what do you want to do, as for me it has no sense to create different company with different databases when somebody create a new account, as creating a new database can only be done by a technical user.

At Liferay, you can have different instances (companies) in different databases using sharding, but it is not possible to configure it without stoping liferay and configure portal-ext.properties with new shard. That new shard will be empty.

If you only need to store a new data called "company" for each user, in same database, I think your best option is to use custom fields (aka expando), more info at:
Shiva Krishna Goud, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou

Regular Member Publications: 110 Date d'inscription: 02/01/15 Publications récentes
it's better to go with custom fields(expando),,because "sharding" concept needs to be configured manually in portal-ext.properties and dependency xml files need to be modified and need to restart the server
Rakesh Kumar, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou

Junior Member Publications: 54 Date d'inscription: 05/08/15 Publications récentes
hi shiva,

my requirement is creating different instance databases for every submission.
i don't think i can achieve this by using "expando" concept,because it is feature of Liferay that allows users to add custom fields into the database without having to actually manually modify the database.emoticon

rakesh
thumbnail
Manish Yadav, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou

Expert Publications: 493 Date d'inscription: 26/05/12 Publications récentes
Rakesh Kumar:
hi shiva,

my requirement is creating different instance databases for every submission.
i don't think i can achieve this by using "expando" concept,because it is feature of Liferay that allows users to add custom fields into the database without having to actually manually modify the database.emoticon

rakesh


your requirement is really weird and not good design... but in case you have last option and any how you want to achieve your requirement then try with Java.sql package .. create your own connection object and run sql queries and do whatever you want .. for eg :-
http://www.tutorialspoint.com/jdbc/jdbc-create-database.htm
Rakesh Kumar, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou

Junior Member Publications: 54 Date d'inscription: 05/08/15 Publications récentes
hi manish,

you mean to say ,i need to use custom sql for achieving my requirement?
does ext plugin is correct method to override the create_account page or i have to choose another method for this??
if i use "Java.sql package" , do i need to create ext plugin or a simple portlet ??
how can i use sql for create_account page.

rakesh
thumbnail
sricanth arroju, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou

Regular Member Publications: 133 Date d'inscription: 03/10/09 Publications récentes
Why you want to create a new databse each user Registration. yes masnish was suggesting to create a Custom portlet.

Thanks,
Sricanth
Rakesh Kumar, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou

Junior Member Publications: 54 Date d'inscription: 05/08/15 Publications récentes
hi sricanth,

i want new database because once i will login then i will be having option in navigation bar like (adding employee name ,adding department ,deleting employee name...etc ) so for this purpose i will be using new database and . And this database will be for particular company.Likewise so many instance database has to be created . One more thing is we are not going to add complete registration form details in to instance database(on submit it has to created). for this purpose we will use master database where each and every registered user information will be available.
this instance database ,we will use for dynamic changes like after login i can add ,delete ,update tables in instance database.

regards
rakesh
Shiva Krishna Goud, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou

Regular Member Publications: 110 Date d'inscription: 02/01/15 Publications récentes
actually this is multi tenancy(sharding) but if u want to create a new instance and map to new schema , liferay will check for below properties in portal-ext.properties and other spring config files while starting the server
shard.selector=com.liferay.portal.dao.shard.ManualShardSelector
shard.available.names=default,one,two,three,four....N

pls check this thread
https://www.liferay.com/community/forums/-/message_boards/message/13660401
Rakesh Kumar, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou

Junior Member Publications: 54 Date d'inscription: 05/08/15 Publications récentes
My dear friend shiva, this sharding concept is for creating different databases for instances (means for different company websites ).
But here i have to create instance database when i submit the form.emoticon
thumbnail
Jorge Díaz, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou

Liferay Master Publications: 753 Date d'inscription: 09/01/14 Publications récentes
Liferay sharding functionality allows configuring more than one database with a single installation but it is not possible to create a new shard without restarting the system

With Liferay, there is no other alternative, so if this functionality does no not cover your requirements, perhaps you should think about changing them, or perhaps using other product.
thumbnail
Patrick Wolf, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou

Regular Member Publications: 127 Date d'inscription: 15/09/10 Publications récentes
Hi Rakesh, Please let me spell out your requirement so that it is crystal clear. I assume you would like to use Liferay as a multi-tenant platform. Future users interested in your SaaS Liferay solution fill out a form in order to register. Once the form is completed and submitted, a new Liferay instance with its own company name and database schema is automatically created.
You may need to develop a portlet that creates a new Liferay instance from the form that is submitted, but the new user's data will be scattered across Liferay's database. The other possibility would be to create a shard per new submitted forms, then each new instance would have its data separated from the other instances but a restart of Liferay would be necessary after the modification of the liferay-ext.properties file.
Rakesh Kumar, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou

Junior Member Publications: 54 Date d'inscription: 05/08/15 Publications récentes
hi Patrick ,

thanks for your suggestion.

rakesh
Rakesh Kumar, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou (Réponse)

Junior Member Publications: 54 Date d'inscription: 05/08/15 Publications récentes
Hi all
It feels good when after a effort i got ..yes, I did !
hurraayyy i got ! before few days it was a pain to me as because so much effort suggestion but all comes in negative
but today i got and it is been executed along with mine team member(3_Member)...i humbly thanks to everyone who supported me/suggestion....
after few days related to this i will postmine blog, stay tuned .

Team-Member

Rakesh-kumarProfile_Liferay

Abhishek-kumarProfile_Liferay

Chennamma-rathodeProfile_Liferay



regards
Rakesh-kumar
abhishek kumar, modifié il y a 8 années.

RE: creating different different database on each submission of creat_accou

Regular Member Publications: 138 Date d'inscription: 17/08/15 Publications récentes
Thanks rakesh ! indeed.....

regards'
Abhishek
Yuvraj Verma, modifié il y a 6 années.

RE: creating different different database on each submission of creat_accou

New Member Envoyer: 1 Date d'inscription: 27/07/17 Publications récentes
Hi Rakesh,

I am also facing same problem i.e. "creating different different database on each submission of creat_accou" Can you please help me out how to solve the same.

you can send the process on my email ID , Yuvraj783@gmail.com

Thanks in advance.
Yuvraj Verma
9650106013
thumbnail
Manish Yadav, modifié il y a 6 années.

RE: creating different different database on each submission of creat_accou

Expert Publications: 493 Date d'inscription: 26/05/12 Publications récentes
Yuvraj Verma:
Hi Rakesh,

I am also facing same problem i.e. "creating different different database on each submission of creat_accou" Can you please help me out how to solve the same.

you can send the process on my email ID , Yuvraj783@gmail.com

Thanks in advance.
Yuvraj Verma
9650106013


Why you want to create different database for each user ?Its really weird requirement