activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Holger Arendt <holger.are...@acoreus.de>
Subject ActiveMQ 4.0 with DB2
Date Mon, 13 Mar 2006 10:06:01 GMT
Hi,

i'am trying to get ActiveMQ 4.0 (snapshot) working with DB2. My current 
configuration (spring application xml) looks like this:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>

  <bean id="db2datasource" class="org.apache.commons.dbcp.BasicDataSource">
    <property name="driverClassName" value="com.ibm.db2.jcc.DB2Driver"/>
    <property name="url" value="URL"/>
    <property name="username" value="USER"/>
    <property name="password" value="PASS"/>   
  </bean>

  <bean id="persistenceadapter" 
            class="org.apache.activemq.store.jdbc.JDBCPersistenceAdapter">
    <property name="dataSource" ref="db2datasource"/>
  </bean>

  <bean id="broker" class="org.apache.activemq.broker.BrokerService">
    <property name="persistenceAdapter">
      <ref bean="persistenceadapter"/>
    </property>
    <property name="useJmx"><value>true</value></property>
  </bean>
</beans>

I start the broker with a small java program and addia new transport connector 
via addConnector(..), as this was the only way to get rid of the derby db 
stuff. 

My first problem was finding the appropriate jdbc adapter. The "JDBC Support" 
page mentions DB2, but there is no configuration file for DB2. Thus, upon 
broker start i get this message:

WARNING: Database driver NOT recognized: 
[ibm_db2_jdbc_universal_driver_architecture].  Will use default JDBC 
implementation.


But this seems to be o.k. so far, because after starting the broker, two new 
tables (activemq_msgs/acks) get created. 

Testing the setup with the provided producer/consumer example works, but after 
changing the properties in the build.xml to transacted=true, durable=true, 
and providing a producer client id, the producer/the broker throws this 
exception:

INFO: Sync error occurred: java.io.IOException: Non-atomic batch failure.  The 
batch was submitted, but at least one exception occurred on an individual 
member of the batch. Use getNextException() to retrieve the exceptions for 
specific batched elements.
java.io.IOException: Non-atomic batch failure.  The batch was submitted, but 
at least one exception occurred on an individual member of the batch. Use 
getNextException() to retrieve the exceptions for specific batched elements.
...


So basically i'am looking for some information or hints about getting DB2 and 
ActiveMQ working together. Do i need  a new DefaultJDBCAdapter subclass for 
this? Can anybody provide me with a working configuration example? 


Thanks,
  Holger

-- 
Holger Arendt
Software Development
acoreus AG   
Zollhof 10            
40221 Düsseldorf              

Telefon +49.211.540 30.212
Telefax +49.211.540 30.900
holger.arendt@acoreus.de
www.acoreus.de

Mime
View raw message