Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

In message beans how client knows his message is processed successfully or not?

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In message beans how client knows his message is processed successfully or not? do we have to see in container log files only?

In session & entity beans client calls a method of the bean by passing some parameters. Is message bean also like that?
according to spec/books message beans doesnt have client only container invokes them. Then what client has to invoke? how the process will be initiated? Here where JMS coming in to picture?.

Can a message bean method have a return values like any other methods?

Thanks,
Yamini.
 
Shreyas Reddy
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In message beans how client knows his message is processed successfully or not? do we have to see in container log files only?

I haven't done JMS for awhile. But if I remember correctly,
1. the message consumer should explicitly acknowledge the message by sending another message back to the original sender...for example A sends a message "xyz"to B, then B will have to send a message to A indicating that "xyz" is successfully consumed.
2. Look at any application log files indicating the success
3. If Queues are used, messageis saved by the JMS provider until successfully consumed by a receiver(or the message expires? - don't remember this part well).


In session & entity beans client calls a method of the bean by passing some parameters. Is message bean also like that?

NO

according to spec/books message beans doesnt have client only container invokes them. Then what client has to invoke? how the process will be initiated? Here where JMS coming in to picture?.


The main point is JMS is asynchronous. You will have to read the basics of JMS to understand why...
this link is helpful to understand JMS
JMS

Can a message bean method have a return values like any other methods?

BIG NO
 
Joe Nguyen
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the benefit for using Message driven bean is to take advantage of concurrent excecution. If I want response from message driven bean what do I need to do? one way I can think of is to save the response to a table and retrieve from the table later. Another way is to notify the caller via call back mechanism, but I am not quite sure whether ejb allows it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic