The JDO objectstore provides a simple implementation of the applib PublishingService that simply persists the event data into a
Along with the event data, the
PublishedEvent also includes a status property with two values:
PROCESSED. The service also acts as a repository to search for all unprocessed events.
The intention is for an event service bus (eg Apache ServiceMix) to poll for unprocessed events, either directly to the database, or using the Restful Objects API. Once processed, then the status can be updated.
Although a polling architecture introduces some overhead, it avoids the complexity of XA/JTA transactions which would otherwise be needed to ensure that events are only published atomically with committed changes to the database.
PublishedEvent entity can either persist the serialized form of the event as a zipped byte array or as a CLOB. Which is used is determined by a configuration setting (typically stored in
isis.properties can also be used):
# whether to persist the event data as a "clob" or as a "zipped" byte isis.persistor.datanucleus.PublishingService.serializedForm=clob
If not specified, then "zipped" is the default.
Register like any other service in
isis.services=...,\ org.apache.isis.objectstore.jdo.applib.service.publish.PublishingServiceJdo,\ ...
Assuming that you've also configured Isis to use the JDO objectstore, you should be good to go...
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.