[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Information about JBoss cache vs database
amar.trnka
do-not-reply at jboss.com
Mon Feb 9 07:54:51 EST 2009
Hi again,
I've found a kind of solution. When JBoss server starts to shutdown it calls manually created destroy method that receives all messages from memory, set them as persistent and stores them in database. Our final problem is:
I'll take example from previous post. First 1000 messages are in memory, next 2000 are in database. When we shutdown JBoss first 1000 messages are placed after message with id = 3000. So when we start JBoss again in memory will be messages with ids: 1001 to 2000. This is out of order and presents a huge problem to me. I've tried with JMSPriority to give messages that stores while shutting down jboss higher priority, but without effect, because JMSPriority only works when all messages are already in the memory.
In oracle-persistence-service.xml file I've found SQLProperties, and query:
LOAD_MESSAGES=SELECT MESSAGE_ID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, HEADERS, PAYLOAD, TYPE FROM JBM_MSG
I've tried to add ORDER BY PRIORITY DESC, but exception was thrown:
[JDBCSupport] SQLException caught, SQLState 42000 code:933- assuming deadlock detected, try:1
| java.sql.SQLException: ORA-00933: SQL command not properly ended
Is there any kind of solution that can sort messages from the database ?
PS. Did I write this topic in the correct forum, because nobody is answering ? Should it be in the JBoss Messaging subsection ?
Amar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4208179#4208179
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4208179
More information about the jboss-user
mailing list