For those cases where journaling is not appropriate, or you wish to use your own journaling system, you can used the JDBC persistence adapter without the Fuse MQ Enterprise high performance journal.
Example 9 shows a configuration fragment that configures the plain JDBC adapter to use the Apache Derby database.
Example 9. Configuring Fuse MQ Enterprise to use the Plain JDBC Persistence Adapter
<beans ... > <broker ...> ...<persistenceAdapter>
<jdbcPersistenceAdapter dataSource="#derby-ds" /> </persistenceAdapter> ... <broker> ...
<bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource"> <property name="databaseName" value="derbydb"/> <property name="createDatabase" value="create"/> </bean>
The configuration in Example 9 has three noteworthy elements:
The | |
The | |
The |
Table 4 describes the attributes used to configure the non-journaled JDBC persistence adapter.
Table 4. Attributes for Configuring the Plain JDBC Persistence Adapter
| Attribute | Default Value | Description |
|---|---|---|
adapter
| Specifies the strategy to use when accessing a non-supported database. For more information see Using generic JDBC providers. | |
cleanupPeriod
| 300000 | Specifies, in milliseconds, the interval at which acknowledged messages are deleted. |
createTablesOnStartup
| true | Specifies whether or not new database tables are created when the broker starts. If the database tables already exist, the existing tables are reused. |
dataDirectory
| activemq-data | Specifies the directory into which the default Derby database writes its files. |
dataSource
| #derby | Specifies the id of the Spring bean storing the JDBC driver's configuration. For more information see Configuring your JDBC driver. |
transactionIsolation | Connection.TRANSACTION_READ_UNCOMMITTED | Specifies the required transaction isolation level. For allowed values, see java.sql.Connection. |
useLock | true | Specifies in the adapter uses file locking. |
lockKeepAlivePeriod | 30000 | Specifies the time period, in milliseconds, at which the current time is
saved in the locker table to ensure that the lock does not timeout.
0 specifies unlimited time. |











