Installation guide

60
Pramati Server 3.5 Administration Guide
The Server provides a way of configuring this persistence type by exposing certain properties in the
jms-config.xml file. If your system does not involve handling any persistent message, you don’t need
to configure any value.
With the following tags, we can configure persistence in JMS Server. The tag is part of the <admin-
params> of the jms-config.xml:
<persistent-store>
<persistence-enabled>true</persistence-enabled>
<!-- persistence-disabled-policy: throw-exception,
override-message- delivery-mode(default) -->
<persistence-disabled-policy>
override-message-delivery- mode
</persistence-disabled-policy>
<!-- persistence-type: file-store(default), db-store -->
<persistence-type>
db-store
</persistence-type>
<file-store>
<!-- messages-dir is the absolute path or
relative with prefix $NODES_DIR/ or use prefix $INSTALL_DIR/
to make the store relative to install dir
-->
<messages-dir>$NODES_DIR/jmsmessages</messages-dir>
<max-file-size-mb>10</max-file-size-mb>
<purge-interval-sec>600</purge-interval-sec>
</file-store>
<db-store>
<data-source-name>jmsdb</data-source-name>
<jms-table-name-prefix>pmt_</jms-table-name-prefix>
</db-store>
</persistent-store>
If you do not want to persist messages, then you can explicitly disable the persistence by specifying
the <persistence-enabled>false</persistence-enabled>. If this flag is set then the message server does not
check for any other configuration for the persistence. Whenever you set this flag as false, you also
specify the <persistence-disabled-policy>, which denotes what to do if the persistence is disabled and
the user is sending persistent messages. The persistence disabled policy should be either ‘override-
message-delivery-mode’ or ‘throw exception’. If the persistence-disabled-policy is ‘override-message-