Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated to reflect changes
Note
titleImportant Update

Starting with uPortal 4.0.4, JPA-managed (database backed) fragments are now the default option. For those versions, you can revert back to defining fragments in dlm.xml by following these directions in reverse.

You will need to create the dlm.xml file. There is an example of that in layoutContext.xml.

As an alternative to defining DLM fragments in dlm.xml, portal administrators may elect to enable the RDBMConfigurationLoader, which loads fragment definitions from the database via Hibernate and JPA. The major advantage of this approach is that it allows fragments to be added, removed, or change their audiences without a portal restart.

RDBMConfigurationLoader can be turned on by modifying persistenceContextlayoutContext.xml and layoutContext.xml

Warning
titleWarning

Once you make this change, DLM will no longer read fragments from dlm.xml; you must define all your fragments in the database.

persistenceContext.xml

Uncomment fragmentDefinitionDao bean:

Code Block
titleuportal-war/src/main/resources/properties/contexts/persistenceContext.xml
<bean id="fragmentDefinitionDao" class="org.jasig.portal.layout.dlm.FragmentDefinitionDao">
</bean>
 
layoutContext.xml

Modify dlmConfigurationLoader bean, replacing:

...

>ant data-import -Ddir<path.to.frag-def.dir>

The .fragment-definition.xml files support the same XML syntax as dlm.xml

...