JSR-299 does not provide a rule engine on its own, what is can do on the other hand is to allow hooks for rules (think Adempiere model validator but can be applied anywhere... not just to models). Azrul
On Sun, Dec 13, 2009 at 2:29 PM, red1 <[email protected]> wrote: > would this be useful in Business Rules, or its all already there with > stuff like JRules? > > Azrul Hasni MADISA wrote: > > Dependency injection is more useful for framework developers then > > application developers I guess. In oneof my example, I created a > > framework to undo changes made on an object. > > > > Now, imagine you have a class Document > > > > public class Document{ > > private String text; > > //setters and getters > > } > > > > How would you tell the system to track changes to this class and > > enable undo? Well, with CDI, all you have to do is "mark" the class as: > > > > @Undoable > > public class Document{ > > private String text; > > //setters and getters > > } > > > > All changes will automatically be tracked. When you need to undo it, > > just call > > > > UndoUtility.undo(document) > > > > Simple > > > -- > Join Open Source Developers Club Malaysia http://www.osdc.my/ > > Facebook Fan page > > http://www.facebook.com/group.php?gid=98685301577 > > http://www.facebook.com/OSDC.my > > You received this message because you are subscribed to the Google > > Groups "OSDC.my Mailing List" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<osdcmy-list%[email protected]> > For more options, visit this group at > http://groups.google.com/group/osdcmy-list?hl=en > -- Join Open Source Developers Club Malaysia http://www.osdc.my/ Facebook Fan page http://www.facebook.com/group.php?gid=98685301577 http://www.facebook.com/OSDC.my You received this message because you are subscribed to the Google Groups "OSDC.my Mailing List" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/osdcmy-list?hl=en

