My Java application is deployed on 2 virtual machines (load balanced by F5), points to Oracle 8i database. I have a MDB that accepts messages from the application, and sends it to a queue. My application was using a different JNDI name (not DefaultDS) and every thing was working fine.
Then I realized my messaging queue is using Hypersonic, so I have modified DefaultDS to point to Oracle DB instead of hypersonic (copied oracle-jdbc2-service.xml, deleted hsqldb-ds.xml). I have also modified my application's DB properties to point to DefaultDS. Also modified context.xml to use DefaultDS, and modified oracle-ds.xml's jndi name to DefaultDS.
CREATE_TABLES_ON_STARTUP variable is TRUE on both machines, for both oracle-jdbc2-service.xml and hsqldb-jdbc-state-service.xml files. So, I noticed several new tables in my schema, once my changes were done and server is rebooted.
Now I see below warning on server start up:
WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] Could not find new XAResource to use for recovering non-serializable XAResource
and errors when I send several requests at the same time:
ERROR [com.xxx.JmsProducer] JmsProducer.sendMessage: Error Could not store message: 9 msg=8 hard NOT_STORED PERSISTENT queue=QUEUE.xxx priority=4 lateClone=false hashCode=2301493; - nested throwable: (java.sql.SQLException: ORA-00001: unique constraint
This unique key it is complaining about is, JMS_MESSAGES table MESSAGEID and DESTINATION unique key.
Are these problems due to the fact that both machines are pointing to same DB, and trying to insert messages in to JMS_MESSAGES table independent of each other? Any suggestions on how to resolve this?
This doesn't seem to be the right section to post this. I will post it in JMS section.