Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Magnolia by default scans some dedicated folders during start up. Add your bootstrap files to this folders to automate the import of the JCR data of these files. Bootstrap files can reside at a webapp or module level. 

All bootstrap files are only imported once!

Webapp-based
  • bootstrapping is triggered by the WebappBootstrap task only during the first run of the webapp and only after all modules have been installed.
  • Module-based bootstrap files are imported during the first installation of the module.

If you want to import bootstrap files on every start up of the Magnolia instance or of a module, you must use custom installation tasks which are executed by the Module version handler or Module start up classes.

Note

All bootstrap files are only imported once!

  • Webapp-based bootstrap files are imported during the first run of the webapp when the Magnolia instance gets installed.Module-based bootstrap files are imported during the installation of the module.

If you want to import bootstrap files on every start up of the Magnolia instance or of a module, you must use custom installation tasks which are executed by the Module version handler or Module start up classes.

Hide block
Note

Bootsrapping on the webapp level

...

Bootstraps are loaded from this directory only the first time the WAR is installed in the container that is running for the first time.

The directory should contain XML files for initialization of a blank Magnolia instance. If no content is found in any of the repositories, they are initialized by importing the XML files found in this directory.

...

The directory should contain XML or YAML files for initialization of a blank Magnolia instance. If no content is found in any of the repositories, they are initialized by importing the XML or YAML files found in this directory.

Bootsrapping on a module level

...

FileConfiguration nodeDescription
config.modules.site.config.themes.travel-demo-theme.xml/modules/site/config/themes/travel-demo-themeTheme configuration.
config.modules.travel-demo.config.travel.xml/modules/travel-demo/config/travelTemplates, theme and i18n nodes of Site definition.
config.server.filters.i18n.bypasses.xml/server/filters/i18n/bypassesi18n content support filter bypass.
config.modules.public-user-registration.config.configurations.travel.xml/modules/public-user-registration/config/configurations/travelPUR module configuration.
config.server.filters.securityCallback.clientCallbacks.travel-demo-pur.xml/server/filters/securityCallback/clientCallbacks/travel-demo-purSecurity callback for public user registration.

Bootstrapping content into cluster nodes

The magnolia.repositories.jackrabbit.cluster.master property can be used to identity an instance as a cluster master node. By default this property is set to false in magnolia.properties. When enabled Magnolia bootstraps content only into master nodes. This ensures that other (replica) nodes installed later don't override already bootstrapped content. See Configuration management for more.

...