Look at the booking app for an example of what a component driven event looks like. Components can raise events when you want to completely uncouple the interaction between components. Obviously any component can inject another component and call a method on it, but that action of calling the other component might not really be core to function of that component.
In the booking app, a bookingConfirmed event is raised. The bookingListAction listens for this event and acts on it by refreshing its data. Why should the actually booking code have the code to call out and tell the other components what to do? That's a mix of concerns. If you want to make your components as pure as possible, you can model this type of interaction with events. Any component that might need to change its state can listen to the event. (maybe even none) It's a very flexible way to go about doing things. Hope that gives you some ideas... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3955049#3955049 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3955049 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user