dynamic-extensions-for-alfresco icon indicating copy to clipboard operation
dynamic-extensions-for-alfresco copied to clipboard

When bundles get redeployed, some objects/references do not get redeployed correctly

Open yregaieg opened this issue 7 years ago • 2 comments

I'm submitting a ... (check one with "x")

[X] bug report
[ ] feature request
[ ] question

Expected Behavior

When bundles get redeployed, I expect extensions such as Behaviours and Actions to be correctly undeployed and then re-deployed

Current Behavior

When bundles having Behaviours and Actions get redeployed without being explicitly deleted first, that often results in problems when dealing with the concerned features (Behaviours running multiple times, action with forms not being available through the share interface..)

Possible Solution

When installing a bundle, check first if an other bundle with the same ID does exist, in which case delete (undeploy) it before going forward with the process

Steps to Reproduce (for bugs)

  1. Create a bundle with Behaviours, Actions having forms
  2. Deploy and re-deploy the bundle over and over again
  3. try to access the action form through share / trigger an action that would trigger a behaviour from your bundle
  4. The form is not shown (an error is shown instead) / the Behaviour will (possibly) execute multiple times even though there was a single trigger

Context

This bug is particularly annoying when hot re-deployment are made to production systems and then some feature become either unusable or blocking until system is restarted (or the DE bundle is deleted explicitly then redeployed, which does not always works)

Your Environment

  • Alfresco version used: 5.1 EE
  • DE version used: 1.4.2

yregaieg avatar Jan 10 '18 16:01 yregaieg

Are the Behaviours and Actions registered the 'Dynamic Extensions' way, by using the corresponding annotations? I have had similar issues with Behaviours where I used the policyComponent directly to register my behaviour.

kerkhofsd avatar Mar 22 '19 07:03 kerkhofsd

That was ages ago, sorry I don't recall if this was related to annotation based behaviours but indeed if the behaviour is bound manually using policyComponent, I would expect the reference to remain unless the developer de-register it explicitely when bundle is unloaded... So I guess this one was meant for Annotation based behaviours ..

yregaieg avatar Mar 22 '19 08:03 yregaieg