Foren

Auxiliary Database Setup with Service Builder in Liferay 7

shivani mistry, geändert vor 7 Jahren.

Auxiliary Database Setup with Service Builder in Liferay 7

New Member Beiträge: 4 Beitrittsdatum: 13.05.15 Neueste Beiträge
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, geändert vor 7 Jahren.

RE: Auxiliary Database Setup with Service Builder in Liferay 7

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
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, geändert vor 7 Jahren.

RE: Auxiliary Database Setup with Service Builder in Liferay 7

New Member Beiträge: 4 Beitrittsdatum: 13.05.15 Neueste Beiträge
Thank you David... Will be waiting for blog... emoticon
Matthew Churilla, geändert vor 7 Jahren.

RE: Auxiliary Database Setup with Service Builder in Liferay 7

New Member Beitrag: 1 Beitrittsdatum: 22.06.16 Neueste Beiträge
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, geändert vor 7 Jahren.

RE: Auxiliary Database Setup with Service Builder in Liferay 7

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
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.