It's not a secret anymore!
The moose likes EJB and other Java EE Technologies and the fly likes Message Driven Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Message Driven Bean" Watch "Message Driven Bean" New topic

Message Driven Bean

Om Sivanesan

Joined: Feb 05, 2004
Posts: 3
If the system crashes, what happens to the contents of the queue the Message Driven Bean is listening to? I am using JBoss.
Sergiu Truta
Ranch Hand

Joined: Dec 16, 2003
Posts: 121
The contents of the queues will not be lost. This is the beauty of messaging and that's why it's being used on a such large scale. I've even seen posts on this forum where people said the only reason they like EJBs is MDBs.
The next time you restart the JBoss server your Message Driven Beans will consume these messages.
I am using JBoss 3.0 and inside the /default folder you can see a a /db/jbossmq/file/ folder and inside this folder you can see the folders for each queue (A,B,C,D,DLQ). If you browse into these folders you will see some files - these are the messages. In conclusion they are persisted on the disk until consumed.
Hope this helps. I'm walking the path...
Om Sivanesan

Joined: Feb 05, 2004
Posts: 3
Thank you for the information.
I agree. Here's the link:
subject: Message Driven Bean
jQuery in Action, 3rd edition