my dog learned polymorphism*
The moose likes JBoss/WildFly and the fly likes JBOSS MDB MessageID coming as Null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBOSS MDB MessageID coming as Null" Watch "JBOSS MDB MessageID coming as Null" New topic
Author

JBOSS MDB MessageID coming as Null

vijay sachin
Greenhorn

Joined: Jan 18, 2011
Posts: 23
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

Joined: May 14, 2008
Posts: 5812
    
    7

Some code would help...


JBoss In Action
vijay sachin
Greenhorn

Joined: Jan 18, 2011
Posts: 23
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

Joined: May 14, 2008
Posts: 5812
    
    7

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

Joined: Jan 18, 2011
Posts: 23
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

Joined: May 14, 2008
Posts: 5812
    
    7

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBOSS MDB MessageID coming as Null
 
Similar Threads
MDB: Message id is null Error
Jboss: MDB : "Message id is null" Error
SpyJMSException in JBOSS
MDB MessageID coming as Null
Max Delivery Attempts ignored on Jboss 5.1 queue?