Forums de discussion

Auxiliary Database Setup with Service Builder in Liferay 7

shivani mistry, modifié il y a 7 années.

Auxiliary Database Setup with Service Builder in Liferay 7

New Member Publications: 4 Date d'inscription: 13/05/15 Publications récentes
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, modifié il y a 7 années.

RE: Auxiliary Database Setup with Service Builder in Liferay 7

Liferay Legend Publications: 14916 Date d'inscription: 02/09/06 Publications récentes
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, modifié il y a 7 années.

RE: Auxiliary Database Setup with Service Builder in Liferay 7

New Member Publications: 4 Date d'inscription: 13/05/15 Publications récentes
Thank you David... Will be waiting for blog... emoticon
Matthew Churilla, modifié il y a 7 années.

RE: Auxiliary Database Setup with Service Builder in Liferay 7

New Member Envoyer: 1 Date d'inscription: 22/06/16 Publications récentes
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, modifié il y a 7 années.

RE: Auxiliary Database Setup with Service Builder in Liferay 7

Liferay Legend Publications: 14916 Date d'inscription: 02/09/06 Publications récentes
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.
thumbnail
David H Nebinger, modifié il y a 7 années.

RE: Auxiliary Database Setup with Service Builder in Liferay 7

Liferay Legend Publications: 14916 Date d'inscription: 02/09/06 Publications récentes