Versions Compared

Key

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

...

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.

Turn on the RDBMConfigurationLoader by defining the following property in dlm.xml:

...

RDBMConfigurationLoader can be turned on by modifying persistenceContext.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
xml
xml

<bean id="fragmentDefinitionDao" class="org.jasig.portal.layout.dlm.

...

FragmentDefinitionDao">
</bean>
layoutContext.xml

Modify dlmConfigurationLoader bean:

Code Block
xml
xml
<cache name<bean id="dlmConfigurationLoader" class="org.jasig.portal.layout.dlm.EvaluatorRDBMConfigurationLoader">
    eternal="false" maxElementsInMemory<property name="100configurationFile" overflowToDiskvalue="false" diskPersistent="false"classpath:/properties/dlm.xml" />
    <property timeToIdleSecondsname="0fragmentDao" timeToLiveSecondsref="300" memoryStoreEvictionPolicy="LRUfragmentDefinitionDao" />
persistenceContext.xml
Code Block
xmlxml

<bean id="fragmentDefinitionDao" class="org.jasig.portal.layout.dlm.FragmentDefinitionDao">
</bean>
Importing Fragment Definitions

...