The JDO objectstore provides an implementation of the applib BackgroundCommandService that persists the command data into a
CommandJdo entity. This is mapped to an
There are two further services that can be used:
BackgroundCommandServiceJdoRepositoryservice provides a set of finders to query
BackgroundCommandServiceJdoContributionsservice defines a number of contributed collections into the user interface for any persisted
Commands. These have the effect of showing the child background
Commands for a parent
BackgroundCommandServiceJdo only persists the
Commands to a database table, it doesn't actually execute those commands. For this, you can use BackgroundCommandExecutionFromBackgroundCommandServiceJdo class, a subclass implementation of BackgroundCommandExecution. The intention is that this class is instantiated regularly (eg every 10 seconds) by a scheduler such as Quartz) to poll for
Commands to be executed, and then execute them. As you might imagine, to find new
Ccommands it uses the
An example of how to configure the Quartz scheduler can be found on the page that describes the applib BackgroundService.
This service is intended to be deployed in conjunction with the JDO implementation of the applib CommandService, which provides the ability to persist "foreground"
Commands also as
CommandJdos (and to the same
BackgroundCommandServiceJdoRepository queries for any
Commands that needs to be executed (has not yet started). Typically these will be those created explicitly through the
BackgroundService API. However,
Commands to be executed in the background can also be created implicitly through the
@Command(executeIn=BACKGROUND) annotation, whereby the
CommandContext service delegates to the configured
CommandService to persist the
Command. For these to be picked up, the
CommandService in use should be the JDO implementation.
Put another way: just make sure you use the JDO implementations of
Register like any other service in
isis.services=...,\ org.apache.isis.objectstore.jdo.applib.service.background.BackgroundCommandServiceJdo,\ org.apache.isis.objectstore.jdo.applib.service.background.BackgroundCommandServiceJdoRepository,\ org.apache.isis.objectstore.jdo.applib.service.background.BackgroundCommandServiceJdoContributions,\ ...
All edits are reviewed before going live, so feel free to do much more than fix typos or links. If you see a page that could benefit from an entire rewrite, we'd be thrilled to review it. Don't be surprised if we like it so much we ask you for help with other pages :)NOTICE: unless indicated otherwise on the pages in question, all editable content available from apache.org is presumed to be licensed under the Apache License (AL) version 2.0 and hence all submissions to apache.org treated as formal Contributions under the license terms.