You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Vinicius Carvalho <ja...@gmail.com> on 2006/11/12 16:37:55 UTC
Database Locking issues
Hello there. I'm having problems running my examples in a non oracle
database. It seems that activemq uses FOR UPDATE for locking, but with
other databases it throws an error:
<amq:broker useJmx="false" persistent="true" brokerName="localhost">
<amq:persistenceAdapter>
<amq:jdbcPersistenceAdapter id="jdbcAdapter"
dataSource="#dataSource" createTablesOnStartup="true"
></amq:jdbcPersistenceAdapter>
</amq:persistenceAdapter>
<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:61616"></amq:transportConnector>
</amq:transportConnectors>
</amq:broker>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>org.hsqldb.jdbcDriver</value>
</property>
<property name="url">
<value>jdbc:hsqldb:hsql://localhost/testdb</value>
</property>
<property name="username">
<value>sa</value>
</property>
<property name="password">
<value></value>
</property>
</bean>
Any ideas?
Regards
--
IBM Certified SOA Solution Designer
IBM Database Associate - DB2 UDB V8.1 Family
Sun Certified Enterprise Architect (Part I)
Re: Database Locking issues
Posted by Dave Syer <da...@hotmail.com>.
How do you disable the exclusive lock? Ideally a solution involving Spring
configuration works best for me.
I am trying to do the same thing as the original post (where the platform
was pretty obviously HSQLDB, by the way). I guess the HSQLDB support isn't
as complete as it might be? Or Am I not configuring the adapter correctly?
<bean class="org.apache.activemq.broker.BrokerService" init-method="start">
<property name="vmConnectorURI" value="vm://localhost"></property>
<property name="persistenceAdapter">
<bean class="org.apache.activemq.store.jdbc.JDBCPersistenceAdapter">
<property name="dataSource" ref="dataSource"/>
</bean>
</property>
</bean>
<bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL">
<value>vm://localhost</value>
</property>
</bean>
James.Strachan wrote:
>
> So you could disable the exclusive lock we use in ActiveMQ; or if you
> let us know the database you are using and the correct SQL dialect for
> you database we could patch the code to use the correct SQL.
>
--
View this message in context: http://www.nabble.com/Database-Locking-issues-tf2617111s2354.html#a11688109
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Database Locking issues
Posted by James Strachan <ja...@gmail.com>.
So you could disable the exclusive lock we use in ActiveMQ; or if you
let us know the database you are using and the correct SQL dialect for
you database we could patch the code to use the correct SQL.
On 11/12/06, Vinicius Carvalho <ja...@gmail.com> wrote:
> Hello there. I'm having problems running my examples in a non oracle
> database. It seems that activemq uses FOR UPDATE for locking, but with
> other databases it throws an error:
>
> <amq:broker useJmx="false" persistent="true" brokerName="localhost">
> <amq:persistenceAdapter>
> <amq:jdbcPersistenceAdapter id="jdbcAdapter"
> dataSource="#dataSource" createTablesOnStartup="true"
> ></amq:jdbcPersistenceAdapter>
> </amq:persistenceAdapter>
> <amq:transportConnectors>
> <amq:transportConnector uri="tcp://localhost:61616"></amq:transportConnector>
> </amq:transportConnectors>
> </amq:broker>
>
> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
> <property name="driverClassName">
> <value>org.hsqldb.jdbcDriver</value>
> </property>
> <property name="url">
> <value>jdbc:hsqldb:hsql://localhost/testdb</value>
> </property>
> <property name="username">
> <value>sa</value>
> </property>
> <property name="password">
> <value></value>
> </property>
> </bean>
>
> Any ideas?
>
> Regards
>
> --
> IBM Certified SOA Solution Designer
> IBM Database Associate - DB2 UDB V8.1 Family
> Sun Certified Enterprise Architect (Part I)
>
--
James
-------
http://radio.weblogs.com/0112098/