J2EE Architectural Design Solution Needed
Hi,
I am coming up with an issue in designing the application architecture. It would be great if some one suggest solution for the problem.
The basic flow of application:
1. Client initiates a transaction from a Portlet.
2. Portlet invokes business service component (Coarse grained Stateless Session Bean) by passing XML document.
3. Corse grained SLSB process the incoming XML and invoke local session beans by passing relevant Document objects built by using service API.
4. Based on Incoming Message, message splits and placed on multiple destinations (Linked by Message Queues) hosted on Enterprise Service Bus (ESB).
5. A Message driven bean listens to the incoming request at Queue and invokes external services/Web services
6. Response xml is built and placed Response Queue in ESB by invoking business service API.
6. A MDB listening to the Response Queue will process outgoing messages which needs to be routed to original request invoker.
The Messages are linked with correlation ID and request and response are tied by some rules and business logic.
The design problem I am facing now is, how do my client waits till response comes from response queue as application need to give response to the client in synchronous manner.
The other issue is some of the incoming requests need to be executed (placing in queue) in orderly fashion and run in a transaction. (Which I am trying to process them as command Lists in prototype using Message sets and flows in MQ, but is there any implications if try to push this logic to J2EE container)
Thanks,
Madhu Palutla

