Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Portal Instance Properties and Liferay Hook deployment
I'm using Liferay 6.0.5, and I've been experimenting with the instance specific portal properties, as described in LPS-9.
I'm wondering if it is possible to hot deploy custom instance specific portal properties using the liferay-hook mechansism.
I've created a hook project, specifying:
<hook>
<portal-properties>portal-company2.properties</portal-properties>
</hook>
and I've got a copy of portal-company2.properties in my docroot/WEB-INF/src. When I deploy the hook, I see:
22:45:53,411 INFO [HookHotDeployListener:394] Registering hook for test-property-hook
Loading file:/D:/Development/liferay-portal-6.0.5/tomcat-6.0.26/webapps/test-property-hook/WEB-INF/classes/portal-company2.properties
22:45:53,458 INFO [HookHotDeployListener:649] Hook for test-property-hook is available for use
But when I try to retrieve a custom property using PropsUtil.get() it is returning null.
If I manually place the portal-company2.properties into ROOT/WEB-INF/classes it works fine.
Can anyone recommend what else I may try to get this hot deployment to work. When running multiple instances, I want to avoid a system restart as that impacts all instances. Is there a better way of getting custom instance properties loaded without a restart?
I'm wondering if it is possible to hot deploy custom instance specific portal properties using the liferay-hook mechansism.
I've created a hook project, specifying:
<hook>
<portal-properties>portal-company2.properties</portal-properties>
</hook>
and I've got a copy of portal-company2.properties in my docroot/WEB-INF/src. When I deploy the hook, I see:
22:45:53,411 INFO [HookHotDeployListener:394] Registering hook for test-property-hook
Loading file:/D:/Development/liferay-portal-6.0.5/tomcat-6.0.26/webapps/test-property-hook/WEB-INF/classes/portal-company2.properties
22:45:53,458 INFO [HookHotDeployListener:649] Hook for test-property-hook is available for use
But when I try to retrieve a custom property using PropsUtil.get() it is returning null.
If I manually place the portal-company2.properties into ROOT/WEB-INF/classes it works fine.
Can anyone recommend what else I may try to get this hot deployment to work. When running multiple instances, I want to avoid a system restart as that impacts all instances. Is there a better way of getting custom instance properties loaded without a restart?
Hi Chad,
AFAIK this is not possible. But it would be a nice feature. As currently portal-ext.properties already can be deployed by Ext Plugins I'd like to see instance specific portal.properties there as well.
Tarkan
AFAIK this is not possible. But it would be a nice feature. As currently portal-ext.properties already can be deployed by Ext Plugins I'd like to see instance specific portal.properties there as well.
Tarkan