Hello all,
Here's a question:
I have a session EJB that performs communication and processing with a legacy system. This processing can take an unknow time to complete. Given this, the EJB client is a MDB A, which consumes an message and initiates the processing in the EJB, allowing the client to do other tasks meanwhile.
The problem is that the clients needs to know time in time the processing status of EJB. I though using another MDB B and the EJB sending messages informing its status to a queue in order to the MDB B consumes it. But, how do I send that received messages by the MDB B to the correct client?
Thanks,
JP
-
Asynchronous processing (3 messages)
- Posted by: Jo�o Pereira
- Posted on: January 19 2005 08:06 EST
Threaded Messages (3)
- Ugh by adrian osullivan on January 21 2005 11:56 EST
- Ugh by Jo�o Pereira on February 02 2005 14:25 EST
- Er by adrian osullivan on February 08 2005 06:14 EST
- Ugh by Jo�o Pereira on February 02 2005 14:25 EST
-
Ugh[ Go to top ]
- Posted by: adrian osullivan
- Posted on: January 21 2005 11:56 EST
- in response to Jo�o Pereira
If you need to message to be sent to a client, I would say an MDB was a poor implementation choice for the service.
Use a service implementation that can make client callbacks, such as a Session Bean. -
Ugh[ Go to top ]
- Posted by: Jo�o Pereira
- Posted on: February 02 2005 14:25 EST
- in response to adrian osullivan
What do you mean with that? -
Er[ Go to top ]
- Posted by: adrian osullivan
- Posted on: February 08 2005 06:14 EST
- in response to Jo�o Pereira
I just meant that if you use MDB, you achieve asynchronicity but at the cost losing your references to the client. So making event-based calls to the client becomes hard.
If you use old-fashioned java threads to achieve asynchronicity, it allows you to do callbacks - see the Observer design pattern.