フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
匿名
Portlet Interaction with multiple Database
2011/08/10 0:54
答え

匿名

Hi All,

My Scenario,
I want to use liferay service builder to create crud operations in my portlet "sample-portlet".
I need to create multiple communites and i need to place the "sample-portlet" under all the communites.
I need to create multiple database using the community name.
When ever i am performing add or update operation from the community "A" i need to store the information in Database "A". this scenario will be same for all the remaning communites.
Entity and table will be same for the portlet. But database need to be different for the portlet.

My Question:
Using liferay service builder we can connect the entity to different database. Here i want to connect to multiple database according to the community.
Is it possible in liferay using the same entity?
I want to use Liferay Service Layer only?

Thanks in Advance.
Thiago Leão Moreira
RE: Portlet Interaction with multiple Database
2011/08/10 9:49
答え

Thiago Leão Moreira

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1394

参加年月日: 2007/10/10

最近の投稿

This sharding by community is not supported OOTB, but you can try to customize Liferay to do it. Are you willing to segment your data only for your sample-portlet?
Sagar A Vyas
RE: Portlet Interaction with multiple Database
2011/08/10 11:17
答え

Sagar A Vyas

ランク: Liferay Master

投稿: 655

参加年月日: 2009/04/17

最近の投稿

Hi VCVijaya,

You can build your service in such manner that your own portlet will communicate with other DB and Liferay will communicate with other DB.

In this case you have to make two entries in portal-ext.properties file.

But i dont think so we can achieve dynamic DB as per community.

Thanks,
Sagar Vyas
Nagendra Kumar Busam
RE: Portlet Interaction with multiple Database
2011/11/26 11:05
答え

Nagendra Kumar Busam

ランク: Liferay Master

投稿: 637

参加年月日: 2009/07/07

最近の投稿

It will be good feature if we have some configuration for through properties & by adding extra attribute in service.xml entity-level
Sagar A Vyas
RE: Portlet Interaction with multiple Database
2011/11/28 4:34
答え

Sagar A Vyas

ランク: Liferay Master

投稿: 655

参加年月日: 2009/04/17

最近の投稿

Nagendra Kumar Busam:
It will be good feature if we have some configuration for through properties & by adding extra attribute in service.xml entity-level


Agree with Nagendra.

Using liferay service builder we can connect the entity to different database. Here i want to connect to multiple database according to the community.


For this kind of requirement we usually create new company in same server.

Thanks,
Sagar Vyas