At 1:49 AM +0000 11/14/03, Adrian Brock wrote:
Compare your properties with the one in docs/examples/jms in jboss 3.2.2 You'll find one of the deletes should be done through a join.
Regards, Adrian
On Fri, 2003-11-14 at 00:13, Michael Klem wrote:> INSERT_MESSAGE = insert into jms_messages (messageid, destination,Using: JBoss 3.0.8 MySQL 4.0.14 MySQL Driver mysql-connector-java-3.0.9-stable-bin.jar
I found that when using MySQL as my JMS data store, my JMS messages are not persisted correctly. I can verify that the messages are persisted to the MySQL db. When I stop JBoss the messages are still in the db. When I start JBoss again, the messages are deleted when the PersistentManager gets started.
I am using a transacted queue session to commit/rollback my JMS messages.
I did more experimenting with this and verified the following: 1. Using the file system as my data store, my messages are correctly persisted when JBoss is restarted.
2. Using Oracle 8i as my data store, my messages are correctly persisted when JBoss is restarted.
3. If I create messages with a non-transacted queue session, MySQL will persist these messages correctly when JBoss is restarted.
4. If I create messages with a transacted queue session and stop JBoss, and modify the db records so the TXID column contains a null value, MySQL will persist these messages correctly when JBoss is restarted.
MySQL Properties from jbossmq-service.xml
BLOB_TYPE = object_blob INSERT_TX = insert into jms_transactions (txid) values(?)messageblob, txid, txop) values(?,?,?,?,?)
SELECT_ALL_UNCOMMITED_TXS = select txid from jms_transactions
SELECT_MAX_TX = select max(txid) from jms_messages
SELECT_MESSAGES_IN_DEST = select messageid, messageblob from
jms_messages where destination=?
SELECT_MESSAGE = select messageid, messageblob from jms_messages
where messageid=? and destination=?
MARK_MESSAGE = update jms_messages set txid=?, txop=? where
messageid=? and destination=?
UPDATE_MARKED_MESSAGES = update jms_messages set txid=?, txop=?
where txop=?
UPDATE_MARKED_MESSAGES_WITH_TX = update jms_messages set txid=?,
txop=? where txop=? and txid=?
DELETE_MARKED_MESSAGES_WITH_TX = delete from jms_messages where
txid is not null and txop=?
DELETE_TX = delete from jms_transactions where txid = ?
DELETE_MARKED_MESSAGES = delete from jms_messages where txid=? and txop=?
DELETE_MESSAGE = delete from jms_messages where messageid=? and
destination=?
CREATE_MESSAGE_TABLE = create table jms_messages ( messageid
integer not null, destination varchar(255) not null, txid integer,
txop char(1), messageblob object, primary key (messageid,
destination) ) type=innodb
CREATE_TX_TABLE = create table jms_transactions ( txid integer )
type=innodb
My work around for now is to create and store my JMS messages until after the transaction. Then at the end of the transaction, use a non transacted queue session to create and send all my messages.
Seems like a hack, but need to be able to switch between different data sources for testing. I have not tested this under 3.2.2 yet.
Was wondering if others seen this before.-- xxxxxxxxxxxxxxxxxxxxxxxx Adrian Brock Director of Support Back Office JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx
------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
-- Michael Klem <[EMAIL PROTECTED]> 626-296-3027
------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user