留言板

Auxiliary Database Setup with Service Builder in Liferay 7

shivani mistry,修改在7 年前。

Auxiliary Database Setup with Service Builder in Liferay 7

New Member 帖子: 4 加入日期: 15-5-13 最近的帖子
Hello,

I have been trying to setup auxiliary database in Liferay7 such that all default liferay tables goes into one database and my custom tables into another.

In Liferay6.2, the only additional thing that I needed to do was to add ext-spring.xml whose path was already mentioned in service.properties file and provide three attributes to <entity> i.e. <entity local-service="true" name="Customer" remote-service="false" data-source="auxDataSource" session-factory="auxSessionFactory" tx-manager="auxTransactionManager">

In Liferay7, even if I add ext-spring.xml file, where do i need to set the path so that the file can be read? Liferay7 provides with one module-spring.xml. Does this file need any additional configuration done or is there any other way which can help me created auxiliary database?

Thanks in advance....
thumbnail
David H Nebinger,修改在7 年前。

RE: Auxiliary Database Setup with Service Builder in Liferay 7

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Actually, Shivani, I've been working on a blog post about using external data sources with LR7, should be coming out tonight or tomorrow.

There are additional details that you have to keep in mind, and they'll be covered in the blog post.

I'll keep you posted...
shivani mistry,修改在7 年前。

RE: Auxiliary Database Setup with Service Builder in Liferay 7

New Member 帖子: 4 加入日期: 15-5-13 最近的帖子
Thank you David... Will be waiting for blog... emoticon
Matthew Churilla,修改在7 年前。

RE: Auxiliary Database Setup with Service Builder in Liferay 7

New Member 发布: 1 加入日期: 16-6-22 最近的帖子
Is there any update on this blog article? We are having issues with SB in Liferay 7 also.

I think the problem lies with overriding the session factory, this seems to be creating a new (or loading into) a different class loader where the persistence information created in module-hbm.xml does not exist.
thumbnail
David H Nebinger,修改在7 年前。

RE: Auxiliary Database Setup with Service Builder in Liferay 7

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Yeah, it's taken me longer to finish it than what I expected emoticon

It is in the works but you're spot on - it basically comes down to a class loader issue.

I'll get the blog cranked out tomorrow, look for it to be published by 5pm EST tomorrow, 7/22.