[jboss-user] [Messaging, JMS & JBossMQ] - Error persisting message in DB2

kaobe do-not-reply at jboss.com
Fri Dec 22 03:25:04 EST 2006


Hi there!

I have a JBoss 4.0.3 SP1 that does JMS with MDBs. The persistance is done with DB2. There is a message sent to a topic, an MDB reacts and - as a result - sends another message to a Queue. The first message is being sent and received, it is being saved in the database (jms_messages). When the answer message should be saved it is being sent and JBoss tries to store it, but gets an SQL error from DB2, because the unique index defined in deploy/jms/-jdbc2-service.xml for the fields txop and txid is being violated. There is no transaction running, that's why the values are null and 'A' both for the already stored message for the topic and the new one for the queue. 
No my question: is this unique index neccessary? I have dropped it from the database for a test and it seemed to work. So I would like to know why there is such an index. 
The funny thing is, it worked with hsqldb (with the index). Does that mean hsqldb violates the index definition or is there some other reason for this behaviour?

Thanks a lot for your help! 

I wish everyone of you merry christmas and a happy new year!

Bye, 

Peter

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995808#3995808

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995808



More information about the jboss-user mailing list