ConfigMessagingJDBC2Persistence

JBoss Messaging JDBC2 Persistence Configuration

 

This service persists messages to the database.

 

The configuration can be found in deploy/jboss-messaging.sar/hsqldb-persistence-service.xml

 

 

 

 

It is recommended you change to a real database for production.

 

Alternates for other databases can be found in examples/config (or src/etc/server/default/deploy).

You also need to deploy the relevant datasource for your chosen database.

 

Default Configuration (which uses HSQL)

<server>

   <mbean code="org.jboss.messaging.core.plugin.JDBCPersistenceManager"
      name="jboss.messaging:service=PersistenceManager"
      xmbean-dd="xmdesc/JDBCPersistenceManager-xmbean.xml">
      <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
      <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
      <depends optional-attribute-name="ChannelMapper">jboss.messaging:service=ChannelMapper</depends>
      <attribute name="DataSource">java:/DefaultDS</attribute>
      <attribute name="CreateTablesOnStartup">true</attribute>
      <attribute name="UsingBatchUpdates">true</attribute>
   </mbean>

   <mbean code="org.jboss.jms.server.plugin.JDBCChannelMapper"
      name="jboss.messaging:service=ChannelMapper"
      xmbean-dd="xmdesc/JDBCChannelMapper-xmbean.xml">
      <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
      <depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager</depends>
      <attribute name="DataSource">java:/DefaultDS</attribute>
      <attribute name="CreateTablesOnStartup">true</attribute>
   </mbean>         
   
</server>