Adding or restating to what Mike said:

If the three queries ( to the db and to the two external applications), can 
happen concurrently, create 3 MDBs one for the db and one each for the two 
external applications. Create 3 temporary queues and send the message (or 
command wrapped in a message) to each of them:

dbSender.send(queryMessage1);
  | exApp1.send(queryMessage2);
  | exApp2.send(queryMessage3);

Create 3 Receivers, one each for each queue. And a message listener to all the 
receivers to receive the results and then process them. (You can have 3 message 
listeners attached, if you want to). 

Send the results, in a blocking call to the 3rd external app. Once the result 
is obtained, send it back to the client. 

In the SLSB code, you will have to block the control once you are done posting 
queries on the first three queues. This is because you wanted your code to be 
synchronous from client's prespective. 

HTH,

Thanks,
Kalyan.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3855057#3855057

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3855057


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to