You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2014/11/19 10:39:08 UTC

svn commit: r1640512 - in /isis/site/trunk/content: components/objectstores/jdo/services/ intro/tutorials/ reference/services/

Author: danhaywood
Date: Wed Nov 19 09:39:08 2014
New Revision: 1640512

URL: http://svn.apache.org/r1640512
Log:
ututorial

Modified:
    isis/site/trunk/content/components/objectstores/jdo/services/auditing-service-jdo.md
    isis/site/trunk/content/components/objectstores/jdo/services/background-command-service-jdo.md
    isis/site/trunk/content/components/objectstores/jdo/services/command-service-jdo.md
    isis/site/trunk/content/components/objectstores/jdo/services/publishing-service-jdo.md
    isis/site/trunk/content/intro/tutorials/apacheconeu-2014.md
    isis/site/trunk/content/reference/services/ClockService.md
    isis/site/trunk/content/reference/services/auditing-service.md
    isis/site/trunk/content/reference/services/bulk-interaction.md
    isis/site/trunk/content/reference/services/event-bus-service.md
    isis/site/trunk/content/reference/services/query-results-cache.md
    isis/site/trunk/content/reference/services/scratchpad.md

Modified: isis/site/trunk/content/components/objectstores/jdo/services/auditing-service-jdo.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/components/objectstores/jdo/services/auditing-service-jdo.md?rev=1640512&r1=1640511&r2=1640512&view=diff
==============================================================================
--- isis/site/trunk/content/components/objectstores/jdo/services/auditing-service-jdo.md (original)
+++ isis/site/trunk/content/components/objectstores/jdo/services/auditing-service-jdo.md Wed Nov 19 09:39:08 2014
@@ -1,19 +1,3 @@
 Title: Auditing Service using JDO
 
-{note
-In 1.6.0 this implementation was released as *org.apache.isis.core:isis-module-audit-jdo:1.6.0* and was also released as an [Isis addon](http://github.com/isisaddons/isis-module-audit) module.  **In 1.7.0+ only the [Isis addon](http://github.com/isisaddons/isis-module-audit) implementation is released.**
-}
-
-The JDO objectstore provides a simple implementation of the applib [AuditingService](../../../../reference/services/auditing-service.html) that simply persists the event data into a `AuditEntryJdo` entity.  This is mapped to an `IsisAuditEntry` table.
-
-> Rather than using an `AuditingService`, you may prefer to use the [Publishing Service](../../../../reference/services/publishing-service.html), since it is considerably more flexible.  A JDO [implementation](./publishing-service-jdo.html) is available.
-
-### Register the Service
-
-Register like any other service in `isis.properties`:
-
-    isis.services=...,\
-                  org.apache.isis.objectstore.jdo.applib.service.audit.AuditingServiceJdo,\
-                  ...
-
-Assuming that you've also configured Isis to use the JDO objectstore, you should be good to go...
+For 1.7.0+, see the [Isis addon](http://github.com/isisaddons/isis-module-audit) module.

Modified: isis/site/trunk/content/components/objectstores/jdo/services/background-command-service-jdo.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/components/objectstores/jdo/services/background-command-service-jdo.md?rev=1640512&r1=1640511&r2=1640512&view=diff
==============================================================================
--- isis/site/trunk/content/components/objectstores/jdo/services/background-command-service-jdo.md (original)
+++ isis/site/trunk/content/components/objectstores/jdo/services/background-command-service-jdo.md Wed Nov 19 09:39:08 2014
@@ -1,38 +1,4 @@
 Title: BackgroundCommandServiceJdo
 
-{note
-In 1.6.0 this implementation was released as part of *org.apache.isis.core:isis-module-command-jdo:1.6.0* and was also released as an [Isis addon](http://github.com/isisaddons/isis-module-command) module.  **In 1.7.0+ only the [Isis addon](http://github.com/isisaddons/isis-module-command) implementation is released.**
-}
+For 1.7.0+, please see the [Isis addon](http://github.com/isisaddons/isis-module-command) module.
 
-The JDO objectstore provides an implementation of the applib [BackgroundCommandService](../../../../reference/services/background-service.html) that persists the command data into a `CommandJdo` entity.  This is mapped to an `IsisCommand` table.
-
-There are two further services that can be used:
-
-* the `BackgroundCommandServiceJdoRepository` service provides a set of finders to query `Command`s.  
-* the `BackgroundCommandServiceJdoContributions` service defines a number of contributed collections into the user interface for any persisted `Command`s.  These have the effect of showing the child background `Command`s for a parent `Command` (usually foreground).
-
-### Executing the `Command`s
-
-The `BackgroundCommandServiceJdo` only persists the `Command`s to a database table, it doesn't actually execute those commands.  For this, you can use  [BackgroundCommandExecutionFromBackgroundCommandServiceJdo](../non-ui/background-command-execution-jdo.html) class, a subclass implementation of [BackgroundCommandExecution](../../../../reference/non-ui/background-command-execution.html).  The intention is that this class is instantiated regularly (eg every 10 seconds) by a scheduler such as [Quartz](http://quartz.org)) to poll for `Command`s to be executed, and then execute them.  As you might imagine, to find new `Ccommand`s it uses the `BackgroundCommandServiceJdoRepository`. 
-
-An example of how to configure the Quartz scheduler can be found on the page that describes the applib [BackgroundService](../../../../reference/services/background-service.html).
-
-### Related services
-
-This service is intended to be deployed in conjunction with the [JDO implementation](./command-service-jdo.html) of the applib [CommandService](../../../../reference/services/command-context.html), which provides the ability to persist "foreground" `Command`s also as `CommandJdo`s (and to the same `IsisCommand` table.
-
-*Note* the `BackgroundCommandServiceJdoRepository` queries for any `Command`s that needs to be executed (has not yet started).  Typically these will be those created explicitly through the `BackgroundService` API.  However, `Command`s 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 `CommandService` and `BackgroundCommandService` together.
-
-### Register the Service(s)
-
-Register like any other service in `isis.properties`:
-
-    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,\
-                  ...
-
-                    
\ No newline at end of file

Modified: isis/site/trunk/content/components/objectstores/jdo/services/command-service-jdo.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/components/objectstores/jdo/services/command-service-jdo.md?rev=1640512&r1=1640511&r2=1640512&view=diff
==============================================================================
--- isis/site/trunk/content/components/objectstores/jdo/services/command-service-jdo.md (original)
+++ isis/site/trunk/content/components/objectstores/jdo/services/command-service-jdo.md Wed Nov 19 09:39:08 2014
@@ -1,40 +1,4 @@
 Title: CommandServiceJdo
 
-{note
-In 1.6.0 this implementation was released as *org.apache.isis.core:isis-module-command-jdo:1.6.0* and was also released as an [Isis addon](http://github.com/isisaddons/isis-module-command) module.  **In 1.7.0+ only the [Isis addon](http://github.com/isisaddons/isis-module-command) implementation is released.**
-}
+For 1.7.0+, please see the [Isis addon](http://github.com/isisaddons/isis-module-command) module.
 
-The JDO objectstore provides an implementation of the applib [CommandService](../../../../reference/services/command-context.html) that persists the command data into a `CommandJdo` entity.  This is mapped to an `IsisCommand` table.
-
-This supports a number of use cases:
-
-* by making action interactions persistent as `Command`s, it enables profiling of actions (eg identify slow actions, or simply to identify the most commonly used transactions)
-* it allows foreground `Command`s to be associated with any background child `Command`s created through the applib [BackgroundService](../../../../reference/services/background-service.html).
-- if [auditing](../../../../reference/services/auditing-service.html) is configured (for example, the [JDO implementation](./auditing-service-jdo.html)), they provide better audit information as the `Command` (the 'cause' of an action) can be correlated to the audit records (the "effect" of the action) through the unique `transactionId` GUID
-- if [publishing](../../../../reference/services/publishing-service.html) is configured (for example the [JDO implementation](./publishing-service-jdo.html)), they provide better traceability as the `Command` is also correlated with any published events, again through the unique `transactionId` GUID
-
-
-There are a further repository that can also be used:
-
-* the `CommandServiceJdoRepository` service provides a set of finders to query `Command`s.  
-
-Note that this service does *not* provide any infrastructure for executing background `Command`s (actions annotated with `@Command(executeIn=BACKGROUND)`).  To execute these, configure the [JDO implementation](./background-command-service-jdo.html) of the applib [BackgroundCommandService](../../../../reference/services/background-service.html).
-
-
-### Related services
-
-This service is intended to be deployed in conjunction with the [JDO implementation](./background-command-service-jdo.html) of the applib [BackgroundCommandService](../../../../reference/services/background-service.html), which provides the ability to persist "foreground" `Command`s also as `CommandJdo`s (and to the same `IsisCommand` table.
-
-### Register the Service(s)
-
-Register like any other service in `isis.properties`:
-
-    isis.services=...,\
-                  org.apache.isis.objectstore.jdo.applib.service.command.CommandServiceJdo,\
-                  org.apache.isis.objectstore.jdo.applib.service.command.CommandServiceJdoRepository,\
-                  ...
-
-Assuming that you've also configured Isis to use the JDO objectstore, you should be good to go...
-
-                    
-                    
\ No newline at end of file

Modified: isis/site/trunk/content/components/objectstores/jdo/services/publishing-service-jdo.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/components/objectstores/jdo/services/publishing-service-jdo.md?rev=1640512&r1=1640511&r2=1640512&view=diff
==============================================================================
--- isis/site/trunk/content/components/objectstores/jdo/services/publishing-service-jdo.md (original)
+++ isis/site/trunk/content/components/objectstores/jdo/services/publishing-service-jdo.md Wed Nov 19 09:39:08 2014
@@ -1,37 +1,3 @@
 Title: Publishing Service using JDO
 
-{note
-In 1.6.0 this implementation was released as part of *org.apache.isis.core:isis-module-publishing-jdo:1.6.0* and was also released as an [Isis addon](http://github.com/isisaddons/isis-module-publishing) module.  **In 1.7.0+ only the [Isis addon](http://github.com/isisaddons/isis-module-publishing) implementation is released.**
-}
-
-The JDO objectstore provides a simple implementation of the applib [PublishingService](../../../../reference/services/publishing-service.html) that simply persists the event data into a `PublishedEvent` entity.
-
-Along with the event data, the `PublishedEvent` also includes a status property with two values: `QUEUED` and `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](http://servicemix.apache.org)) 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.
-
-## Configuration (v1.5.0 onwards)
-
-The `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 `persistor_datanucleus.properties`, but `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 the Service
-
-Register like any other service in `isis.properties`:
-
-    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...
-
-
-## Related projects
-
-Dan Haywood's [camel-isis-pubsubjdo](https://github.com/danhaywood/camel-isis-pubsubjdo) project up on github shows how to poll and process the persisted `PublishedEvent` table using [Apache Camel](http://camel.apache.org).
+For 1.7.0+, please see the [Isis addon](http://github.com/isisaddons/isis-module-command) module.

Modified: isis/site/trunk/content/intro/tutorials/apacheconeu-2014.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/intro/tutorials/apacheconeu-2014.md?rev=1640512&r1=1640511&r2=1640512&view=diff
==============================================================================
--- isis/site/trunk/content/intro/tutorials/apacheconeu-2014.md (original)
+++ isis/site/trunk/content/intro/tutorials/apacheconeu-2014.md Wed Nov 19 09:39:08 2014
@@ -465,19 +465,21 @@ Under the covers Isis uses the [Guava ev
 
 By default the events generated are `ActionInteractionEvent.Default` (for actions) and `PropertyInteractionEvent.Default` (for properties).  Subclasses of these can be specified using the [@ActionInteraction](http://isis.apache.org/reference/recognized-annotations/ActionInteraction.html) or [@PropertyInteraction](http://isis.apache.org/reference/recognized-annotations/PropertyInteraction.html).
 
+Using the guidance in [these docs](http://isis.apache.org/reference/services/event-bus-service.html): 
 
-Using the guidance in [these docs](): 
+* write a domain service subscriber to subscribe to events
+* use the domain service to perform log events
+* use the domain service to veto actions (hide/disable or validate)
 
-* write a domain service subscriber to 
 
 
-TODO
+* Bulk actions
 
+Bulk actions are actions that can be invoked on a collection of actions, that is on collections returned by invoking an action.  Actions are specified as being bulk actions using the [@Bulk](http://isis.apache.org/reference/recognized-annotations/Bulk.html) annotation.  Note that currently (1.8.0-SNAPSHOT) only no-arg actions can be specified as bulk actions.
 
+* Write a no-arg action for your domain entity 
+* Inject the [Bulk.InteractionContext](http://isis.apache.org/reference/services/bulk-interaction.html) service and use this to 
 
-* Bulk actions
-
-TODO
 
 
 ## Performance tuning
@@ -552,6 +554,11 @@ TODO
 TODO
 
 
+
+## Exception Recognizers
+
+
+
 ## Configuring to use an external database
 
 TODO

Modified: isis/site/trunk/content/reference/services/ClockService.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/services/ClockService.md?rev=1640512&r1=1640511&r2=1640512&view=diff
==============================================================================
--- isis/site/trunk/content/reference/services/ClockService.md (original)
+++ isis/site/trunk/content/reference/services/ClockService.md Wed Nov 19 09:39:08 2014
@@ -27,11 +27,7 @@ The time provided by this default implem
 
 ## Registering the Service
 
-Register like any other service in `isis.properties`:
-
-    isis.services=...,\
-                  org.apache.isis.applib.services.clock.ClockService,\
-                  ...
+The `ClockService` class is automatically registered (it is annotated with `@DomainService`) so no further configuration is required.
 
 ## Alternative Implementations
 
@@ -52,5 +48,11 @@ Setting up a different implementation th
         }
     }
             
-You can then register this service - instead of the default `ClockService` - in the usual way within `isis.properties`
+You can then register this service in the usual way within `isis.properties`:
+
+    isis.services=...,\
+                  com.mycompany.myapp.NntpClockService,\
+                  ...
 
+Because this is a subclass of `ClockService` it will be used instead of the default implementation.
+                  
\ No newline at end of file

Modified: isis/site/trunk/content/reference/services/auditing-service.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/services/auditing-service.md?rev=1640512&r1=1640511&r2=1640512&view=diff
==============================================================================
--- isis/site/trunk/content/reference/services/auditing-service.md (original)
+++ isis/site/trunk/content/reference/services/auditing-service.md Wed Nov 19 09:39:08 2014
@@ -36,11 +36,10 @@ The API for the service is:
 
 ## Implementations
 
-A simple implementation of the service that writes to stderr, is available, useful for debugging:
+For 1.7.0+, please see the [Isis addon audit](http://github.com/isisaddons/isis-module-audit) module.
 
-* `org.apache.isis.applib.services.audit.AuditingService3$Stderr`
+If you just want to debug (writing to stderr), you can instead configure `org.apache.isis.applib.services.audit.AuditingService3$Stderr`
 
-An alternative implementation, that persists audit records to a database, is the [JDO Publishing Service](../../components/objectstores/jdo/services/publishing-service-jdo.html).   This implementation is only supported when the the [JDO objectstore](../../components/objectstores/jdo/about.html) is configured.
 
 ## Usage
 
@@ -73,11 +72,7 @@ If the key is not present in `isis.prope
 
 ## Register the Service
 
-Register like any other service in `isis.properties`.  For example, if using the [JDO auditing implementation](../../components/objectstores/jdo/services/auditing-service-jdo.html) then it would be:
-
-    isis.services=...,\
-                  org.apache.isis.objectstore.jdo.applib.service.audit.AuditingServiceJdo,\
-                  ...
+See the [Isis addon audit](http://github.com/isisaddons/isis-module-audit) module for details.
 
 
 ### Related Services

Modified: isis/site/trunk/content/reference/services/bulk-interaction.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/services/bulk-interaction.md?rev=1640512&r1=1640511&r2=1640512&view=diff
==============================================================================
--- isis/site/trunk/content/reference/services/bulk-interaction.md (original)
+++ isis/site/trunk/content/reference/services/bulk-interaction.md Wed Nov 19 09:39:08 2014
@@ -56,12 +56,7 @@ the [quickstart app](../../intro/getting
 
 ### Registering the Service
 
-The `Bulk.InteractionContext` is a concrete class, so can be registered directly
-as a service in `isis.properties`:
-
-    isis.services=...,\
-                  org.apache.isis.applib.annotation.Bulk.InteractionContext,\
-                  ...
+The `Bulk.InteractionContext` class is automatically registered (it is annotated with `@DomainService`) so no further configuration is required.
 
 
 ### Unit testing support

Modified: isis/site/trunk/content/reference/services/event-bus-service.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/services/event-bus-service.md?rev=1640512&r1=1640511&r2=1640512&view=diff
==============================================================================
--- isis/site/trunk/content/reference/services/event-bus-service.md (original)
+++ isis/site/trunk/content/reference/services/event-bus-service.md Wed Nov 19 09:39:08 2014
@@ -104,7 +104,7 @@ Register for events when the `EventBusSe
 
 
     
-### `@PostsPropertyChangedEvent`
+### `@PostsPropertyChangedEvent` (deprecated)
 
 Isis will also automatically publish (post) an `org.apache.isis.applib.services.eventbus.PropertyChangedEvent` event object on any property that is annotated with [`@PostsPropertyChangedEvent](../recognized-annotations/PostsPropertyChangedEvent.html).  This can remove some boilerplate.
 
@@ -115,32 +115,17 @@ Isis will also automatically publish (po
 <li>This is work-in-progress.  In the future other interactions (such as action invocations, or collection add to/remove) may also be raised automatically.</li>
 </ul>
 </blockquote>
+
     
 ## Implementation
 
-Isis provides two implementations.  The default implementation (provided by core runtime) is:
-
-    org.apache.isis.core.runtime.services.eventbus.EventBusServiceDefault
-
-However, if the JDO objectstore is in use, then its implementation *must* be used instead:
+Isis provides the `org.apache.isis.objectstore.jdo.datanucleus.service.eventbus.EventBusServiceJdo` as a default implementation of the `EventBusService` API.
 
-    org.apache.isis.objectstore.jdo.datanucleus.service.eventbus.EventBusServiceJdo
 
 ## Register the Service
 
-Register this service like any other service, in `isis.properties`
-
-If the JDO Objectstore is *not* in use, use:
-
-    isis.services=...,\
-                  org.apache.isis.core.runtime.services.eventbus.EventBusServiceDefault,\
-                  ...
-
-If the JDO ObjectStore *is* in use, use:
+The `EventBusServiceJdo` class is automatically registered (it is annotated with `@DomainService`) so no further configuration is required.
 
-    isis.services=...,\
-                  org.apache.isis.objectstore.jdo.datanucleus.service.eventbus.EventBusServiceJdo,\
-                  ...
 
 ## Related Services
 

Modified: isis/site/trunk/content/reference/services/query-results-cache.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/services/query-results-cache.md?rev=1640512&r1=1640511&r2=1640512&view=diff
==============================================================================
--- isis/site/trunk/content/reference/services/query-results-cache.md (original)
+++ isis/site/trunk/content/reference/services/query-results-cache.md Wed Nov 19 09:39:08 2014
@@ -93,11 +93,8 @@ This refactoring will be worthwhile prov
 
 ### Register the Service
 
-Register this service like any other service, in `isis.properties`, eg:
+The `QueryResultsCache` class is automatically registered (it is annotated with `@DomainService`) so no further configuration is required.
 
-    isis.services=...,\
-                  org.apache.isis.applib.services.queryresultscache.QueryResultsCache,\
-                  ...
 
 
 ### Related Services

Modified: isis/site/trunk/content/reference/services/scratchpad.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/reference/services/scratchpad.md?rev=1640512&r1=1640511&r2=1640512&view=diff
==============================================================================
--- isis/site/trunk/content/reference/services/scratchpad.md (original)
+++ isis/site/trunk/content/reference/services/scratchpad.md Wed Nov 19 09:39:08 2014
@@ -80,11 +80,8 @@ If using the Wicket viewer, the `ToDoIte
 
 ### Registering the Service
 
-Register the concrete implementation (from isis-core) in `isis.properties`:
+The `Scratchpad` class is automatically registered (it is annotated with `@DomainService`) so no further configuration is required.
 
-    isis.services=...,\
-                  org.apache.isis.applib.services.scratchpad.Scratchpad,\
-                  ...
 
 ### Related Services