This content has been marked as final. Show 2 replies
It depends on exactly what you want to do. It seems to me that this would best work with the Quartz schedule. Run a daily cron job that loads this data.
There are good examples on the Seam website for Quartz Cron jobs:
That shows you how to use Quartz with Seam. When the component is started, you could create the cron job. You will need to make that bean dependent on quartzDispatcher in order for it to work then:
`@Startup(depends = "quartzDispatcher")
loadData(null, "* * * * *", null);// read what expression runs daily, you can configure the time of day and whatnot too
public QuartzTriggerHandle loadData(@Expiration Date when,
@IntervalCron String cronl,
@FinalExpiration Date endDate)
return(null);// Seam intercepts this method call and returns a QuartzTriggerHandle ...