From: <jbo...@li...> - 2006-05-08 14:37:37
|
Author: aron.gombas Date: 2006-05-08 10:37:26 -0400 (Mon, 08 May 2006) New Revision: 4134 Modified: labs/kosmos/trunk/xdocs/reference/reference-manual.xml Log: Doc about the scheduler added Modified: labs/kosmos/trunk/xdocs/reference/reference-manual.xml =================================================================== --- labs/kosmos/trunk/xdocs/reference/reference-manual.xml 2006-05-08 12:42:52 UTC (rev 4133) +++ labs/kosmos/trunk/xdocs/reference/reference-manual.xml 2006-05-08 14:37:26 UTC (rev 4134) @@ -1391,8 +1391,39 @@ </listitem> <listitem> + <para> + The trigger for the update scheduler can be configured as a standard + Spring trigger bean, either a simple one or a cron-style one: +<programlisting> +<bean id="serviceResultUpdateTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean"> + <property name="jobDetail" ref="serviceResultUpdaterJob"/> + <property name="startDelay" value="7200000"/><!-- start and repeat in every 2 hours --> + <property name="repeatInterval" value="7200000"/> +</bean> +<!-- + Alternatively, a cron-style trigger can be used. + For this, remove the previous bean definition and use this one: + <bean id="serviceResultUpdateTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> + <property name="jobDetail" ref="serviceResultUpdaterJob"/> + <property name="cronExpression" value="0 0 6 * * ?"/> + </bean> +--> +</programlisting> + All the information delivered by the services will be automatically refreshed in the given time. + For example, you can schedule a very expensive Subversion repository traversal at 2 o'clock in the morning every day, so the portal will reflect up-to-date results by the time you get to your browser. + </para> <para> + See the + <ulink url="http://static.springframework.org/spring/docs/2.0.x/reference/scheduling.html#d0e19434">Spring Framework documentation: + Wiring up jobs using triggers and the SchedulerFactoryBean</ulink> + for more examples. + </para> + </listitem> + + <listitem> + + <para> It's possible (and relatively easy) to do more complicated changes (like using separate or even inhomogenous cache stores per service, using more than one instance of the @@ -1827,7 +1858,7 @@ <para>There is another useful, infrastructure layer mechanism to achieve performance improvement: scheduled updates. Configuring the update trigger - in the <literal>kosmos-services-servlet.xml</literal>, you can schedule + in <literal>kosmos-services-servlet.xml</literal>, you can schedule automatic service reloads at given periods or times. For example, you can schedule a very expensive Subversion repository traversal at 2 o'clock in the morning every day, so the portal will reflect |