I tried this with one of my MDBs and I got a valid messageID. But that was with using HSQLDB. I tried to rerun with MySQL but ran into hard drive issues. I'll try MySQL later and see if I still get a messageID.
Joined: Jan 18, 2011
I did not understand why DB came into picture in MDB.
As per my knowledge I am thing MDB is used to listen to queue which we configured in xml file.
and when sender sends message to JbossMQ then MDB onMessage() will listen to that and performs some logic.
This is want I understand Is it correct?
The messaging system uses a database. In some cases the messages are actually stored in the database. For example is there is no listener running then the messages might be persisted to a database. By default, JBoss Messaging uses the embedded HSQLDB. HSQLDB runs entirely in memory, so I wanted to see if there was a difference between using messaging for that and messaging with a real database. I am thinking that perhaps the messageId is assigned only when the it is stored in the database. I know this is grasping at straws but it is the only thing I can think of.
But then your reply tells me that you might not have configured messaging to use a different database, in which case I don't know why I am getting messageIds but you are not.