Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS and MDBs

 
Srinivasarao Borra
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This is my first posting to this forum.Here is my problem.

My requirement is to make a copy of the selected record into all the child tables.While this functionality is happening at the back,the user should see the progress page in the front end.These two tasks should be done simultaneously.To implement this, I have chosen the JMS and MDB concept.

At the Back end I am sending a request message into the request queue and it will invoke the MDB and in turn it will invoke the business logic.Upon completeing this business logic(updating all child tables) I am sending the response into the response queue.At the front end the user is getting the progress page and it will be refreshed after every 3 seconds for checking whether there is any response in the response queue.If there is a response in the queue it is working fine.

What my prblem now is , when there is a problem in sending the response to the response queue itself how to make the user know that there is a problem with the response but the task got completed.He is still getting the progress page and it is getting refreshed even though there is no message.

Here is my technical flow.

1)Business Logic Flow.
TreeCopyAction->Delegate->EJB->send the request message->invokes MDB-> invokes business logic->sends the response to response queue.

2)Front End flow.
Progress JSP->ProgressAction->Delegate->EJB->check for messages.For every 3 seconds this JSP gets refreshed and it will check for the response.

Both the steps 1 & 2 are happening simultaneously.

Shall anybody suggest me the solution.Very Urgent.

[ August 01, 2006: Message edited by: Srinivasarao Borra ]
[ August 01, 2006: Message edited by: Srinivasarao Borra ]
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any need for MDB here? Since what you are trying to achieve appears to be a synchronous process. MDBs are mainly meant for asynchronous processes.

BTW, Welcome to Javaranch
[ August 01, 2006: Message edited by: jaikiran pai ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic