This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes JMS related architecture question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS related architecture question" Watch "JMS related architecture question" New topic
Author

JMS related architecture question

Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
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?

Thanks,
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
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
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
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?

Thanks
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
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.
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS related architecture question
 
Similar Threads
The Rookie Throws in the Towel (Kind of)
Data corruption in multi user web application
XA, JMS and a distributed database/CGI update
Caching implementation strategy
Query regarding Database commit and Queue Commit