Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBOSS MDB MessageID coming as Null

 
vijay sachin
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Please help me with this ERROR message



I am using EJB3 and Application Server JBOSS 5.1.0.GA
onMessage() Method in MDB, while receiving message from queue the MessageID is coming as null.

Please help me with this Error Mesage.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some code would help...
 
vijay sachin
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SENDER CODE



RECEIVER CODE MDB




Receiver side MessageID is coming as NULL. But Text is receving correctly
Please help me in this issue
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
vijay sachin
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?


 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic