Record activemq configuration mysql persistent get into the pit

First highlight what, Baidu find a solution to the problem must be a good time to take a look, combined with their own problems a little bit of correction, should not accept it, then be sure to back up your own code, you can do it in time to undo the changes

First I first pit is avoided, accustomed to the latest version, all I use is activemq 515, jdk 1.8, avoiding version conflicts,

If 10 or more is used activemq must be used jdk1.8 ,.

The second question, perfect into the pit, focusing on records, the following is a database configuration

<persistenceAdapter>
       <jdbcPersistenceAdapter dataSource="#mysql-ds" createTablesOnStartup="false"/>
</persistenceAdapter>

 

<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource2" destroy-method="close">
        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
        <property name="url" value="jdbc:mysql://localhost/activemq"/>
        <property name="username" value="root"/>
        <property name="password" value="root"/>
        <property name="maxActive" value="200"/>
        <property name="poolPreparedStatements" value="true"/>
    </bean>

This is miserable pit

Then on avtivemq normal start, perform ps -ef | grep activemq found in normal service. But not in the browser connection, and then execute

netstat -tnlp

It did not show port 8161

This is my second pit into

In active.xml the accidental deletion

<import resource="jetty.xml"/>

This configuration, which is said before a full replication problem caused by someone else's code, pit dead

However, this configuration will complain, report

org.apache.commons.dbcp.BasicDataSource can not find the 
correct configuration is

Guess you like

Origin www.cnblogs.com/yunian139/p/10986636.html