-
1. Re: Cannot Use JDBC for Message Persistance Store
hackerdude Apr 1, 2002 6:08 PM (in response to iihome)Hello,
Warning: This is what worked for me. Your Mileage may vary.
I had the same problem under JBoss 2.4.4 and Oracle persistence. I ran the ole' distributed debugger using JBoss_2_4_4 and found out that the JDBC PersistenceManager class that comes in the source code, the constructor does not exist. The constructor is supposed to create a new transaction manager which is never being created, hence the nullpointer on BasicQueue:323, which reads:
server.getPersistenceManager().getTxManager().addPostCommitTask( txId, task );
So I decided to go ahead and add a constructor that initializes a transactionmanager in the same way as the rolling implementation:
/**
* PersistenceManager constructor patch.
*
* @exception javax.jms.JMSException If it blows up on constructing
*/
public PersistenceManager()
throws javax.jms.JMSException
{
super();
txManager = new TxManager( this );
}
This seems to have fixed the problem. Now Oracle persists my messages and I can do a "select COUNT(*) from jms_messages" and get a non-zero result. The message inside looks valid. I haven't tested it further yet, but I thought you'd be interested to know that someone else got it to work.
So the lowdown of this is:
1) Get jboss-2.4.4 source.
2) Add the constructor to jbossmq/src/main/org.jboss.mq.pm.jdbc.PersistenceManager
3) run ant build-jbossmq
4) After building, take the jbossmq/build/lib/ext/jbossmq.jar and put it on the jboss/lib/ext directory (don't forget to back the old one up first).
5) Try running it again.
This is what Worked For Me (tm), based on remote debugging the application and putting a few breakpoints. I only spent a little time on this, not enough to guarantee correctness or even sanity.
I would make sure it works and I'd test the heck of it before putting it anywhere but your own box.
Hope this helps,
- Hackerdude -
2. Re: Cannot Use JDBC for Message Persistance Store
iihome Apr 2, 2002 12:39 PM (in response to iihome)Thanks, the JBossMQ can run with mysql according your advise :)