Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Delivery delay in MDB

PraveenAPMay 25 2011 — edited May 25 2011
Hi People,


I have just learned to create a JMS queue, an MDB.

I am able to write messages to Queue and read from MDB.

My Concern is, we use MDB to make the communication asynchronous, however, the MDB does not wait or there is no delay.

As soon as the messages arrive in the queue, the MDB jumps in and retrives the message.

This is literally synchronous.

So my question is how do I make the MDB to read messages at a delay.

ALSO, I would appreciate if I can get some pointers or links to learn the EJBs correctly.


Thanks in advance

Praveen
This post has been answered by r035198x on May 25 2011
Jump to Answer

Comments

r035198x
Answer
user10583423 wrote:
Hi People,


I have just learned to create a JMS queue, an MDB.

I am able to write messages to Queue and read from MDB.

My Concern is, we use MDB to make the communication asynchronous, however, the MDB does not wait or there is no delay.

As soon as the messages arrive in the queue, the MDB jumps in and retrives the message.

This is literally synchronous.
Asynchronous should be looked at from the client side (the side sending the message). It is asynchronous because you just send the message and don't wait to see if the message was processed or not. After the message has been sent, execution continues to the line after the sendMessage call regardless of whether the message is still being processed or still on the queue.
>
So my question is how do I make the MDB to read messages at a delay.
Why would you need this? What's the problem that you are trying to solve because MDBs may not be the best solution.
>
ALSO, I would appreciate if I can get some pointers or links to learn the EJBs correctly.


Thanks in advance

Praveen
The Java EE tutorial teaches many things from the basics. You should then also get the EE spec documents to use for reference.
Marked as Answer by PraveenAP · Sep 27 2020
PraveenAP
Oh thanks alot for the reply.

Now things are clear.

So the client sending the messages should be asynchronous........

Now, things fit into the frame correctly.

I was under the impression that my MDB has to wait or retrive messages at a regular interval.

So the client will write to the queue at a regular interval and my MDB keeps listening to them.

Thanks alot for redirecting me in the right direction.

Thanks
Praveen
1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 22 2011
Added on May 25 2011
2 comments
256 views