It's not a secret anymore!
The moose likes OO, Patterns, UML and Refactoring and the fly likes Desicion pattern or smt ... 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 "Desicion pattern or smt ..." Watch "Desicion pattern or smt ..." New topic

Desicion pattern or smt ...

Juhan Voolaid
Ranch Hand

Joined: Nov 18, 2003
Posts: 179

I am quite new to OO patterns, but I need this to be done and I don't know if there already is a design pattern for that problem.

So let me describe my problem. I have a JMS listener bean, lets call it JMSListener:

And there is a business object, that it must use:

Based on the content of the message, the JMSListener executes the methods in the BusinessService class. And the logic of what methods to execute, based on every case is stored in a datasource. For example like so:

case1 | x |
case2 | | x
case3 | |
case4 | x | x

So that is the problem and I want to do it intelligently
So if there is any neat design pattern for that case, please let me know.

[ January 31, 2007: Message edited by: Juhan Voolaid ]
Juhan Voolaid
Ranch Hand

Joined: Nov 18, 2003
Posts: 179
I believe it is the mediator pattern. that helps me. If anyone have any suggestions, he is welcome to do so.
I agree. Here's the link:
subject: Desicion pattern or smt ...
jQuery in Action, 3rd edition