Hi, Thanks very much for the reply. I have managed to get a working ModuleVersionHandler.
However, I'm still slightly confused. In my development environment (which is Completely out of sync with the production environment) the update all went fine. However, when I tried to install it in the production environment I got the following error: Could not perform installation: Error importing config.modules.diamond.dialogs.diamond.siblingPages: a node with uuid 64a29663-997e-4eb6-9d1f-16632185d066 already exists! Performing a query against this uuid it returned: /modules/templating/dialogs/paragraphList (this is a custom dialog definition created a while back - it is not encapsulated within any module, merely added manually to the config repository). So my confusion is how should I deal with this? As I previously described, I want that if an updated config file is included in a module, it should replace the previously bootstrapped file. Previously you suggested using an importUUIDBehavior of IMPORT_UUID_COLLISION_REPLACE_EXISTING to achieve this. However in this instance, it would have deleted something completely unrelated from the config repository, and would have left the system in an inconsistent state. If it is the first time a file is included for bootstrapping in the module, obviously you know that you won't need to upgrade/overwrite from a previous version, so I guess there is some 'on uuid collision, generate new uuid' importUUIDBehaviour. But what happens when a new version of the module is released with an update to the config file which should be bootstrapped (and overwrite the previous config)? The uuid's will be out of sync now surely? Also, looking at DMSModuleVersionHandler, it doesn't use any importUUIDBehaviour. Is this just hoping that there won't already be a node with a matching uuid, and leaving the problem for the user to deal with if their is? Once again, all help is greatly appreciated! Chris -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Sent: 01 July 2008 01:27 To: [email protected] Subject: Re: [magnolia-user] custom module updates Allan, CJ (Chris) wrote: > Hi, > > I installed mymodule-1.0.jar, then removed the jar, replacing it with > mymodule-1.1.jar. I did not remove any of the files from > /modules/mymodule > > The mgnl-bootstrap directory in mymodule-1.0.jar only contained an xml > export of a commands folder. In mymodule-1.1.jar I added two new xml > files; exports of the new dialogs and paragraphs folder. These did not > get bootstrapped during the installation of mymodule-1.1.jar -there were > only 2 installation steps - updating the module version number, and > copying files e.g. jsp's. > > What I would like is that: > 1) all new xml files get bootstrapped > 2) and if any updates have been made to xml files already present in > previous module version, the updated xml file is bootstrapped (I presume > this new xml file will have the same UUID as the old version?) > > So, both of these requirements need to implemented via the > ModuleVersionHandler? Yes. > You suggest using NodeExistsDelegateTask. I see that this will work for > bootstrapping new xml files, but if I want to update existing sections > of the module configuration, how would be best to achieve that? Kinda depends what the change is. If it's a simple property then a SetPropertyTask will probably do. If it's more complex then a BootstrapSingleResource with an importUUIDBehavior of IMPORT_UUID_COLLISION_REPLACE_EXISTING is probably the simplest. That is of course only if you haven't changed the node since it was bootstrapped. > I would have thought that my requirements are fairly standard when > installing/updating a module, but from looking at > DMSModuleVersionHandler there doesn't seem to be any generic way of > achieving this - you have to specifically state what should happen for > every case. Is this correct? > > All thoughts and helps are greatly appreciated! Cheers Philippe ---------------------------------------------------------------- for list details see http://documentation.magnolia.info/ ---------------------------------------------------------------- <DIV><FONT size="1" color="gray">This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom </FONT></DIV> ---------------------------------------------------------------- for list details see http://documentation.magnolia.info/ ----------------------------------------------------------------
