I can see here (http://activemq.apache.org/jdbc-support.html) that HSQLDB is
a "supported" platform, and I can see the HsqlJDBCAdapter class in my
classpath.  BUt I don't get how to configure AMQ to work with an HSQLDB
database.  I tried it and got an SQLException to do with invalid SQL
("SELECT ... FOR UPDATE" is illegal in HSQL apparently). n I had assumed
that this was the function of the HsqlJDBCAdapter - and if so I must be
configuring it wrong.  Anyone have an example that works (using Spring
config?).

Here's one that doesn't work (with AMQ 4.2-incubator-SNAPSHOT):

<bean id="brokerService" class="org.apache.activemq.broker.BrokerService"
init-method="start"
        destroy-method="stop">
        <property name="brokerName" value="broker" />
        <property name="transportConnectorURIs">
                <list>
                        <value>vm://localhost</value>
                </list>
        </property>
        <property name="persistenceAdapter">
                <bean 
class="org.apache.activemq.store.jdbc.JDBCPersistenceAdapter">
                        <property name="dataSource" ref="dataSource" />
                        <!-- I assume this is redundant because it should be 
autodetected? -->
                        <property name="adapter">
                                <bean 
class="org.apache.activemq.store.jdbc.adapter.HsqldbJDBCAdapter"/>
                        </property>
                        <property name="createTablesOnStartup" value="true" />
                </bean>
        </property>
</bean>

I gave the BrokerService an id= but it doesn't have any dependents - it's
all a bit fuzzy in my mind.  Is that expected.

-- 
View this message in context: 
http://www.nabble.com/HSQLDB-and-Spring-config--tf4111985s2354.html#a11692091
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to