I am using JBoss AS 4.2.2.GA, JBoss Messaging 1.4.4.GA and JBoss ESB. I have the following situation, five SQL commands of JBoss Messaging are running non-stop, making an average of 800 commands every 5 seconds. The commands are:
INSERT_MESSAGE_REF=INSERT INTO JBM_MSG_REF (CHANNEL_ID, MESSAGE_ID, TRANSACTION_ID, STATE, ORD, PAGE_ORD, DELIVERY_COUNT, SCHED_DELIVERY) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
INSERT_MESSAGE=INSERT INTO JBM_MSG (MESSAGE_ID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, TYPE, HEADERS, PAYLOAD) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
UPDATE_ID_IN_CACHE=UPDATE JBM_ID_CACHE SET JBM_ID = ? WHERE NODE_ID = ? AND CNTR = ?
DELETE_MESSAGE=DELETE FROM JBM_MSG WHERE MESSAGE_ID = ? AND NOT EXISTS (SELECT JBM_MSG_REF.MESSAGE_ID FROM JBM_MSG_REF WHERE JBM_MSG_REF.MESSAGE_ID = ?)
DELETE_MESSAGE_REF=DELETE FROM JBM_MSG_REF WHERE MESSAGE_ID=? AND CHANNEL_ID=? AND STATE='C'
Running a profiler on the application, 428.156 occurrences were recorded for each command in 140 minutes and 7736 messages were delivered. In this profile, I saw that commands are executed from a ThreadPoolExecutor$Worker.run.
This process is extremely active in Oracle and there is something wrong with it, because even without traffic and no message, this high number of commands are still executed.
I separated the datasources for each component and saw that the datasource is used in mbean <mbean code="org.jboss.messaging.core.jmx.JDBCPersistenceManagerService" name="jboss.messaging:service=PersistenceManager"... at oracle-persistence-service.xml.
Have someone an idea what could be causing this problem or if there is any configuration that can stop this thread or even better, solve the problem?
Thanks for answering,