Persistence Mode
The WebConsole Server may or may not be configured to use a database. Persistence mode enabled refers to when a database is used for configuration and storage. The WebConsole Server uses the persistence mode by default. You can disable the persistence mode in web.xml.
Depending on the selected mode, different aspects of the web applications are configured differently. The following sections cover these configuration options.
The persistence mode can be enabled or disabled in web.xml
as shown:
<!-- Hawk webconsole persistence mode -->
<!-- Accepted values are either true or false, default value is true-->
<context-param>
<param-name>persistence_mode</param-name>
<param-value>false</param-value>
</context-param>
Persistence Mode Enabled Settings
With persistence mode enabled, you can save/restore configuration objects and user created dashboards across multiple sessions.
Note |
The above functionality is not available when the persistence mode is disabled. |
TIBCO Hawk bundles a H2 database (http://www.h2database.com
) for data persistence. You may choose to connect to an external database that is JDBC compliant
Configuring an External Database
1. | Define database resource in the hawkwebconsole web application's META-INF/context.xml as follows: |
<Context>
<!-- Configure Hawk Database resource for Persistence mode-->
<Resource name="jdbc/hawkdb"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
type="javax.sql.DataSource"
url="jdbc:h2:tcp://localhost/~/hawk"
driverClassName="org.h2.Driver"
username="sa"
password=""
maxActive="100"
maxIdle="20"
initialSize ="10"
defaultAutoCommit ="false"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"/>
</Context>
2. | Define the resource reference in its web.xml as follows: |
<resource-ref>
<description>Hawk Database Connection</description>
<res-ref-name>jdbc/hawkdb</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>