Feature: Session Persistence

The session persistence feature allows drools kie sessions to be persisted in a database surviving pdp-d restarts.

Enable session persistence
1 policy stop
2 features enable session-persistence

The configuration is located at:

  • $POLICY_HOME/config/feature-session-persistence.properties

Each controller that wants to be started with persistence should contain the following line in its <controller-name>-controller.properties

  • persistence.type=auto

Start the PDP-D using session-persistence
1 db-migrator -o upgrade -s ALL
2 policy start

Facts will survive PDP-D restart using the native drools capabilities and introduce a performance overhead.

Disable the session-persistence feature
1 policy stop
2 features disable session-persistence
3 sed -i "/persistence.type=auto/d" <controller-name>-controller.properties
4 db-migrator -o erase -s sessionpersistence   # delete all its database data (optional)
5 policy start

End of Document