Comment 4 for bug 1362744

Revision history for this message
Stan Lagun (slagun) wrote :

This is expected behavior. Engine cannot just redeploy added application because it doesn't know that it is the only change you did. You could have possibly modify properties of other applications that are already deployed or want it to verify that is indeed in desired state. It is up to individual applications/components to examine what has changed since last deployment and to adopt to that change.

There is an attributes API that helps with that. Attributes are key-value storage that is bound to a pair (class, instance) and consists of just 2 methods: getAttr(name, optionalDefault) and setAttr(name, value) where value can be of any supported primitive type.

The simplest thing you can do in your application is to have something like
If: $.getAttr(isDeployed, false)
Then:
   - deploy
   - your
   - app
   - ...
   - $.setAttr(isDeployed, true)

But with such approach application will ignore any changes done to its properties after initial deployment. More advanced application will have such checks on a more granular level and will store in attribute storage previous property value rather than boolean flag