Reading the portlet.xml file everytime

When i was playing with Portlet Event on WebSPhere Portal Server, i noticed that if you add new events in the portlet.xml file after deploying portlet, that event does not get picked up.

Ex. First i did add hello event in portlet.xml and deployed it, created a wire and then i did add greeting event in both source and target and deployed them on WPS. After that when i tried creating wire the new events were not showing up in the Portlet Wiring Tool portlet. Only way i could get it working was by first uninstalling and then reinstalling the portlet. So i started looking for solution for what i can do to avoid this reinstalling of portlet application for my new events to show up.

It seems that when we deploy portlet on WPS for first time then portal reads the portlet.xml and caches information like events, preferences,... After that when we update the portlet it does not read the portlet.xml. You can change this behavior by changing value of cleanup.deployment.descriptors property in DeploymentService.


#
# If you set this property to true, all existing settings are cleared and deleted,
# and only the new settings found in the portlet.xml are created.

# Default = false
#cleanup.deployment.descriptors = false


After changing value of cleanup.deployment.descriptors to true like this i could see my changes in portlet.xml getting reflected with uninstall-reinstalling portlet again.

2 comments:

Sim said...

HI Sunil,

I tried this in wps 8.0. But even after adding this property the changed portlet.xml file was not getting reflected.

Abhi said...

Thanks for info....
SEO Company in Bangalore