File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes JMS and MDBs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS and MDBs " Watch "JMS and MDBs " New topic
Author

JMS and MDBs

Srinivasarao Borra
Greenhorn

Joined: Aug 01, 2006
Posts: 7
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

Joined: Jul 20, 2005
Posts: 10051
    
163

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 ]

[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS and MDBs