You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Koka <wc...@symcor.com> on 2007/12/04 19:15:11 UTC
ActiveMQ with MySQL set up problems
Hi all,
I am trying to configure a ActiveMQ broker with a MySQL backend. I followed
the directions i found at:
http://note19.com/2007/06/23/configure-activemq-with-mysql/
I am getting some errors, but can't really pin point where the error was. If
anyone has any idea or experience with this, please give me a shout!
My configuration file is below:
<beans>
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker name="broker1" useJmx="true"
xmlns="http://activemq.org/config/1.0">
<persistenceAdapter>
<journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.base}/activemq-data" dataSource="#mysql-ds"/>
</persistenceAdapter>
<transportConnectors>
<transportConnector uri="tcp://localhost:61636" />
</transportConnectors>
<networkConnectors>
<!--
<networkConnector uri="multicast://default?initialReconnectDelay=100"
/>
<networkConnector uri="static://(tcp://localhost:61616)" />
-->
</networkConnectors>
</broker>
<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="activemq"/>
<property name="password" value="activemq"/>
<property name="poolPreparedStatements" value="true"/>
</bean>
</beans>
The output i see is below:
C:\ActiveMQ\conf>activemq xbean:MySQL_Test.xml
Warning: JAVA_HOME environment variable is not set.
ACTIVEMQ_HOME: C:\ActiveMQ\bin\..
ACTIVEMQ_BASE: C:\ActiveMQ\bin\..
Loading message broker from: xbean:MySQL_Test.xml
INFO BrokerService - ActiveMQ 4.1.1 JMS Message Broker
(local
ost) is starting
INFO BrokerService - For help or more information please
see:
http://incubator.apache.org/activemq/
INFO ManagementContext - JMX consoles can connect to
service:jmx:
mi:///jndi/rmi://localhost:1099/jmxrmi
INFO JDBCPersistenceAdapter - Database driver recognized:
[mysql-ab_jd
c_driver]
INFO DefaultDatabaseLocker - Attempting to acquire the exclusive
lock
to become the Master broker
INFO DefaultDatabaseLocker - Attempting to acquire the exclusive
lock
to become the Master broker
INFO DefaultDatabaseLocker - Attempting to acquire the exclusive
lock
to become the Master broker
INFO DefaultDatabaseLocker - Attempting to acquire the exclusive
lock
to become the Master broker
INFO DefaultDatabaseLocker - Attempting to acquire the exclusive
lock
to become the Master broker
INFO BrokerService - ActiveMQ Message Broker (localhost,
null
is shutting down
INFO TransportConnector - Connector tcp://localhost:61636
Stopped
INFO DefaultDatabaseLocker - Attempting to acquire the exclusive
lock
to become the Master broker
INFO DefaultDatabaseLocker - Attempting to acquire the exclusive
lock
to become the Master broker
INFO DefaultDatabaseLocker - Attempting to acquire the exclusive
lock
to become the Master broker
INFO DefaultDatabaseLocker - Attempting to acquire the exclusive
lock
to become the Master broker
INFO DefaultDatabaseLocker - Attempting to acquire the exclusive
lock
to become the Master broker
INFO DefaultDatabaseLocker - Attempting to acquire the exclusive
lock
to become the Master broker
INFO DefaultDatabaseLocker - Attempting to acquire the exclusive
lock
to become the Master broker
--
View this message in context: http://www.nabble.com/ActiveMQ-with-MySQL-set-up-problems-tf4944722s2354.html#a14156118
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ with MySQL set up problems
Posted by Koka <wc...@symcor.com>.
Awesome!
It works now.
Thanks!
bsnyder wrote:
>
> On Dec 4, 2007 11:15 AM, Koka <wc...@symcor.com> wrote:
>>
>> Hi all,
>>
>> I am trying to configure a ActiveMQ broker with a MySQL backend. I
>> followed
>> the directions i found at:
>> http://note19.com/2007/06/23/configure-activemq-with-mysql/
>>
>> I am getting some errors, but can't really pin point where the error was.
>> If
>> anyone has any idea or experience with this, please give me a shout!
>> My configuration file is below:
>>
>> <beans>
>>
>> <bean
>> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
>>
>> <broker name="broker1" useJmx="true"
>> xmlns="http://activemq.org/config/1.0">
>>
>> <persistenceAdapter>
>>
>>
>>
>> <journaledJDBC journalLogFiles="5"
>> dataDirectory="${activemq.base}/activemq-data" dataSource="#mysql-ds"/>
>>
>> </persistenceAdapter>
>>
>> <transportConnectors>
>> <transportConnector uri="tcp://localhost:61636" />
>> </transportConnectors>
>>
>> <networkConnectors>
>> <!--
>> <networkConnector
>> uri="multicast://default?initialReconnectDelay=100"
>> />
>> <networkConnector uri="static://(tcp://localhost:61616)" />
>> -->
>> </networkConnectors>
>> </broker>
>>
>>
>> <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="activemq"/>
>> <property name="password" value="activemq"/>
>> <property name="poolPreparedStatements" value="true"/>
>> </bean>
>>
>> </beans>
>>
>> The output i see is below:
>>
>> C:\ActiveMQ\conf>activemq xbean:MySQL_Test.xml
>>
>> Warning: JAVA_HOME environment variable is not set.
>>
>> ACTIVEMQ_HOME: C:\ActiveMQ\bin\..
>> ACTIVEMQ_BASE: C:\ActiveMQ\bin\..
>> Loading message broker from: xbean:MySQL_Test.xml
>> INFO BrokerService - ActiveMQ 4.1.1 JMS Message Broker
>
> I see you're using ActiveMQ 4.1.1 where this was a known issue:
>
> http://issues.apache.org/activemq/browse/AMQ-1236
>
> But 4.1.2 has not been released yet so it looks like the only
> workaround is to disable the pure JDBC master/slave functionality by
> setting useDatabaseLock="false" on the <jdbcPersistenceAdapter>
> element in the conf/activemq.xml file.
>
> Bruce
> --
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
>
> Apache ActiveMQ - http://activemq.org/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
>
> http://bruceblog.org/
>
>
--
View this message in context: http://www.nabble.com/ActiveMQ-with-MySQL-set-up-problems-tf4944722s2354.html#a14157314
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ with MySQL set up problems
Posted by Bruce Snyder <br...@gmail.com>.
On Dec 4, 2007 11:15 AM, Koka <wc...@symcor.com> wrote:
>
> Hi all,
>
> I am trying to configure a ActiveMQ broker with a MySQL backend. I followed
> the directions i found at:
> http://note19.com/2007/06/23/configure-activemq-with-mysql/
>
> I am getting some errors, but can't really pin point where the error was. If
> anyone has any idea or experience with this, please give me a shout!
> My configuration file is below:
>
> <beans>
>
> <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
>
> <broker name="broker1" useJmx="true"
> xmlns="http://activemq.org/config/1.0">
>
> <persistenceAdapter>
>
>
>
> <journaledJDBC journalLogFiles="5"
> dataDirectory="${activemq.base}/activemq-data" dataSource="#mysql-ds"/>
>
> </persistenceAdapter>
>
> <transportConnectors>
> <transportConnector uri="tcp://localhost:61636" />
> </transportConnectors>
>
> <networkConnectors>
> <!--
> <networkConnector uri="multicast://default?initialReconnectDelay=100"
> />
> <networkConnector uri="static://(tcp://localhost:61616)" />
> -->
> </networkConnectors>
> </broker>
>
>
> <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="activemq"/>
> <property name="password" value="activemq"/>
> <property name="poolPreparedStatements" value="true"/>
> </bean>
>
> </beans>
>
> The output i see is below:
>
> C:\ActiveMQ\conf>activemq xbean:MySQL_Test.xml
>
> Warning: JAVA_HOME environment variable is not set.
>
> ACTIVEMQ_HOME: C:\ActiveMQ\bin\..
> ACTIVEMQ_BASE: C:\ActiveMQ\bin\..
> Loading message broker from: xbean:MySQL_Test.xml
> INFO BrokerService - ActiveMQ 4.1.1 JMS Message Broker
I see you're using ActiveMQ 4.1.1 where this was a known issue:
http://issues.apache.org/activemq/browse/AMQ-1236
But 4.1.2 has not been released yet so it looks like the only
workaround is to disable the pure JDBC master/slave functionality by
setting useDatabaseLock="false" on the <jdbcPersistenceAdapter>
element in the conf/activemq.xml file.
Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
http://bruceblog.org/