• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMS and MDBs

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic