Chain of Responsibility using EJBs

  1 post   Feedicon  
Replies: 0 - Last Post: February 21, 2010 13:42
by: jmribeiro
showing 1 - 1 of 1
 
Posted: February 21, 2010 13:42 by jmribeiro
Hi everyone,
I would like to get your input on the following. We have few frameworks making use of the Chain of Responsibility pattern. The concept is quite simple- there is a list of classes (rules) which implement the same interface and that are loaded dynamically (for example from a database where we have a set of pairs (class name, order sequence)). Lets now assume that the rules are EJBs (EJB 3.x). It becomes much harder to implement a CoR when the rules are EJBs. We cannot instantiate them directly so there must be another EJB which knows all rules and injects them, and this breaks the flexibility of adding/removing new rules without changing the code.
How would you approach a CoR where the rules are EJBs and where the rules (and respective sequence order in the chain) should be loaded dynamically?

Thanks!
Jorge
Replies: 0 - Last Post: February 21, 2010 13:42
by: jmribeiro
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close