Hi Paul,

Natasha already answered your question, but I thought I'd answer as well:

- yes, in absence of a module-version-handler class, bootstrapping occurs only 
when the module is first installed
- I think it is good policy to always write a module-version-handler. It's 
easy, and not much code, and it means you make your intentions explicit, rather 
than relying on implicit mechanisms
- if you have a module-version-handler, you can register "Deltas". The Deltas 
get executed when upgrading an existing version. So if you have Version 1.0 of 
your module installed, and you drop in Version 1.5, and have Deltas registered 
for Versions 1.2, 1.3 and 1.5, then all those Deltas would get executed during 
the install process of Version 1.5. It's really a very nice mechanism.
- note: to force a module reinstall, you need to delete the module's node in 
the Config workspace under /modules . Just removing the JAR won't do anything. 
If you delete the module's node, then magnolia will "reinstall" the module from 
scratch.
- It is quite possible to replace existing content during bootstrapping from 
your module version handler. See 
ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING, for example.
- Look at the module-version handlers for some existing magnolia modules. 
You'll get a feel for how they work and what InstallTasks are available to you.
- If you want to replace or modify content whenever magnolia starts (regardless 
of whether your module was installed or upgraded) then the ModuleVersionHandler 
is not the place to do this. Instead, look at making your module class 
implement ModuleLifecycle, and write the code to modify the content in the 
start() method for your module.

Regards from Vienna,

Richard


-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Paul Shuttlewood (via Magnolia Forums)
Gesendet: Freitag, 12. Oktober 2012 16:56
An: Magnolia User List
Betreff: [magnolia-user] Re: XML Files

Richard, does bootstrapping only occur on module installation? So delivering 
updated module jars wont add in changes? I`ve created my template scripts in 
WEB-INF/templates and my template config in the admin central. So was planning 
to export the xml, and put the xml and scripts into a magnolia Eclipse project, 
build and redeliver the jar. But will Magnolia run the bootstrap? Do I need to 
delete the existing jar and restart the instance first in order to fool 
Magnolia into thinking the module have been removed.

What would be preferabled would be to specify a version handler that re-runs 
all bootstrapping and overwrites anything that already exists. Is that 
possible? Is there a handler already to do that?

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=0a3b28cc-6921-4f21-a8fe-ff22318923a7


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------





----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to