I have an application, which is basically combination of two different applications. A application is a third party software, which comes to my application B on to do some work, which A can't do. When appication B invokes app. A. A is a modal dialog application.. couple of screens to navigate and finally when user clicks "done" button on app. A's last page. It saves data in app. A's database, calls service of B (this service eventually reads data from A database).
After above steps, App. B takes over the control and there is a workflow process involved before things are said to be done in B. Now in some of the cases there is no workflow involved and as soon as user hits done on App. A, calls B's service, App. B should refresh its page with updated data.
Here to handle db, network etc. failure I am thinking to use JMS. App A would always put messsage in queue, App B would read it upon receipt in queue. Now as I said earlier there are some cases when there is no workflow involved where user (who is in App. B). Needs to see results right away as soon as he/she clicks "done" on app. A.
Since JMS would be in place, user won't be able to see his/her changes right away on UI until app. B consumes the message. Architecture wise this should be okay but from user perspective, this doesn't look so right. This is very critical and important issue for us and me to figure it out. Anyone has any ideas of how to achieve this? If not JMS, what else?
What I don't understand is why A might need to send a JMS message to B. How is B saving data in A?
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Joined: Dec 16, 2004
My typo in A and B. To simplify this. B saves data in B but then calls service of A so that A can read data from B. For this service call we want to go through JMS all the time as most of the transactions are through workflow system of A. However some of the transactions are straight forward and when user makes a change in B (through A, A is entry point), they should see their changes right away. Now since message will be in queue for A to consume, it won't display changes on the UI right away. Any ideas?
Joined: Sep 29, 2002
I don't understand what the reading by A of B's data has to do with B's ability to display data it B's users. Surely, once B has control after saving data, B will then either display the data or go through the workflow process and then display the data.
Also, you won't in any case have a transaction for A to read B's data as there is nothing to commit or rollback.
Joined: Dec 16, 2004
I think I messed up, between A and B by interchanging A and B while I was typing a question.
Anyways, to straighten this out. If for e.g. Two applications are communicationing with each other. First one gets message (consumer of message)from second one. Since we prefer to put everything into queue whether it involves workflow or not and until first application consumes messages it won't display the change on its UI until message is consumed or something? How first app. will refresh its page by itself after consuming message also is there any alternative of this? however we want to go through queue for every type of messages.