Tom wrote:
the general idea is as follows:
the commands are the basic blocks.
the command executor is a generic session facade for executing commands with 1 method:
interface CommandExecutor {
Object execute(Command cmd);
}
then from that we could build specific facades like e.g.
interface WorkflowEngine {
ProcessInstance startNewProcessInstance(String processName);
Token signal(Token token);
...
}
the method implementations will just create the command and send it to a command
executor. those session facades could themselves expose the execute(command) method.
that could be a way to keep the session facade extensible.
once you get into these interfaces, things are hard to keep them uniform. the most
difficulty i have on this level is hibernate's lazy loading when returning objects.
hibernate works perfect. but what part of the object graph do we have to pre-load
when returning objects from our persistent domain model ?
when the execute(command) is exposed, extending commands with inheritence could also
be used to append this eager loading inside the transaction of the command.
similar problems and more will have to be resolved for web services. i don't think
that we should try to target the single generic web service that matches all these
use cases. we should try to search for a specific solution that is a good balance
between 1) ease of use 2) coverage of the use cases and 3) ease to implement
HTH to see the context of what we're looking for.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125010#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...