<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I know you're all really busy right now with the spec updates, but I've got a new extension for possible inclusion into WebBeans, plus a new example app for SE which uses it.</div><div><br></div><div>== Quartz Extension ==</div><div><br></div><div><a href="http://screamingcoder.com/projects/plebeians/WebBeans-Quartz.zip">WebBeans-Quartz.zip</a></div><div><br></div><div>The extension is a Quartz extension. It basically fires events @Every Second, @Every Minute and @Every Hour, which can be observed like so:</div><div><br></div><div>public void updateSomething(@Observes @Every Hour hour) {&nbsp;// blah&nbsp;}</div><div><br></div><div>On startup the extension first checks for the presence of observers for each type of event and if there are no observers for a particular type of event, no events will be scheduled.</div><div><br></div><div>I intend to extend it by:</div><div>1) &nbsp;introducing a way to define arbitrary schedules (in annotations or in a properties file which is then referenced by name in an annotation - which can then be made typesafe by subclassing the annotation). Eg:</div><div><br></div><div>&nbsp;&nbsp; &nbsp;package&nbsp;org.jboss.webbeans.extension.scheduler;</div><div>&nbsp;&nbsp; &nbsp;public @interface Scheduled {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;String name();</div><div>&nbsp;&nbsp; &nbsp;}</div><div>-----------</div><div>&nbsp;&nbsp; &nbsp;public @interface AfterHours extends Scheduled{</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; String name() default "afterHours";</div><div>&nbsp;&nbsp; &nbsp;}</div><div>-----------</div><div>&nbsp;&nbsp; &nbsp;schedule.properties:</div><div>&nbsp;&nbsp; &nbsp;afterHours=0 1 * * * *</div><div>-----------</div><div>&nbsp;&nbsp; &nbsp;public void batchProcess(@Observes @AfterHours Schedule schedule) { ... }</div><div><br></div><div>2) Adding whatever is necessary to make this usable in EE environment. Any pointers?</div><div><br></div><div>3) Any other suggestions?</div><div><br></div><div>== Memory Graph Example ==</div><div><br></div><div><a href="http://screamingcoder.com/projects/plebeians/MemoryGrapher.zip">MemoryGrapher.zip</a></div><div><br></div><div>This is another Swing based example, which renders a graph of the VM's free memory, updating every second and calling garbage collection every minute using the above extension. It's a nice concise example of how to bootstrap and shutdown SE, how to observe events and how to use the injectable logger. Plus everyone loves a pretty graph!</div><div><br></div><div>I know there is some obvious clean up work required, and maybe removing the name Quartz (?) - which I'm happy to do prior to checking in.</div><div><br></div><div>What do you think?</div><div><br></div><div><br></div><div>Pete.</div><div><br></div><div><br></div><div><br></div><div>&nbsp;&nbsp; &nbsp;</div></body></html>