TWiki
>
WebXEO Web
>
XeoPrimer
>
XeoPrimerThreadsSchedules
(revision 2) (raw view)
Edit
Attach
Tags:
tag this topic
create new tag
,
view all tags
-- Main.PedroRio - 22 Feb 2011 ---+ XEO Threads and Schedules XEO Provides mechanisms to perform background work, such as batch jobs, maintenance, cleanup, etc. Those mechanisms are provided in the form of Threads and Schedules. Threads are usually used for XEO Core operations, while Schedules are usually application specific. In the following section ---+++ Ebo_Schedule Schedules are instances of the Ebo_Schedule Object Model and allow you to execute custom code in a backround operation at specific times. You can implement your custom code, and schedule it to run when you want. Any given code you want to execute through a schedule must be created in a class that implements the _netgest.bo.runtime.robot.boSchedule_ interface, which has a very simple declaration: <verbatim>//Set a parameter for the public void setParameter(String parameter ); //Your custom code, you receive a context and the Ebo_Schedule instance corresponding public boolean doWork(EboContext ctx, boObject objectSchedule ) throws boRuntimeException ;</verbatim> When declaring an Ebo_Schedule you can declare the responsible user for the schedule execution (it it's not filled, the default user is SYSTEM). A schedules will be executed if, and only if, the following conditions are met: * The Schedule is active * The current time/date of the * ---++++++ Good Practice (Logging) It's a good practice to create a dedicated log for each schedule you create so that it's easier to debug when something goes wrong (having it mixed with the main log of the application could become a real mess) ---+++ Configuring aa In boConfig <verbatim><thread name="boSchedule Agent" ejb-name="ejb/boScheduleAgent" interval="10000"/></verbatim> a
Edit
|
Attach
|
P
rint version
|
H
istory
:
r6
|
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r2 - 2011-02-23
-
PedroRio
WebXEO
XEO Primer
-
Instalation
-
Introduction
-
Concepts
-
Architecture
-
XEO Library
-
Deploy to EAR
-
PreferenceStore
XEO - Core
-
XEO Model Reference
-
Security
-
Java API
-
BOL
-
XEOQL (BOQL)
-
Administrating
-
Background Tasks
-
boConfig.xml
-
Web.xml
-
Known Issues
-
XEO Flags
XEO - XWC
- Web Components
- Java Samples
- Custom Components
- Component Plugins
- Internationalization
- Viewer Events
- Value Change Listeners
- XUIServlet
- XeoLocalization
- XvwTemplates
Create New Topic
WebXEO Web
No permission to view
TWiki.WebTopBar
No permission to view
TWiki.WebBottomBar