Le vendredi 04 f�vrier 2005 � 15:39 +0100, Erik Bruchez a �crit :
> Eric van der Vlist wrote:
> > Is there a way to automatically start a task when the server starts
> > (other than sleeping for a while and sending a HTTP request through
> > wget or lynx)?
>
> Absolutely, you can put in place context listeners and configure them
> in your web.xml:
>
> <context-param>
> <param-name>oxf.context-initialized-processor.name</param-name>
>
> <param-value>{http://www.orbeon.com/oxf/processors}pipeline</param-value>
> </context-param>
> <context-param>
> <param-name>oxf.context-initialized-processor.input.config</param-name>
> <param-value>oxf:/context/context-initialized.xpl</param-value>
> </context-param>
> <context-param>
> <param-name>oxf.context-destroyed-processor.name</param-name>
>
> <param-value>{http://www.orbeon.com/oxf/processors}pipeline</param-value>
> </context-param>
> <context-param>
> <param-name>oxf.context-destroyed-processor.input.config</param-name>
> <param-value>oxf:/context/context-destroyed.xpl</param-value>
> </context-param
>
> <listener>
>
> <listener-class>org.orbeon.oxf.webapp.OXFServletContextListener</listener-class>
> </listener>
I am going to try that, thanks!
> You can also BTW put in place session listeners.
>
> See web.xml and the "context" directory (at the same level as the
> "config" directory in the resources) for all the code, which happens
> to do what you are trying to do: run a scheduler, which periodically
> runs a task which in this case just logs some messages.
>
> > Eric (wondering if he'd better use a cron and/or the scheduler to
> > periodically retrieve information from external sources such as
> > Wikipedia).
>
> The OPS scheduler should allow you to do this, except the exception
> handling part!
Yes, but that shouldn't be an issue. After this will have been debugged,
the main source of exception should be the fact that the resource isn't
available and then, aborting the current execution and retrying at the
next execution is probably what I would have done anyway...
Thanks for the detailed explanations!
Eric
--
If you have a XML document, you have its schema.
http://examplotron.org
------------------------------------------------------------------------
Eric van der Vlist http://xmlfr.org http://dyomedea.com
(ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
orbeon-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/orbeon-user