| <div class="wiki-content maincontent"> |
| <p>ActiveMQ explicity supports Derby, Axion, HSQL, Oracle, and SQLServer. Below are the steps on how to configure a new database.</p> |
| |
| <p>1. Modify activemq.xml found in the directory "activemq_home/conf" by editing or adding a JDBC DataSource Configuration.</p> |
| |
| <p>e.g.</p> |
| |
| <structured-macro ac:macro-id="8c9473ba-d5ec-4a14-b9dc-dcefecdec2c2" ac:name="code" ac:schema-version="1"><plain-text-body> |
| <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> |
| <property name="driverClassName" value="com.mysql.jdbc.Driver"/> |
| <property name="url" value="jdbc:mysql://localhost/activemq"/> |
| <property name="username" value="activemq"/> |
| <property name="password" value="activemq"/> |
| <property name="poolPreparedStatements" value="true"/> |
| </bean> |
| </plain-text-body></structured-macro> |
| |
| |
| <p><strong>For AMQ 3.x</strong></p> |
| <structured-macro ac:macro-id="3423b393-7e75-4fe6-baf4-6d8d7d26dc7e" ac:name="code" ac:schema-version="1"><plain-text-body> |
| <bean id="mssql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> |
| <property name="driverClassName"> |
| <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value> |
| </property> |
| <property name="url"> |
| <value>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=activedb</value> |
| </property> |
| <property name="username"> |
| <value>sa</value> |
| </property> |
| <property name="password"> |
| <value></value> |
| </property> |
| <property name="poolPreparedStatements"> |
| <value>true</value> |
| </property> |
| </bean> |
| </plain-text-body></structured-macro> |
| <p>2. Set the datasource reference to use the new jdbc configuration e.g <jdbcPersistence dataSourceRef="mssql-ds"/></p> |
| |
| <p>3. Place the jdbc driver in the directory "activemq_home/lib/optional".</p></div> |
| |