File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes Use the delegate pattern? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Use the delegate pattern?" Watch "Use the delegate pattern?" New topic
Author

Use the delegate pattern?

Bhavee Abhilash
Greenhorn

Joined: Jan 20, 2009
Posts: 3
I have got 2 major entities which undertakes multiple functions.

Class X - calls Class X1 --> X2 --> X3--> X4

Class Y - Calls Class Y1, --> Y2 -->Y3 --->Y4

(Where 1 is posting to Queues and 2,3,4 are separate classes representing some major functions)

Am using Spring - where all these are inter-twined using IOC principles. So when X is invoked, it completes all tasks till X4 and then moves to task Y.

However my requirement says - once X1 is called, Y to be invoked immediately . X2,X3,X4 may happen parallel while B is in operation.

Since there is no "easy" options (within my limited experience) in Spring to invoke parallel invocation of X and Y beans, I was wondering to have some sort of pattern like Delegate can help me to resolve this.

For eg : So X pushes to message to MQ.. While MQ-listener (X2) takes over the rest of the job, Y is invoked immediately.

What would be the best solution I can apply? Any suggestions / Feedback - would be highly appreciated.

Thanks

Abhilash
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Use the delegate pattern?
 
Similar Threads
calling the overridden method in the overridding method
Shared resource synchronization
"new Integer("5")" creates a fresh object & not utilizing the pool- like strings pool
Doubt in garbage Collection Pls clarify
Problem with java layout and panels and containers