Use NonPersistence messages
I use nonPersistent messages. The Propblem is, when i abort the Server, or the server is shutdown by an error, the messages are not delete in db\jbossmq\file\QUEUE.A. Another problem is, that jboss not delete nonPersistant messages from this directory when the client is abort and not received all messages from the server. Can i prompt jboss to delete the messages in this directory, no matter what happens?
Don't use file persistence, it is a legacy configuration that won't be supported
for much longer (I don't maintain it even now except when the internal api is changed)
ok, i used jboss version 3.2.3 and org.jboss.mq.pm.jdbc2.PersistenceManager. The problem is the same. After abort the server, the messages in the jms_messages table marked as rollback persistent 'A'. But i wont, that the messages are not persistent in the db after a server crash! Is there a solution for this problem?
this is the message output from the mdb:
jmsDestination : QUEUE.A
jmsDeliveryMode : 2
jmsExpiration : 0
jmsPriority : 4
jmsMessageID : ID:3-10820278826871
jmsTimeStamp : 1082027882687
jmsReplyTo : QUEUE.B
jmsType : null
jmsRedelivered : false
msgReadOnly : true
i think the jmsDeliveryMode 2 stands for NON_PERSISTENT. So, i don't now how jboss use the db to store the messages?
Why do you "think the jmsDeliveryMode 2 stands for NON_PERSISTENT"? Instead of guessing, I consulted the J2EE API documentation. This clearly states that javax.jms.DeilveryMode.PERSISTENT = 2 (NON_PERSISTENT = 1)