RE: RE: Multiple instances in Liferay.

Jamie Sammons, modified 3 Years ago. New Member Posts: 10 Join Date: 11/26/21 Recent Posts

Hi,

As per the requirement I have created two instance and after making chnages in system driver able to access both instance.

Now I have to use, separate properties file for each instance.

For this created portal-{web-id}.properties files for each instance inside WEB-INF/classes & system-ext.properties file with value "company-id-properties=true".

While server start portal-{web-id}.properties files are getting read with their company-id.

But the problem is that, still it is not working as per separate portal-{web-id}.properties files. It's still working as per the default properties file.

Note -: In portal-ext.properties file values -

include-and-override=portal-developer.properties

include-and-override=portal-{web-id1}.properties

include-and-override=portal-{web-id2}.properties

Any suggestion would be helpful.

Using Liferay version 7.4

 

Thanks :

Manoj Kumar

thumbnail
Russell Bohl, modified 3 Years ago. Expert Posts: 308 Join Date: 2/13/13 Recent Posts

Hi Manoj, as stated in the portal properties documentation, as of Liferay 7.3 portal properties files can no longer be scoped to the instance using the companyId.

Jamie Sammons, modified 3 Years ago. New Member Posts: 10 Join Date: 11/26/21 Recent Posts

Hi Russell,

 

Thanks for response.

So how we can do the task, to use different properties file for different instance in Liferay7.4 .

 

Thanks:

Manoj Kumar

 

thumbnail
Russell Bohl, modified 3 Years ago. Expert Posts: 308 Join Date: 2/13/13 Recent Posts

If the note in the docs is accurate, you cannot have different portal.properties per instance.

As of DXP 7.3, the per-virtual instance portal properties file feature has been removed. DXP no longer applies per-instance properties from files of the format `portal-[companyId].properties`) to instances matching the company IDs.
 

So, what properties do you need to scope to the instance? They might be available in Instance Settings.