1. Application 1 makes web service call to application 2. This is a synchronous call so application 1 is waiting for the reply.
2. From application 2 we have to make a web service call to the application 3 to get the reply back. This is a asynchronous call as reply will come through JMS Q.
3. The application 3 does processing and reply back in JMS Q.
4. Application 2 consumes the response does processing and send response back to application 1. Now the synchronous call gets over.
Best solution is to create thread in application 2 and put it in the wait mode until application 3 replies. But our WAS 7 servers are in the cluster mode so we don't know which server will consume message from JMS Q.
Thanks for replying. The database option is always there but that is not we are looking at this time.
I do like to know more about the call back web service. If you can point me to location where I can explore further.
Also as an antoher thought I exploring option to use SFSB though not sure how efficient it is.
Joined: Feb 13, 2004
Here is what I was trying to suggest:
1. "Application 1 - Client Application" will make web service call to Application 2.
2. "Application 1 - Client Application" will host a web service which will be called by Application 2. All the response elements expected by Application 1 should be present in the inbound XML.
3. Application 2 listens to JMS queue and then it calls Application 1 web service.
4. Application 1 acts as a web service client while calling application 2.
5. Application 2 acts as a web service client while passing the JMS information back to application 1.
We have implemented this feature in one of our applications and it works fine. Think of it as application 1 exposing a web service that acts a call back handler.
Your suggestion really makes sense. Only problem we do have here, is the calling application(Application 1) can be more then one and in that case we have to deploy
callback service on all the client applications.
Joined: Feb 13, 2004
you are correct you will need some receiving web service for each of the client apps that are like application 1 level. But it saves you CPU cycles, threading and flexibility of having different implementations at each of the client level.
Sometimes I think that this is the price we pay by introducing distributed components, which are all intended to be on the same box (may be different processes). So much overhead code for handling simple inter process communication data exchange.
I am starting another thread to understand JMS Q in clustered environment.
But in the continuation of this question, Are you aware about spring has something called Synchronous JMS processing by overriding receive method.
That method will time out if message doesn't come back in specific time frame from the JMS Q. I can use that method for synchronous processing. But not sure how will it behave in the cluster aware environment.
Another question I have is there anything we can do for the managing the work flow through code using Spring 3(not through BPM engine)? As to complete one request I might need to call multiple web services and 1-2 of them reply through JMS Q.