I use the JDBC+Mysql for persistent,and the activemq-xml's configure just
like the follows(I think has no error):
<persistenceAdapter>
                        <jdbcPersistenceAdapter dataSource="#mysql-ds"/>
                        </persistenceAdapter>

<!-- MySql DataSource Sample Setup -->
 
                <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?relaxAutoCommit=true"/>
                <property name="username" value="root"/>
                <property name="password" value=""/>
                <property name="poolPreparedStatements" value="true"/>
                </bean>
I had created the database :activemq  .And then ,I run the server,it throwed
out the exceptions:

.....activemq.store.jdbc.DefaultDatabase
Locker.start(DefaultDatabaseLocker.java:65) - Failed to acquire lock:
org.apache
.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed
org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from
pool fa
iled.......

I checked the mysql and found that the three tables:
ACTIVEMQ_ACKS 
ACTIVEMQ_LOCK 
activemq_msgs 
had been created successfully! So could someone tell me why?
-- 
View this message in context: 
http://www.nabble.com/Borrow-prepareStatement-from-pool-failed-%EF%BC%88JDBC-%EF%BC%8B-Mysql%EF%BC%89-tf4155991s2354.html#a11824614
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to