Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Danial Mustofa Habibi
Creating User on Liferay but also create user on other database
5 de diciembre de 2011 3:29
Respuesta

Danial Mustofa Habibi

Ranking: Regular Member

Mensajes: 139

Fecha de incorporación: 1 de noviembre de 2011

Mensajes recientes

Hi All.. I need Help,how do I resolve this problem...I want to create user in liferay but whenever I create User on liferay user it also create the user on other database?
for example: liferay using lportal as database and my database is test so whenever we create user on liferay it create new data at user table on lportal,The thing I want is it also insert new user to my table user on test database....how do i resolve this???
Thank's

any help would be appreciated...sorry for bad english
Mayur Patel
RE: Creating User on Liferay but also create user on other database
5 de diciembre de 2011 4:07
Respuesta

Mayur Patel

Ranking: Expert

Mensajes: 341

Fecha de incorporación: 17 de noviembre de 2010

Mensajes recientes

If you want to connect to different schema you need to make entry in portal.ext.properties files which resides in following path

{liferay-home}\{tomcat}\webapps\ROOT\WEB-INF\classes\portal.ext.properties

// connect to test schema
1jdbc.default.driverClassName=com.mysql.jdbc.Driver
2jdbc.default.url=jdbc:mysql://localhost/[b]test[/b]?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
3jdbc.default.username=root
4jdbc.default.password=root


Regards,
Mayur
Milen Dyankov
RE: Creating User on Liferay but also create user on other database
5 de diciembre de 2011 4:27
Respuesta

Milen Dyankov

Ranking: Regular Member

Mensajes: 173

Fecha de incorporación: 23 de septiembre de 2009

Mensajes recientes

If both databases are the same (Oracle, MySQL, ...), check the database documentation of how can you link/share tables or replicate data.
For example one possible way of doing this in Oracle would be to have a database link to your table in Liferay's database and then add a trigger to users table to update yours accordingly.

If you are dealing with different databases, then you'll need to implement this in Liferay by hooking/extending the User service.
Danial Mustofa Habibi
RE: Creating User on Liferay but also create user on other database
5 de diciembre de 2011 5:57
Respuesta

Danial Mustofa Habibi

Ranking: Regular Member

Mensajes: 139

Fecha de incorporación: 1 de noviembre de 2011

Mensajes recientes

Mayur Patel:
If you want to connect to different schema you need to make entry in portal.ext.properties files which resides in following path

{liferay-home}\{tomcat}\webapps\ROOT\WEB-INF\classes\portal.ext.properties

// connect to test schema
1jdbc.default.driverClassName=com.mysql.jdbc.Driver
2jdbc.default.url=jdbc:mysql://localhost/[b]test[/b]?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
3jdbc.default.username=root
4jdbc.default.password=root


Regards,
Mayur


I've Tried that solution still can't resolve my problem.
Danial Mustofa Habibi
RE: Creating User on Liferay but also create user on other database
5 de diciembre de 2011 5:59
Respuesta

Danial Mustofa Habibi

Ranking: Regular Member

Mensajes: 139

Fecha de incorporación: 1 de noviembre de 2011

Mensajes recientes

Milen Dyankov:
If both databases are the same (Oracle, MySQL, ...), check the database documentation of how can you link/share tables or replicate data.
For example one possible way of doing this in Oracle would be to have a database link to your table in Liferay's database and then add a trigger to users table to update yours accordingly.

If you are dealing with different databases, then you'll need to implement this in Liferay by hooking/extending the User service.



I'm Using IBM DB2

can u provide example for hooking/extending user service??I'm still confuse about hook plugin in liferay
Milen Dyankov
RE: Creating User on Liferay but also create user on other database
5 de diciembre de 2011 6:59
Respuesta

Milen Dyankov

Ranking: Regular Member

Mensajes: 173

Fecha de incorporación: 23 de septiembre de 2009

Mensajes recientes

Danial Habibi:
I'm Using IBM DB2


you mean both databases are IBM DB2? If so then check database documentation about replication and/or about triggers and linking tables in different schemas .

Danial Habibi:
can u provide example for hooking/extending user service??I'm still confuse about hook plugin in liferay


Not sure what exactly needs to be changed in your case but to get a general idea of overwriting Liferay services see here
Danial Mustofa Habibi
RE: Creating User on Liferay but also create user on other database
5 de diciembre de 2011 14:21
Respuesta

Danial Mustofa Habibi

Ranking: Regular Member

Mensajes: 139

Fecha de incorporación: 1 de noviembre de 2011

Mensajes recientes

Milen Dyankov:
Danial Habibi:
I'm Using IBM DB2


you mean both databases are IBM DB2? If so then check database documentation about replication and/or about triggers and linking tables in different schemas .

Danial Habibi:
can u provide example for hooking/extending user service??I'm still confuse about hook plugin in liferay


Not sure what exactly needs to be changed in your case but to get a general idea of overwriting Liferay services see here


Yes both Database are Db2...
I see Thank's...I'l Try emoticon

Anyone know can give me example for hooking user service??
Mayur Patel
RE: Creating User on Liferay but also create user on other database
5 de diciembre de 2011 22:48
Respuesta

Mayur Patel

Ranking: Expert

Mensajes: 341

Fecha de incorporación: 17 de noviembre de 2010

Mensajes recientes

Danial Mustofa Habibi
RE: Creating User on Liferay but also create user on other database
6 de diciembre de 2011 3:19
Respuesta

Danial Mustofa Habibi

Ranking: Regular Member

Mensajes: 139

Fecha de incorporación: 1 de noviembre de 2011

Mensajes recientes

Mayur Patel:


ok Thank's
Uhm Where i can find source code in liferay src for creating user process?
thank's