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/08/13 00:24:10 UTC

[1/3] git commit: ISIS-568: moving up to JDK 1.7.

Repository: isis
Updated Branches:
  refs/heads/master 9e889abd8 -> 95b537b10


ISIS-568: moving up to JDK 1.7.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/e8e9ed1e
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/e8e9ed1e
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/e8e9ed1e

Branch: refs/heads/master
Commit: e8e9ed1e5d793289763dcd2243dbdc0c693acbdc
Parents: 9e889ab
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Jul 29 11:08:09 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Jul 29 11:08:09 2014 +0100

----------------------------------------------------------------------
 core/pom.xml                          | 4 ++--
 core/tck/pom.xml                      | 4 ++--
 example/application/simpleapp/pom.xml | 4 ++--
 example/application/todoapp/pom.xml   | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/e8e9ed1e/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index eb9f5c4..69bc07f 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -59,8 +59,8 @@
 
 
         <!-- remaining properties should not need to be overridden -->
-        <compileSource>1.6</compileSource>
-        <compileTarget>1.6</compileTarget>
+        <compileSource>1.7</compileSource>
+        <compileTarget>1.7</compileTarget>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
         <dependency.locations.enabled>false</dependency.locations.enabled>

http://git-wip-us.apache.org/repos/asf/isis/blob/e8e9ed1e/core/tck/pom.xml
----------------------------------------------------------------------
diff --git a/core/tck/pom.xml b/core/tck/pom.xml
index a0c97f1..6034143 100644
--- a/core/tck/pom.xml
+++ b/core/tck/pom.xml
@@ -60,8 +60,8 @@
                     <artifactId>maven-compiler-plugin</artifactId>
                     <version>3.1</version>
                     <configuration>
-                        <source>1.6</source>
-                        <target>1.6</target>
+                        <source>1.7</source>
+                        <target>1.7</target>
                     </configuration>
                     <executions>
                         <execution>

http://git-wip-us.apache.org/repos/asf/isis/blob/e8e9ed1e/example/application/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/pom.xml b/example/application/simpleapp/pom.xml
index 831b201..9caba18 100644
--- a/example/application/simpleapp/pom.xml
+++ b/example/application/simpleapp/pom.xml
@@ -67,8 +67,8 @@
                     <artifactId>maven-compiler-plugin</artifactId>
                     <version>3.1</version>
                     <configuration>
-                        <source>1.6</source>
-                        <target>1.6</target>
+                        <source>1.7</source>
+                        <target>1.7</target>
                     </configuration>
                     <executions>
                         <execution>

http://git-wip-us.apache.org/repos/asf/isis/blob/e8e9ed1e/example/application/todoapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/todoapp/pom.xml b/example/application/todoapp/pom.xml
index c45cbe2..33edccd 100644
--- a/example/application/todoapp/pom.xml
+++ b/example/application/todoapp/pom.xml
@@ -69,8 +69,8 @@
                     <artifactId>maven-compiler-plugin</artifactId>
                     <version>3.1</version>
                     <configuration>
-                        <source>1.6</source>
-                        <target>1.6</target>
+                        <source>1.7</source>
+                        <target>1.7</target>
                     </configuration>
                     <executions>
                         <execution>


[3/3] git commit: ISIS-851: removing isis-module-background (moved back to core-runtime), and updating simpleapp/todoapp to reference 1.6.0 modules directly.

Posted by da...@apache.org.
ISIS-851: removing isis-module-background (moved back to core-runtime), and updating simpleapp/todoapp to reference 1.6.0 modules directly.

Specifically:
- removed dependencyManagement declarations of the o.a.i.module:isis-module-* Maven modules in core's parent pom.xml, and as <module>s
- moved BackgroundCommandExceution out of isis-module-background and back into isis-core-runtime (so that all modules are optional)
- changed implementation of BackgroundServiceDefault so that no longer fails fast if its prereq dependencies not available (and instead fails only if used).  This means that can now be automatically made available (via @DomainService) with no configuration required.
- in simpleapp & todoapp's root pom.xml now reference isis 1.6.0 core's isis-module-* directly (and by individual version).
- in simpleapp & todoapp's webapp pom.xml, remove dependency on isis-module-background since (will) no longer exist.

In addition:
- in simpleapp, deleted ComponentFactoryRegistrarForSimpleApp, since is a no-op and just adds noise.
- in simpleapp & todoapp's persistor_datanucleus.properties, removed accidental duplication of a property.
- aligned IsisConfigurationForJdoIntegTests (programmatic setup of JDO config props) with that of persistor_datanucleus.properties (file-based setup)
- bumped pom-jdo-enhance-all to 1.7.0-SNAPSHOT
- also fixes to RO TCK (change to fixture data, a bit fragile :-( it would seem...)


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/95b537b1
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/95b537b1
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/95b537b1

Branch: refs/heads/master
Commit: 95b537b10fbd246141ea5b91f5a6cdd0db2b13ca
Parents: e8e9ed1
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Aug 12 22:38:38 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Aug 12 23:14:57 2014 +0100

----------------------------------------------------------------------
 core/module-background/.gitignore               |   1 -
 core/module-background/pom.xml                  |  63 ----
 .../background/BackgroundCommandExecution.java  | 171 -----------
 .../background/BackgroundServiceDefault.java    | 287 -------------------
 .../IsisConfigurationForJdoIntegTests.java      |  15 +-
 core/pom-jdo-enhance-all.xml                    |   2 +-
 core/pom.xml                                    | 146 ----------
 .../background/BackgroundCommandExecution.java  | 171 +++++++++++
 .../background/BackgroundServiceDefault.java    | 274 ++++++++++++++++++
 ...EntityWithActions_thenRepresentation_ok.java |   2 +-
 ...hCollections_thenRepresentation_ok_TODO.java |   2 +-
 ...henArgsValid_thenMultiplePropertyUpdate.java |   2 +-
 .../oid/property/Put_then_200_ok.java           |   2 +-
 ...rgValid_thenPrimitivePropertyUpdated_ok.java |  16 +-
 .../Get_whenList_thenRepresentation_ok.java     |   2 +-
 ...whenInvokeArgWithObjectReference_thenOK.java |   6 +-
 .../serviceId/Get_thenRepresentation_ok.java    |   2 +-
 example/application/simpleapp/pom.xml           |  60 ++++
 example/application/simpleapp/webapp/pom.xml    |  12 +-
 .../ComponentFactoryRegistrarForSimpleApp.java  |  33 ---
 .../src/main/java/webapp/SimpleApplication.java |   2 -
 .../src/main/webapp/WEB-INF/isis.properties     |   4 -
 .../WEB-INF/persistor_datanucleus.properties    |   9 +-
 example/application/todoapp/pom.xml             |  62 ++++
 example/application/todoapp/webapp/pom.xml      |   4 -
 .../src/main/webapp/WEB-INF/isis.properties     |   4 -
 .../WEB-INF/persistor_datanucleus.properties    |   9 +-
 27 files changed, 605 insertions(+), 758 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/module-background/.gitignore
----------------------------------------------------------------------
diff --git a/core/module-background/.gitignore b/core/module-background/.gitignore
deleted file mode 100644
index a48e45b..0000000
--- a/core/module-background/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/target-ide

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/module-background/pom.xml
----------------------------------------------------------------------
diff --git a/core/module-background/pom.xml b/core/module-background/pom.xml
deleted file mode 100644
index 33ab617..0000000
--- a/core/module-background/pom.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-         http://www.apache.org/licenses/LICENSE-2.0
-         
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-		<groupId>org.apache.isis.core</groupId>
-		<artifactId>isis</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
-	</parent>
-
-    <groupId>org.apache.isis.module</groupId>
-	<artifactId>isis-module-background</artifactId>
-
-	<name>Isis Module: Background</name>
-	<description>
-		BackgroundService implementation to enable apps to schedule actions
-        be run that run asynchronously (eg using a Quartz scheduler).
-	</description>
-
-	<properties>
-        <siteBaseDir>..</siteBaseDir>
-		<relativeUrl>module-background/</relativeUrl>
-	</properties>
-
-    <url>http://isis.apache.org/${relativeUrl}</url>
-
-	<dependencies>
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-applib</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-unittestsupport</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-runtime</artifactId>
-        </dependency>
-
-   </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/module-background/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
----------------------------------------------------------------------
diff --git a/core/module-background/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java b/core/module-background/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
deleted file mode 100644
index e2d30c8..0000000
--- a/core/module-background/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.isis.core.runtime.services.background;
-
-import java.util.List;
-import com.google.common.base.Throwables;
-import com.google.common.collect.Lists;
-import org.apache.isis.applib.clock.Clock;
-import org.apache.isis.applib.services.background.ActionInvocationMemento;
-import org.apache.isis.applib.services.bookmark.Bookmark;
-import org.apache.isis.applib.services.bookmark.BookmarkService;
-import org.apache.isis.applib.services.command.Command;
-import org.apache.isis.applib.services.command.Command.Executor;
-import org.apache.isis.applib.services.command.CommandContext;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.RootOid;
-import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.Contributed;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
-import org.apache.isis.core.metamodel.facets.actions.interaction.CommandUtil;
-import org.apache.isis.core.runtime.services.memento.MementoServiceDefault;
-import org.apache.isis.core.runtime.sessiontemplate.AbstractIsisSessionTemplate;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-import org.apache.isis.core.runtime.system.transaction.IsisTransactionManager;
-import org.apache.isis.core.runtime.system.transaction.TransactionalClosureAbstract;
-
-/**
- * Intended to be used as a base class for executing queued up {@link Command background action}s.
- * 
- * <p>
- * This implementation uses the {@link #findBackgroundCommandsToExecute() hook method} so that it is
- * independent of the location where the actions have actually been persisted to.
- */
-public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemplate {
-
-    private final MementoServiceDefault mementoService;
-
-    public BackgroundCommandExecution() {
-        // same as configured by BackgroundServiceDefault
-        mementoService = new MementoServiceDefault().withNoEncoding();
-    }
-    
-    // //////////////////////////////////////
-
-    
-    protected void doExecute(Object context) {
-
-        final PersistenceSession persistenceSession = getPersistenceSession();
-        final IsisTransactionManager transactionManager = getTransactionManager(persistenceSession);
-        final List<Command> commands = Lists.newArrayList();
-        transactionManager.executeWithinTransaction(new TransactionalClosureAbstract() {
-            @Override
-            public void execute() {
-                commands.addAll(findBackgroundCommandsToExecute());
-            }
-        });
-
-        for (final Command command : commands) {
-            execute(transactionManager, command);
-        }
-    }
-
-    /**
-     * Mandatory hook method
-     */
-    protected abstract List<? extends Command> findBackgroundCommandsToExecute();
-
-    // //////////////////////////////////////
-
-    
-    private void execute(final IsisTransactionManager transactionManager, final Command command) {
-        transactionManager.executeWithinTransaction(new TransactionalClosureAbstract() {
-            @Override
-            public void execute() {
-                commandContext.setCommand(command);
-                try {
-
-                    command.setStartedAt(Clock.getTimeAsJavaSqlTimestamp());
-                    command.setExecutor(Executor.BACKGROUND);
-
-                    final String memento = command.getMemento();
-                    final ActionInvocationMemento aim = new ActionInvocationMemento(mementoService, memento);
-
-                    final String actionId = aim.getActionId();
-
-                    final Bookmark targetBookmark = aim.getTarget();
-                    final Object targetObject = bookmarkService.lookup(targetBookmark);
-
-                    final ObjectAdapter targetAdapter = adapterFor(targetObject);
-                    final ObjectSpecification specification = targetAdapter.getSpecification();
-
-                    final ObjectAction objectAction = findAction(specification, actionId);
-                    if(objectAction == null) {
-                        throw new Exception("Unknown action '" + actionId + "'");
-                    }
-
-                    final ObjectAdapter[] argAdapters = argAdaptersFor(aim);
-                    final ObjectAdapter resultAdapter = objectAction.execute(targetAdapter, argAdapters);
-                    if(resultAdapter != null) {
-                        Bookmark resultBookmark = CommandUtil.bookmarkFor(resultAdapter);
-                        command.setResult(resultBookmark);
-                    }
-
-                } catch (Exception e) {
-                    command.setException(Throwables.getStackTraceAsString(e));
-                } finally {
-                    command.setCompletedAt(Clock.getTimeAsJavaSqlTimestamp());
-                }
-            }
-        });
-    }
-
-    private ObjectAction findAction(final ObjectSpecification specification, final String actionId) {
-        final List<ObjectAction> objectActions = specification.getObjectActions(Contributed.INCLUDED);
-        for (final ObjectAction objectAction : objectActions) {
-            if(objectAction.getIdentifier().toClassAndNameIdentityString().equals(actionId)) {
-                return objectAction;
-            }
-        }
-        return null;
-    }
-
-    private ObjectAdapter[] argAdaptersFor(final ActionInvocationMemento aim) throws ClassNotFoundException {
-        final int numArgs = aim.getNumArgs();
-        final List<ObjectAdapter> argumentAdapters = Lists.newArrayList();
-        for(int i=0; i<numArgs; i++) {
-            final ObjectAdapter argAdapter = argAdapterFor(aim, i);
-            argumentAdapters.add(argAdapter);
-        }
-        return argumentAdapters.toArray(new ObjectAdapter[]{});
-    }
-
-    private ObjectAdapter argAdapterFor(final ActionInvocationMemento aim, int num) throws ClassNotFoundException {
-        final Class<?> argType = aim.getArgType(num);
-        final Object arg = aim.getArg(num, argType);
-        if(arg == null) {
-            return null;
-        }
-        if(Bookmark.class != argType) {
-            return adapterFor(arg);
-        } else {
-            final Bookmark argBookmark = (Bookmark)arg;
-            final RootOid rootOid = RootOidDefault.create(argBookmark);
-            return adapterFor(rootOid);
-        }
-    }
-
-    
-    // //////////////////////////////////////
-
-    @javax.inject.Inject
-    private BookmarkService bookmarkService;
-
-    @javax.inject.Inject
-    private CommandContext commandContext;
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/module-background/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/module-background/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundServiceDefault.java b/core/module-background/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundServiceDefault.java
deleted file mode 100644
index 01bc347..0000000
--- a/core/module-background/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundServiceDefault.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.isis.core.runtime.services.background;
-
-import javassist.util.proxy.MethodFilter;
-import javassist.util.proxy.MethodHandler;
-import javassist.util.proxy.ProxyFactory;
-import javassist.util.proxy.ProxyObject;
-
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.PostConstruct;
-import com.google.common.collect.Lists;
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.services.background.ActionInvocationMemento;
-import org.apache.isis.applib.services.background.BackgroundCommandService;
-import org.apache.isis.applib.services.background.BackgroundService;
-import org.apache.isis.applib.services.bookmark.Bookmark;
-import org.apache.isis.applib.services.bookmark.BookmarkService;
-import org.apache.isis.applib.services.command.Command;
-import org.apache.isis.applib.services.command.CommandContext;
-import org.apache.isis.core.commons.ensure.Ensure;
-import org.apache.isis.core.commons.exceptions.IsisException;
-import org.apache.isis.core.commons.lang.ArrayExtensions;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
-import org.apache.isis.core.metamodel.spec.feature.ObjectMember;
-import org.apache.isis.core.metamodel.specloader.classsubstitutor.JavassistEnhanced;
-import org.apache.isis.core.metamodel.specloader.specimpl.dflt.ObjectSpecificationDefault;
-import org.apache.isis.core.metamodel.facets.actions.interaction.CommandUtil;
-import org.apache.isis.core.runtime.services.memento.MementoServiceDefault;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-
-import static org.hamcrest.CoreMatchers.*;
-
-/**
- * Depends on an implementation of {@link org.apache.isis.applib.services.background.BackgroundCommandService} to
- * be configured.
- */
-@DomainService
-public class BackgroundServiceDefault implements BackgroundService {
-
-    private final MementoServiceDefault mementoService;
-    
-    public BackgroundServiceDefault() {
-        this(new MementoServiceDefault());
-    }
-    
-    BackgroundServiceDefault(MementoServiceDefault mementoService) {
-        this.mementoService = mementoService.withNoEncoding();
-    }
-    
-    // //////////////////////////////////////
-
-    
-    @Programmatic
-    @PostConstruct
-    public void init(Map<String,String> props) {
-        ensureDependenciesInjected();
-    }
-    
-    private void ensureDependenciesInjected() {
-        Ensure.ensureThatState(this.bookmarkService, is(not(nullValue())), "BookmarkService domain service must be configured");
-        Ensure.ensureThatState(this.backgroundCommandService, is(not(nullValue())), "BackgroundCommandService domain service must be configured");
-        Ensure.ensureThatState(this.commandContext, is(not(nullValue())), "CommandContext domain service must be configured");
-    }
-
-
-    private ObjectSpecificationDefault getJavaSpecificationOfOwningClass(final Method method) {
-        return getJavaSpecification(method.getDeclaringClass());
-    }
-
-    private ObjectSpecificationDefault getJavaSpecification(final Class<?> cls) {
-        final ObjectSpecification objectSpec = getSpecification(cls);
-        if (!(objectSpec instanceof ObjectSpecificationDefault)) {
-            throw new UnsupportedOperationException(
-                "Only Java is supported "
-                + "(specification is '" + objectSpec.getClass().getCanonicalName() + "')");
-        }
-        return (ObjectSpecificationDefault) objectSpec;
-    }
-
-    private ObjectSpecification getSpecification(final Class<?> type) {
-        return getSpecificationLoader().loadSpecification(type);
-    }
-
-
-    // //////////////////////////////////////
-
-    @Programmatic
-    @Override
-    public <T> T execute(final T domainObject) {
-        final Class<? extends Object> cls = domainObject.getClass();
-        final MethodHandler methodHandler = newMethodHandler(domainObject);
-        return newProxy(cls, methodHandler);
-    }
-
-    @SuppressWarnings("unchecked")
-    private <T> T newProxy(Class<? extends Object> cls, MethodHandler methodHandler) {
-        final ProxyFactory proxyFactory = new ProxyFactory();
-        proxyFactory.setSuperclass(cls);
-        proxyFactory.setInterfaces(ArrayExtensions.combine(cls.getInterfaces(), new Class<?>[] { JavassistEnhanced.class }));
-
-        proxyFactory.setFilter(new MethodFilter() {
-            @Override
-            public boolean isHandled(final Method m) {
-                // ignore finalize()
-                return !m.getName().equals("finalize");
-            }
-        });
-
-        final Class<T> proxySubclass = proxyFactory.createClass();
-        try {
-            final T newInstance = proxySubclass.newInstance();
-            final ProxyObject proxyObject = (ProxyObject) newInstance;
-            proxyObject.setHandler(methodHandler);
-
-            return newInstance;
-        } catch (final InstantiationException e) {
-            throw new IsisException(e);
-        } catch (final IllegalAccessException e) {
-            throw new IsisException(e);
-        }
-    }
-
-    private <T> MethodHandler newMethodHandler(final T domainObject) {
-        return new MethodHandler() {
-            @Override
-            public Object invoke(final Object proxied, final Method proxyMethod, final Method proxiedMethod, final Object[] args) throws Throwable {
-
-                final boolean inheritedFromObject = proxyMethod.getDeclaringClass().equals(Object.class);
-                if(inheritedFromObject) {
-                    return proxyMethod.invoke(domainObject, args);
-                }
-
-                final ObjectAdapter targetAdapter = getAdapterManager().adapterFor(domainObject);
-                final ObjectSpecificationDefault targetObjSpec = getJavaSpecificationOfOwningClass(proxyMethod);
-                final ObjectMember member = targetObjSpec.getMember(proxyMethod);
-
-                if(member == null) {
-                    return proxyMethod.invoke(domainObject, args);
-                }
-
-                if(!(member instanceof ObjectAction)) {
-                    throw new UnsupportedOperationException(
-                            "Only actions can be executed in the background "
-                                    + "(method " + proxiedMethod.getName() + " represents a " + member.getFeatureType().name() + "')");
-                }
-
-                final ObjectAction action = (ObjectAction) member;
-
-                final String actionIdentifier = CommandUtil.actionIdentifierFor(action);
-                final String targetClassName = CommandUtil.targetClassNameFor(targetAdapter);
-                final String targetActionName = CommandUtil.targetActionNameFor(action);
-                final String targetArgs = CommandUtil.argDescriptionFor(action, adaptersFor(args));
-                
-                final Bookmark domainObjectBookmark = bookmarkService.bookmarkFor(domainObject);
-
-                final List<Class<?>> argTypes = Lists.newArrayList();
-                final List<Object> argObjs = Lists.newArrayList();
-                CommandUtil.buildMementoArgLists(mementoService, bookmarkService, proxiedMethod, args, argTypes, argObjs);
-
-                final Command command = commandContext.getCommand();
-                
-                final ActionInvocationMemento aim = 
-                        new ActionInvocationMemento(mementoService, 
-                                actionIdentifier, 
-                                domainObjectBookmark,
-                                argTypes,
-                                argObjs);
-               
-                backgroundCommandService.schedule(aim, command, targetClassName, targetActionName, targetArgs);
-                
-                return null;
-            }
-
-            ObjectAdapter[] adaptersFor(final Object[] args) {
-                final AdapterManager adapterManager = getAdapterManager();
-                return CommandUtil.adaptersFor(args, adapterManager);
-            }
-
-        };
-    }
-
-    @Override
-    public ActionInvocationMemento asActionInvocationMemento(Method method, Object domainObject, Object[] args) {
-        
-        final ObjectSpecificationDefault targetObjSpec = getJavaSpecificationOfOwningClass(method);
-        final ObjectMember member = targetObjSpec.getMember(method);
-        if(member == null) {
-            return null;
-        }
-        if(!(member instanceof ObjectAction)) {
-            return null;
-        }
-
-        final ObjectAction action = (ObjectAction) member;
-        final String actionIdentifier = CommandUtil.actionIdentifierFor(action);
-        
-        final Bookmark domainObjectBookmark = bookmarkService.bookmarkFor(domainObject);
-
-        final List<Class<?>> argTypes = Lists.newArrayList();
-        final List<Object> argObjs = Lists.newArrayList();
-        CommandUtil.buildMementoArgLists(mementoService, bookmarkService, method, args, argTypes, argObjs);
-
-        final ActionInvocationMemento aim = 
-                new ActionInvocationMemento(mementoService, 
-                        actionIdentifier, 
-                        domainObjectBookmark,
-                        argTypes,
-                        argObjs);
-       
-        return aim;
-    }
-
-
-    /**
-     * Not API
-     */
-    ActionInvocationMemento newActionInvocationMemento(String mementoStr) {
-        return new ActionInvocationMemento(mementoService, mementoStr);
-    }
-
-    
-    // //////////////////////////////////////
-
-    private BackgroundCommandService backgroundCommandService;
-    /**
-     * Mandatory service; must be configured.
-     */
-    public void injectBackgroundCommandService(final BackgroundCommandService backgroundCommandService) {
-        this.backgroundCommandService = backgroundCommandService;
-    }
-
-    private BookmarkService bookmarkService;
-    /**
-     * Mandatory service (but {@link org.apache.isis.core.metamodel.services.bookmarks.BookmarkServiceDefault}
-     * implementation is part of core and annotated with {@link org.apache.isis.applib.annotation.DomainService},
-     * so guaranteed to be available).
-     */
-    public void injectBookmarkService(BookmarkService bookmarkService) {
-        this.bookmarkService = bookmarkService;
-    }
-
-    private CommandContext commandContext;
-    /**
-     * Mandatory service (but {@link org.apache.isis.applib.services.command.CommandContext} implementation is part of
-     * core and annotated with {@link org.apache.isis.applib.annotation.DomainService}, so guaranteed to be available).
-     */
-    public void injectCommandContext(final CommandContext commandContext) {
-        this.commandContext = commandContext;
-    }
-    
-
-    
-    // //////////////////////////////////////
-
-    protected SpecificationLoaderSpi getSpecificationLoader() {
-        return IsisContext.getSpecificationLoader();
-    }
-
-    protected AdapterManager getAdapterManager() {
-        return IsisContext.getPersistenceSession().getAdapterManager();
-    }
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/IsisConfigurationForJdoIntegTests.java
----------------------------------------------------------------------
diff --git a/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/IsisConfigurationForJdoIntegTests.java b/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/IsisConfigurationForJdoIntegTests.java
index 7483109..991e720 100644
--- a/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/IsisConfigurationForJdoIntegTests.java
+++ b/core/objectstore-jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/IsisConfigurationForJdoIntegTests.java
@@ -62,19 +62,18 @@ public class IsisConfigurationForJdoIntegTests extends IsisConfigurationDefault
 
         // run-in memory
         addDataNucleusProperty("javax.jdo.option.ConnectionURL", "jdbc:hsqldb:mem:test");
-        
-        // various standard properties
-        addDataNucleusProperty("datanucleus.defaultInheritanceStrategy", "TABLE_PER_CLASS");
-        addDataNucleusProperty("datanucleus.cache.level2.type","none");
-        addDataNucleusProperty("datanucleus.identifier.case", "PreserveCase");
-
-        addDataNucleusProperty("datanucleus.persistenceByReachabilityAtCommit", "false");
 
         // Don't do validations that consume setup time.
         addDataNucleusProperty("datanucleus.autoCreateSchema", "true");
         addDataNucleusProperty("datanucleus.validateTables", "false");
         addDataNucleusProperty("datanucleus.validateConstraints", "false");
-        
+
+        // other properties as per WEB-INF/persistor_datanucleus.properties
+        addDataNucleusProperty("datanucleus.persistenceByReachabilityAtCommit", "false");
+        addDataNucleusProperty("datanucleus.identifier.case", "PreserveCase");
+        addDataNucleusProperty("datanucleus.cache.level2.type","none");
+        addDataNucleusProperty("datanucleus.cache.level2.mode","ENABLE_SELECTIVE");
+
         // automatically install any fixtures that might have been registered
         add(DataNucleusObjectStore.INSTALL_FIXTURES_KEY , "true");
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/pom-jdo-enhance-all.xml
----------------------------------------------------------------------
diff --git a/core/pom-jdo-enhance-all.xml b/core/pom-jdo-enhance-all.xml
index e96b5c9..a1713a7 100644
--- a/core/pom-jdo-enhance-all.xml
+++ b/core/pom-jdo-enhance-all.xml
@@ -21,7 +21,7 @@
 
     <groupId>org.apache.isis.core</groupId>
     <artifactId>isis-jdo-enhance-all</artifactId>
-    <version>1.6.0-SNAPSHOT</version>
+    <version>1.7.0-SNAPSHOT</version>
     
     <packaging>pom</packaging>
 

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 69bc07f..e785226 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -1257,144 +1257,6 @@ ${license.additional-notes}
             </dependency>
 
 
-            <!-- modules -->
-            <!-- (in future, these might be released separately from core -->
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-audit-jdo</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-audit-jdo</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-                <scope>test</scope>
-                <type>test-jar</type>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-background</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-background</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-                <scope>test</scope>
-                <type>test-jar</type>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-command-jdo</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-command-jdo</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-                <scope>test</scope>
-                <type>test-jar</type>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-devutils</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-devutils</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-                <scope>test</scope>
-                <type>test-jar</type>
-            </dependency>
-
-            <!--
-            declared as a convenience; alternative is for the domain application to
-            scope=import the o.a.i.module:isis-module-devutils in root pom.xml's dependencyManagement/dependencies
-            -->
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-devutils-applib</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-devutils-applib</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-                <scope>test</scope>
-                <type>test-jar</type>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-devutils-impl</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-devutils-impl</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-                <scope>test</scope>
-                <type>test-jar</type>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-publishing-jdo</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-publishing-jdo</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-                <scope>test</scope>
-                <type>test-jar</type>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-publishingeventserializer-ro</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-publishingeventserializer-ro</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-                <scope>test</scope>
-                <type>test-jar</type>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-settings</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-            </dependency>
-            <!--
-            declared as a convenience; alternative is for the domain application to
-            scope=import the o.a.i.module:isis-module-devutils in root pom.xml's dependencyManagement/dependencies
-            -->
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-settings-applib</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-settings-applib</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-                <scope>test</scope>
-                <type>test-jar</type>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-settings-impl-jdo</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.module</groupId>
-                <artifactId>isis-module-settings-impl-jdo</artifactId>
-                <version>1.7.0-SNAPSHOT</version>
-                <scope>test</scope>
-                <type>test-jar</type>
-            </dependency>
-
-
             <!-- JodaTime -->
             <dependency>
                 <groupId>joda-time</groupId>
@@ -2097,14 +1959,6 @@ ${license.additional-notes}
         <module>viewer-restfulobjects-rendering</module>
         <module>viewer-restfulobjects-server</module>
 
-        <module>module-audit-jdo</module>
-        <module>module-background</module>
-        <module>module-command-jdo</module>
-        <module>module-devutils</module>
-        <module>module-publishing-jdo</module>
-        <module>module-publishingeventserializer-ro</module>
-        <module>module-settings</module>
-
         <module>tck</module>
     </modules>
 

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
new file mode 100644
index 0000000..e2d30c8
--- /dev/null
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundCommandExecution.java
@@ -0,0 +1,171 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.isis.core.runtime.services.background;
+
+import java.util.List;
+import com.google.common.base.Throwables;
+import com.google.common.collect.Lists;
+import org.apache.isis.applib.clock.Clock;
+import org.apache.isis.applib.services.background.ActionInvocationMemento;
+import org.apache.isis.applib.services.bookmark.Bookmark;
+import org.apache.isis.applib.services.bookmark.BookmarkService;
+import org.apache.isis.applib.services.command.Command;
+import org.apache.isis.applib.services.command.Command.Executor;
+import org.apache.isis.applib.services.command.CommandContext;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.oid.RootOid;
+import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.Contributed;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.core.metamodel.facets.actions.interaction.CommandUtil;
+import org.apache.isis.core.runtime.services.memento.MementoServiceDefault;
+import org.apache.isis.core.runtime.sessiontemplate.AbstractIsisSessionTemplate;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.core.runtime.system.transaction.IsisTransactionManager;
+import org.apache.isis.core.runtime.system.transaction.TransactionalClosureAbstract;
+
+/**
+ * Intended to be used as a base class for executing queued up {@link Command background action}s.
+ * 
+ * <p>
+ * This implementation uses the {@link #findBackgroundCommandsToExecute() hook method} so that it is
+ * independent of the location where the actions have actually been persisted to.
+ */
+public abstract class BackgroundCommandExecution extends AbstractIsisSessionTemplate {
+
+    private final MementoServiceDefault mementoService;
+
+    public BackgroundCommandExecution() {
+        // same as configured by BackgroundServiceDefault
+        mementoService = new MementoServiceDefault().withNoEncoding();
+    }
+    
+    // //////////////////////////////////////
+
+    
+    protected void doExecute(Object context) {
+
+        final PersistenceSession persistenceSession = getPersistenceSession();
+        final IsisTransactionManager transactionManager = getTransactionManager(persistenceSession);
+        final List<Command> commands = Lists.newArrayList();
+        transactionManager.executeWithinTransaction(new TransactionalClosureAbstract() {
+            @Override
+            public void execute() {
+                commands.addAll(findBackgroundCommandsToExecute());
+            }
+        });
+
+        for (final Command command : commands) {
+            execute(transactionManager, command);
+        }
+    }
+
+    /**
+     * Mandatory hook method
+     */
+    protected abstract List<? extends Command> findBackgroundCommandsToExecute();
+
+    // //////////////////////////////////////
+
+    
+    private void execute(final IsisTransactionManager transactionManager, final Command command) {
+        transactionManager.executeWithinTransaction(new TransactionalClosureAbstract() {
+            @Override
+            public void execute() {
+                commandContext.setCommand(command);
+                try {
+
+                    command.setStartedAt(Clock.getTimeAsJavaSqlTimestamp());
+                    command.setExecutor(Executor.BACKGROUND);
+
+                    final String memento = command.getMemento();
+                    final ActionInvocationMemento aim = new ActionInvocationMemento(mementoService, memento);
+
+                    final String actionId = aim.getActionId();
+
+                    final Bookmark targetBookmark = aim.getTarget();
+                    final Object targetObject = bookmarkService.lookup(targetBookmark);
+
+                    final ObjectAdapter targetAdapter = adapterFor(targetObject);
+                    final ObjectSpecification specification = targetAdapter.getSpecification();
+
+                    final ObjectAction objectAction = findAction(specification, actionId);
+                    if(objectAction == null) {
+                        throw new Exception("Unknown action '" + actionId + "'");
+                    }
+
+                    final ObjectAdapter[] argAdapters = argAdaptersFor(aim);
+                    final ObjectAdapter resultAdapter = objectAction.execute(targetAdapter, argAdapters);
+                    if(resultAdapter != null) {
+                        Bookmark resultBookmark = CommandUtil.bookmarkFor(resultAdapter);
+                        command.setResult(resultBookmark);
+                    }
+
+                } catch (Exception e) {
+                    command.setException(Throwables.getStackTraceAsString(e));
+                } finally {
+                    command.setCompletedAt(Clock.getTimeAsJavaSqlTimestamp());
+                }
+            }
+        });
+    }
+
+    private ObjectAction findAction(final ObjectSpecification specification, final String actionId) {
+        final List<ObjectAction> objectActions = specification.getObjectActions(Contributed.INCLUDED);
+        for (final ObjectAction objectAction : objectActions) {
+            if(objectAction.getIdentifier().toClassAndNameIdentityString().equals(actionId)) {
+                return objectAction;
+            }
+        }
+        return null;
+    }
+
+    private ObjectAdapter[] argAdaptersFor(final ActionInvocationMemento aim) throws ClassNotFoundException {
+        final int numArgs = aim.getNumArgs();
+        final List<ObjectAdapter> argumentAdapters = Lists.newArrayList();
+        for(int i=0; i<numArgs; i++) {
+            final ObjectAdapter argAdapter = argAdapterFor(aim, i);
+            argumentAdapters.add(argAdapter);
+        }
+        return argumentAdapters.toArray(new ObjectAdapter[]{});
+    }
+
+    private ObjectAdapter argAdapterFor(final ActionInvocationMemento aim, int num) throws ClassNotFoundException {
+        final Class<?> argType = aim.getArgType(num);
+        final Object arg = aim.getArg(num, argType);
+        if(arg == null) {
+            return null;
+        }
+        if(Bookmark.class != argType) {
+            return adapterFor(arg);
+        } else {
+            final Bookmark argBookmark = (Bookmark)arg;
+            final RootOid rootOid = RootOidDefault.create(argBookmark);
+            return adapterFor(rootOid);
+        }
+    }
+
+    
+    // //////////////////////////////////////
+
+    @javax.inject.Inject
+    private BookmarkService bookmarkService;
+
+    @javax.inject.Inject
+    private CommandContext commandContext;
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundServiceDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundServiceDefault.java
new file mode 100644
index 0000000..82a9bd1
--- /dev/null
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/BackgroundServiceDefault.java
@@ -0,0 +1,274 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.isis.core.runtime.services.background;
+
+import javassist.util.proxy.MethodFilter;
+import javassist.util.proxy.MethodHandler;
+import javassist.util.proxy.ProxyFactory;
+import javassist.util.proxy.ProxyObject;
+
+import java.lang.reflect.Method;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.PostConstruct;
+import com.google.common.collect.Lists;
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.services.background.ActionInvocationMemento;
+import org.apache.isis.applib.services.background.BackgroundCommandService;
+import org.apache.isis.applib.services.background.BackgroundService;
+import org.apache.isis.applib.services.bookmark.Bookmark;
+import org.apache.isis.applib.services.bookmark.BookmarkService;
+import org.apache.isis.applib.services.command.Command;
+import org.apache.isis.applib.services.command.CommandContext;
+import org.apache.isis.core.commons.ensure.Ensure;
+import org.apache.isis.core.commons.exceptions.IsisException;
+import org.apache.isis.core.commons.lang.ArrayExtensions;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.core.metamodel.spec.feature.ObjectMember;
+import org.apache.isis.core.metamodel.specloader.classsubstitutor.JavassistEnhanced;
+import org.apache.isis.core.metamodel.specloader.specimpl.dflt.ObjectSpecificationDefault;
+import org.apache.isis.core.metamodel.facets.actions.interaction.CommandUtil;
+import org.apache.isis.core.runtime.services.memento.MementoServiceDefault;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+
+import static org.hamcrest.CoreMatchers.*;
+
+/**
+ * Depends on an implementation of {@link org.apache.isis.applib.services.background.BackgroundCommandService} to
+ * be configured.
+ */
+@DomainService
+public class BackgroundServiceDefault implements BackgroundService {
+
+    private final MementoServiceDefault mementoService;
+    
+    public BackgroundServiceDefault() {
+        this(new MementoServiceDefault());
+    }
+    
+    BackgroundServiceDefault(MementoServiceDefault mementoService) {
+        this.mementoService = mementoService.withNoEncoding();
+    }
+    
+    // //////////////////////////////////////
+
+    
+    @Programmatic
+    @PostConstruct
+    public void init(Map<String,String> props) {
+    }
+    
+
+    private ObjectSpecificationDefault getJavaSpecificationOfOwningClass(final Method method) {
+        return getJavaSpecification(method.getDeclaringClass());
+    }
+
+    private ObjectSpecificationDefault getJavaSpecification(final Class<?> cls) {
+        final ObjectSpecification objectSpec = getSpecification(cls);
+        if (!(objectSpec instanceof ObjectSpecificationDefault)) {
+            throw new UnsupportedOperationException(
+                "Only Java is supported "
+                + "(specification is '" + objectSpec.getClass().getCanonicalName() + "')");
+        }
+        return (ObjectSpecificationDefault) objectSpec;
+    }
+
+    private ObjectSpecification getSpecification(final Class<?> type) {
+        return getSpecificationLoader().loadSpecification(type);
+    }
+
+
+    // //////////////////////////////////////
+
+    @Programmatic
+    @Override
+    public <T> T execute(final T domainObject) {
+
+        // only perform check if actually used.
+        ensureDependenciesInjected();
+
+        final Class<? extends Object> cls = domainObject.getClass();
+        final MethodHandler methodHandler = newMethodHandler(domainObject);
+        return newProxy(cls, methodHandler);
+    }
+
+
+    @SuppressWarnings("unchecked")
+    private <T> T newProxy(Class<? extends Object> cls, MethodHandler methodHandler) {
+        final ProxyFactory proxyFactory = new ProxyFactory();
+        proxyFactory.setSuperclass(cls);
+        proxyFactory.setInterfaces(ArrayExtensions.combine(cls.getInterfaces(), new Class<?>[] { JavassistEnhanced.class }));
+
+        proxyFactory.setFilter(new MethodFilter() {
+            @Override
+            public boolean isHandled(final Method m) {
+                // ignore finalize()
+                return !m.getName().equals("finalize");
+            }
+        });
+
+        final Class<T> proxySubclass = proxyFactory.createClass();
+        try {
+            final T newInstance = proxySubclass.newInstance();
+            final ProxyObject proxyObject = (ProxyObject) newInstance;
+            proxyObject.setHandler(methodHandler);
+
+            return newInstance;
+        } catch (final InstantiationException e) {
+            throw new IsisException(e);
+        } catch (final IllegalAccessException e) {
+            throw new IsisException(e);
+        }
+    }
+
+    private <T> MethodHandler newMethodHandler(final T domainObject) {
+        return new MethodHandler() {
+            @Override
+            public Object invoke(final Object proxied, final Method proxyMethod, final Method proxiedMethod, final Object[] args) throws Throwable {
+
+                final boolean inheritedFromObject = proxyMethod.getDeclaringClass().equals(Object.class);
+                if(inheritedFromObject) {
+                    return proxyMethod.invoke(domainObject, args);
+                }
+
+                final ObjectAdapter targetAdapter = getAdapterManager().adapterFor(domainObject);
+                final ObjectSpecificationDefault targetObjSpec = getJavaSpecificationOfOwningClass(proxyMethod);
+                final ObjectMember member = targetObjSpec.getMember(proxyMethod);
+
+                if(member == null) {
+                    return proxyMethod.invoke(domainObject, args);
+                }
+
+                if(!(member instanceof ObjectAction)) {
+                    throw new UnsupportedOperationException(
+                            "Only actions can be executed in the background "
+                                    + "(method " + proxiedMethod.getName() + " represents a " + member.getFeatureType().name() + "')");
+                }
+
+                final ObjectAction action = (ObjectAction) member;
+
+                final String actionIdentifier = CommandUtil.actionIdentifierFor(action);
+                final String targetClassName = CommandUtil.targetClassNameFor(targetAdapter);
+                final String targetActionName = CommandUtil.targetActionNameFor(action);
+                final String targetArgs = CommandUtil.argDescriptionFor(action, adaptersFor(args));
+                
+                final Bookmark domainObjectBookmark = bookmarkService.bookmarkFor(domainObject);
+
+                final List<Class<?>> argTypes = Lists.newArrayList();
+                final List<Object> argObjs = Lists.newArrayList();
+                CommandUtil.buildMementoArgLists(mementoService, bookmarkService, proxiedMethod, args, argTypes, argObjs);
+
+                final Command command = commandContext.getCommand();
+                
+                final ActionInvocationMemento aim = 
+                        new ActionInvocationMemento(mementoService, 
+                                actionIdentifier, 
+                                domainObjectBookmark,
+                                argTypes,
+                                argObjs);
+               
+                backgroundCommandService.schedule(aim, command, targetClassName, targetActionName, targetArgs);
+                
+                return null;
+            }
+
+            ObjectAdapter[] adaptersFor(final Object[] args) {
+                final AdapterManager adapterManager = getAdapterManager();
+                return CommandUtil.adaptersFor(args, adapterManager);
+            }
+
+        };
+    }
+
+    @Override
+    public ActionInvocationMemento asActionInvocationMemento(Method method, Object domainObject, Object[] args) {
+        
+        final ObjectSpecificationDefault targetObjSpec = getJavaSpecificationOfOwningClass(method);
+        final ObjectMember member = targetObjSpec.getMember(method);
+        if(member == null) {
+            return null;
+        }
+        if(!(member instanceof ObjectAction)) {
+            return null;
+        }
+
+        final ObjectAction action = (ObjectAction) member;
+        final String actionIdentifier = CommandUtil.actionIdentifierFor(action);
+        
+        final Bookmark domainObjectBookmark = bookmarkService.bookmarkFor(domainObject);
+
+        final List<Class<?>> argTypes = Lists.newArrayList();
+        final List<Object> argObjs = Lists.newArrayList();
+        CommandUtil.buildMementoArgLists(mementoService, bookmarkService, method, args, argTypes, argObjs);
+
+        final ActionInvocationMemento aim = 
+                new ActionInvocationMemento(mementoService, 
+                        actionIdentifier, 
+                        domainObjectBookmark,
+                        argTypes,
+                        argObjs);
+       
+        return aim;
+    }
+
+
+    /**
+     * Not API
+     */
+    ActionInvocationMemento newActionInvocationMemento(String mementoStr) {
+        return new ActionInvocationMemento(mementoService, mementoStr);
+    }
+
+    
+    // //////////////////////////////////////
+
+    @javax.inject.Inject
+    private BackgroundCommandService backgroundCommandService;
+
+    @javax.inject.Inject
+    private BookmarkService bookmarkService;
+
+    @javax.inject.Inject
+    private CommandContext commandContext;
+
+    /**
+     * Checked lazily in {@link #execute(Object)}.
+     */
+    private void ensureDependenciesInjected() {
+        Ensure.ensureThatState(this.bookmarkService, is(not(nullValue())), "BookmarkService domain service must be configured");
+        Ensure.ensureThatState(this.backgroundCommandService, is(not(nullValue())), "BackgroundCommandService domain service must be configured");
+        Ensure.ensureThatState(this.commandContext, is(not(nullValue())), "CommandContext domain service must be configured");
+    }
+
+    // //////////////////////////////////////
+
+    protected SpecificationLoaderSpi getSpecificationLoader() {
+        return IsisContext.getSpecificationLoader();
+    }
+
+    protected AdapterManager getAdapterManager() {
+        return IsisContext.getPersistenceSession().getAdapterManager();
+    }
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithActions_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithActions_thenRepresentation_ok.java b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithActions_thenRepresentation_ok.java
index 4590600..e9bb165 100644
--- a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithActions_thenRepresentation_ok.java
+++ b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithActions_thenRepresentation_ok.java
@@ -57,7 +57,7 @@ public class Get_givenEntityWithActions_thenRepresentation_ok {
     public void thenMembers() throws Exception {
 
         // when
-        final Response jaxrsResponse = domainObjectResource.object("RTNE","75");
+        final Response jaxrsResponse = domainObjectResource.object("RTNE","76");
         final RestfulResponse<DomainObjectRepresentation> restfulResponse = RestfulResponse.ofT(jaxrsResponse);
         assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
 

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithCollections_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithCollections_thenRepresentation_ok_TODO.java b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithCollections_thenRepresentation_ok_TODO.java
index f67b40f..7f1d9f6 100644
--- a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithCollections_thenRepresentation_ok_TODO.java
+++ b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithCollections_thenRepresentation_ok_TODO.java
@@ -56,7 +56,7 @@ public class Get_givenEntityWithCollections_thenRepresentation_ok_TODO {
     public void thenCollections() throws Exception {
 
         // when
-        final Response jaxrsResponse = domainObjectResource.object("PRMV","40");
+        final Response jaxrsResponse = domainObjectResource.object("PRMV","41");
         final RestfulResponse<DomainObjectRepresentation> restfulResponse = RestfulResponse.ofT(jaxrsResponse);
         assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
 

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgsValid_thenMultiplePropertyUpdate.java
----------------------------------------------------------------------
diff --git a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgsValid_thenMultiplePropertyUpdate.java b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgsValid_thenMultiplePropertyUpdate.java
index 32b2bde..fd8b1a9 100644
--- a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgsValid_thenMultiplePropertyUpdate.java
+++ b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgsValid_thenMultiplePropertyUpdate.java
@@ -76,7 +76,7 @@ public class Put_whenArgsValid_thenMultiplePropertyUpdate {
     @Test
     public void primitivePropertiesUpdated() throws Exception {
         
-        final DomainObjectRepresentation domainObjectRepr = getObjectRepr("PRMV", "40");
+        final DomainObjectRepresentation domainObjectRepr = getObjectRepr("PRMV", "41");
         
         final LinkRepresentation updateLink = domainObjectRepr.getLinkWithRel(Rel.UPDATE);
         

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_then_200_ok.java
----------------------------------------------------------------------
diff --git a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_then_200_ok.java b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_then_200_ok.java
index 5630392..9e0adc0 100644
--- a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_then_200_ok.java
+++ b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_then_200_ok.java
@@ -79,7 +79,7 @@ public class Put_then_200_ok {
 
         // given
         final int i = 999999;
-        final Response domainObjectResp = domainObjectResource.propertyDetails("PRMV", "40", "intProperty");
+        final Response domainObjectResp = domainObjectResource.propertyDetails("PRMV", "41", "intProperty");
         final RestfulResponse<ObjectPropertyRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
         assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Response.Status.Family.SUCCESSFUL));
 

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenPrimitivePropertyUpdated_ok.java
----------------------------------------------------------------------
diff --git a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenPrimitivePropertyUpdated_ok.java b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenPrimitivePropertyUpdated_ok.java
index f4f34ff..9721d01 100644
--- a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenPrimitivePropertyUpdated_ok.java
+++ b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenPrimitivePropertyUpdated_ok.java
@@ -73,49 +73,49 @@ public class Put_whenArgValid_thenPrimitivePropertyUpdated_ok {
 
         // byte
         final byte b = (byte)99;
-        modifyLink = getObjectPropertyReprModifyLink("PRMV", "40", "byteProperty");
+        modifyLink = getObjectPropertyReprModifyLink("PRMV", "41", "byteProperty");
         argRepr = modifyLink.getArguments().mapPut("value", b);
         assertThat(followedRepr(modifyLink,argRepr).getByte("value"), is(b));
         
         // char
         final char c = 'b';
-        modifyLink = getObjectPropertyReprModifyLink("PRMV", "40", "charProperty");
+        modifyLink = getObjectPropertyReprModifyLink("PRMV", "41", "charProperty");
         argRepr = modifyLink.getArguments().mapPut("value", c);
         assertThat(followedRepr(modifyLink,argRepr).getChar("value"), is(c));
 
         // double
         final double d = 12345.678;
-        modifyLink = getObjectPropertyReprModifyLink("PRMV", "40", "doubleProperty");
+        modifyLink = getObjectPropertyReprModifyLink("PRMV", "41", "doubleProperty");
         argRepr = modifyLink.getArguments().mapPut("value", d);
         assertThat(followedRepr(modifyLink,argRepr).getDouble("value"), is(d));
 
         // float
         final float f = 54321.123F;
-        modifyLink = getObjectPropertyReprModifyLink("PRMV", "40", "floatProperty");
+        modifyLink = getObjectPropertyReprModifyLink("PRMV", "41", "floatProperty");
         argRepr = modifyLink.getArguments().mapPut("value", f);
         assertThat(followedRepr(modifyLink,argRepr).getFloat("value"), is(f));
         
         // int
         final int i = 999999;
-        modifyLink = getObjectPropertyReprModifyLink("PRMV", "40", "intProperty");
+        modifyLink = getObjectPropertyReprModifyLink("PRMV", "41", "intProperty");
         argRepr = modifyLink.getArguments().mapPut("value", i);
         assertThat(followedRepr(modifyLink,argRepr).getInt("value"), is(i));
         
         // long
         final long l = 99999999999L;
-        modifyLink = getObjectPropertyReprModifyLink("PRMV", "40", "longProperty");
+        modifyLink = getObjectPropertyReprModifyLink("PRMV", "41", "longProperty");
         argRepr = modifyLink.getArguments().mapPut("value", l);
         assertThat(followedRepr(modifyLink,argRepr).getLong("value"), is(l));
         
         // short
         final short s = (short)999;
-        modifyLink = getObjectPropertyReprModifyLink("PRMV", "40", "shortProperty");
+        modifyLink = getObjectPropertyReprModifyLink("PRMV", "41", "shortProperty");
         argRepr = modifyLink.getArguments().mapPut("value", s);
         assertThat(followedRepr(modifyLink,argRepr).getShort("value"), is(s));
         
         // boolean
         final boolean z = false;
-        modifyLink = getObjectPropertyReprModifyLink("PRMV", "40", "booleanProperty");
+        modifyLink = getObjectPropertyReprModifyLink("PRMV", "41", "booleanProperty");
         argRepr = modifyLink.getArguments().mapPut("value", z);
         assertThat(followedRepr(modifyLink,argRepr).getBoolean("value"), is(z));
         

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenRepresentation_ok.java b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenRepresentation_ok.java
index ba3c693..7fca5da 100644
--- a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenRepresentation_ok.java
+++ b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenRepresentation_ok.java
@@ -79,7 +79,7 @@ public class Get_whenList_thenRepresentation_ok {
                 .rel(Rel.ELEMENT)
                 .title("Untitled Actions Entity")
                 .httpMethod(RestfulHttpMethod.GET)
-                .href(matches("http://localhost:\\d+/objects/RTNE/75"))
+                .href(matches("http://localhost:\\d+/objects/RTNE/79"))
                 .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
                 .arguments(JsonRepresentation.newMap())
                 .build());

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenInvokeArgWithObjectReference_thenOK.java
----------------------------------------------------------------------
diff --git a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenInvokeArgWithObjectReference_thenOK.java b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenInvokeArgWithObjectReference_thenOK.java
index 5c95999..dbb242c 100644
--- a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenInvokeArgWithObjectReference_thenOK.java
+++ b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenInvokeArgWithObjectReference_thenOK.java
@@ -73,7 +73,7 @@ public class Post_whenInvokeArgWithObjectReference_thenOK {
 
         // given
         RestfulResponse<ObjectCollectionRepresentation> childrenRestfulResponse = 
-                RestfulResponse.ofT(objectResource.accessCollection("PRNT", "50", "children"));
+                RestfulResponse.ofT(objectResource.accessCollection("PRNT", "51", "children"));
         ObjectCollectionRepresentation childrenRepr = childrenRestfulResponse.getEntity();
 
         JsonRepresentation collValue = childrenRepr.getValue();
@@ -85,7 +85,7 @@ public class Post_whenInvokeArgWithObjectReference_thenOK {
         
         // when
         final RestfulResponse<ObjectActionRepresentation> removeChildRestfulResponse = 
-                RestfulResponse.ofT(objectResource.actionPrompt("PRNT", "50", "removeChild"));
+                RestfulResponse.ofT(objectResource.actionPrompt("PRNT", "51", "removeChild"));
         final ObjectActionRepresentation removeChildRepr = removeChildRestfulResponse.getEntity();
         
         LinkRepresentation invokeLinkRepr = removeChildRepr.getLinkWithRel(Rel.INVOKE);
@@ -100,7 +100,7 @@ public class Post_whenInvokeArgWithObjectReference_thenOK {
 
         // then
         childrenRestfulResponse = 
-                RestfulResponse.ofT(objectResource.accessCollection("PRNT", "50", "children"));
+                RestfulResponse.ofT(objectResource.accessCollection("PRNT", "51", "children"));
         childrenRepr = childrenRestfulResponse.getEntity();
 
         collValue = childrenRepr.getValue();

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenRepresentation_ok.java b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenRepresentation_ok.java
index fd1b175..8e4b2d3 100644
--- a/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenRepresentation_ok.java
+++ b/core/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenRepresentation_ok.java
@@ -115,7 +115,7 @@ public class Get_thenRepresentation_ok {
         assertThat(repr.getLinkWithRel(Rel.DELETE), is(nullValue()));
         
         assertThat(repr.getExtensions(), isMap());
-        assertThat(repr.getOid(), matches("JdkValuedEntities:26"));
+        assertThat(repr.getOid(), matches("JdkValuedEntities:27"));
     }
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/example/application/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/pom.xml b/example/application/simpleapp/pom.xml
index 9caba18..0abfae7 100644
--- a/example/application/simpleapp/pom.xml
+++ b/example/application/simpleapp/pom.xml
@@ -37,6 +37,13 @@
         <isis.version>1.7.0-SNAPSHOT</isis.version>
         <isis-viewer-wicket.version>1.7.0-SNAPSHOT</isis-viewer-wicket.version>
 
+        <isis-module-audit.version>1.6.0</isis-module-audit.version>
+        <isis-module-command.version>1.6.0</isis-module-command.version>
+        <isis-module-devutils.version>1.6.0</isis-module-devutils.version>
+        <isis-module-publishing.version>1.6.0</isis-module-publishing.version>
+        <isis-module-publishingeventserializer.version>1.6.0</isis-module-publishingeventserializer.version>
+        <isis-module-settings.version>1.6.0</isis-module-settings.version>
+
         <!-- must be consistent with the versions defined by the JDO Objectstore -->
         <datanucleus-accessplatform-jdo-rdbms.version>3.3.6</datanucleus-accessplatform-jdo-rdbms.version>
         <datanucleus-maven-plugin.version>3.3.2</datanucleus-maven-plugin.version>
@@ -339,6 +346,59 @@
                 <artifactId>simpleapp-webapp</artifactId>
                 <version>${project.version}</version>
             </dependency>
+
+            <!-- modules -->
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-audit-jdo</artifactId>
+                <version>${isis-module-audit.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-command-jdo</artifactId>
+                <version>${isis-module-command.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-devutils</artifactId>
+                <version>${isis-module-devutils.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-devutils-applib</artifactId>
+                <version>${isis-module-devutils.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-devutils-impl</artifactId>
+                <version>${isis-module-devutils.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-publishing-jdo</artifactId>
+                <version>${isis-module-publishing.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-publishingeventserializer-ro</artifactId>
+                <version>${isis-module-publishingeventserializer.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-settings</artifactId>
+                <version>${isis-module-settings.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-settings-applib</artifactId>
+                <version>${isis-module-settings.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-settings-impl-jdo</artifactId>
+                <version>${isis-module-settings.version}</version>
+            </dependency>
+
         </dependencies>
     </dependencyManagement>
     

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/example/application/simpleapp/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/pom.xml b/example/application/simpleapp/webapp/pom.xml
index 51b12b5..bb9e7e0 100644
--- a/example/application/simpleapp/webapp/pom.xml
+++ b/example/application/simpleapp/webapp/pom.xml
@@ -203,6 +203,7 @@
             <groupId>org.apache.isis.module</groupId>
             <artifactId>isis-module-devutils-impl</artifactId>
         </dependency>
+
         <!--
         uncomment to enable auditing (@Audited),
         persisted to database
@@ -215,17 +216,6 @@
         -->
 
         <!--
-        uncomment to enable BackgroundService;
-        depends on: an implementation of BackgroundCommandService to persist commands
-        (see isis-module-command-jdo)
-        -->
-        <!--
-        <dependency>
-            <groupId>org.apache.isis.module</groupId>
-            <artifactId>isis-module-background</artifactId>
-        </dependency>
-        -->
-        <!--
         uncomment to enable commands (@Command annotation)
         persisted to database, also enabling the ability to run commands in the background
         (eg using the Quartz scheduler)

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/example/application/simpleapp/webapp/src/main/java/webapp/ComponentFactoryRegistrarForSimpleApp.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/java/webapp/ComponentFactoryRegistrarForSimpleApp.java b/example/application/simpleapp/webapp/src/main/java/webapp/ComponentFactoryRegistrarForSimpleApp.java
deleted file mode 100644
index b756ec3..0000000
--- a/example/application/simpleapp/webapp/src/main/java/webapp/ComponentFactoryRegistrarForSimpleApp.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package webapp;
-
-import com.google.inject.Singleton;
-
-import org.apache.isis.viewer.wicket.viewer.registries.components.ComponentFactoryRegistrarDefault;
-
-@Singleton
-public class ComponentFactoryRegistrarForSimpleApp extends ComponentFactoryRegistrarDefault {
-
-    @Override
-    public void addComponentFactories(ComponentFactoryList componentFactories) {
-        super.addComponentFactories(componentFactories);
-        // currently no replacements
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/example/application/simpleapp/webapp/src/main/java/webapp/SimpleApplication.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/java/webapp/SimpleApplication.java b/example/application/simpleapp/webapp/src/main/java/webapp/SimpleApplication.java
index d12c2f2..231e263 100644
--- a/example/application/simpleapp/webapp/src/main/java/webapp/SimpleApplication.java
+++ b/example/application/simpleapp/webapp/src/main/java/webapp/SimpleApplication.java
@@ -115,8 +115,6 @@ public class SimpleApplication extends IsisWicketApplication {
         final Module simpleOverrides = new AbstractModule() {
             @Override
             protected void configure() {
-                bind(ComponentFactoryRegistrar.class).to(ComponentFactoryRegistrarForSimpleApp.class);
-                
                 bind(String.class).annotatedWith(Names.named("applicationName")).toInstance("Simple App");
                 bind(String.class).annotatedWith(Names.named("applicationCss")).toInstance("css/application.css");
                 bind(String.class).annotatedWith(Names.named("applicationJs")).toInstance("scripts/application.js");

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties
index 605e0ab..2b05518 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/isis.properties
@@ -179,10 +179,6 @@ isis.services = \
                 # JDO implementation of the two SettingsServices, \
                 # org.apache.isis.objectstore.jdo.applib.service.settings.ApplicationSettingsServiceJdo,\
                 # org.apache.isis.objectstore.jdo.applib.service.settings.UserSettingsServiceJdo,\
-                \
-                # Core (example) implementations of auditing and publishing services, \
-                # org.apache.isis.applib.services.audit.AuditingService3$Stderr,\
-                # org.apache.isis.applib.services.publish.PublishingService$Stderr,\
                 #
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
index 4266980..1ad6572 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
@@ -44,6 +44,7 @@ isis.persistor.datanucleus.impl.datanucleus.validateConstraints=true
 
 #
 # Require explicit persistence (since entities are Comparable and using ObjectContracts#compareTo).
+# see http://www.datanucleus.org/products/accessplatform_3_0/jdo/transaction_types.html
 #
 isis.persistor.datanucleus.impl.datanucleus.persistenceByReachabilityAtCommit=false
 
@@ -55,12 +56,14 @@ isis.persistor.datanucleus.impl.datanucleus.persistenceByReachabilityAtCommit=fa
 isis.persistor.datanucleus.impl.datanucleus.identifier.case=PreserveCase
 
 
-# L2 cache (on by default)
+#
+# L2 cache
+# off except if explicitly marked as cacheable
+# http://www.datanucleus.org/products/datanucleus/jdo/cache.html
+#
 isis.persistor.datanucleus.impl.datanucleus.cache.level2.type=none
 isis.persistor.datanucleus.impl.datanucleus.cache.level2.mode=ENABLE_SELECTIVE
 
-#see http://www.datanucleus.org/products/datanucleus/jdo/transaction_types.html#optimistic
-isis.persistor.datanucleus.impl.datanucleus.persistenceByReachabilityAtCommit=false
 
 
 #

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/example/application/todoapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/todoapp/pom.xml b/example/application/todoapp/pom.xml
index 33edccd..484bc89 100644
--- a/example/application/todoapp/pom.xml
+++ b/example/application/todoapp/pom.xml
@@ -37,6 +37,13 @@
         <isis.version>1.7.0-SNAPSHOT</isis.version>
 		<isis-viewer-wicket.version>1.7.0-SNAPSHOT</isis-viewer-wicket.version>
 
+		<isis-module-audit.version>1.6.0</isis-module-audit.version>
+		<isis-module-command.version>1.6.0</isis-module-command.version>
+		<isis-module-devutils.version>1.6.0</isis-module-devutils.version>
+		<isis-module-publishing.version>1.6.0</isis-module-publishing.version>
+		<isis-module-publishingeventserializer.version>1.6.0</isis-module-publishingeventserializer.version>
+		<isis-module-settings.version>1.6.0</isis-module-settings.version>
+
         <!-- must be consistent with the versions defined by the JDO Objectstore -->
         <datanucleus-accessplatform-jdo-rdbms.version>3.3.6</datanucleus-accessplatform-jdo-rdbms.version>
         <datanucleus-maven-plugin.version>3.3.2</datanucleus-maven-plugin.version>
@@ -339,6 +346,61 @@
             </dependency>
 
 
+            <!-- modules -->
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-audit-jdo</artifactId>
+                <version>${isis-module-audit.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-command-jdo</artifactId>
+                <version>${isis-module-command.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-devutils</artifactId>
+                <version>${isis-module-devutils.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-devutils-applib</artifactId>
+                <version>${isis-module-devutils.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-devutils-impl</artifactId>
+                <version>${isis-module-devutils.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-publishing-jdo</artifactId>
+                <version>${isis-module-publishing.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-publishingeventserializer-ro</artifactId>
+                <version>${isis-module-publishingeventserializer.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-settings</artifactId>
+                <version>${isis-module-settings.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-settings-applib</artifactId>
+                <version>${isis-module-settings.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.isis.module</groupId>
+                <artifactId>isis-module-settings-impl-jdo</artifactId>
+                <version>${isis-module-settings.version}</version>
+            </dependency>
+
+
+
+
             <!-- quartz scheduler integration -->
 
             <dependency>


[2/3] ISIS-851: removing isis-module-background (moved back to core-runtime), and updating simpleapp/todoapp to reference 1.6.0 modules directly.

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/example/application/todoapp/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/todoapp/webapp/pom.xml b/example/application/todoapp/webapp/pom.xml
index a7de70a..58146ca 100644
--- a/example/application/todoapp/webapp/pom.xml
+++ b/example/application/todoapp/webapp/pom.xml
@@ -201,10 +201,6 @@
         <!-- isis modules -->
         <dependency>
             <groupId>org.apache.isis.module</groupId>
-            <artifactId>isis-module-background</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.isis.module</groupId>
             <artifactId>isis-module-devutils-impl</artifactId>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/example/application/todoapp/webapp/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/example/application/todoapp/webapp/src/main/webapp/WEB-INF/isis.properties b/example/application/todoapp/webapp/src/main/webapp/WEB-INF/isis.properties
index 8e95327..8c3eb2d 100644
--- a/example/application/todoapp/webapp/src/main/webapp/WEB-INF/isis.properties
+++ b/example/application/todoapp/webapp/src/main/webapp/WEB-INF/isis.properties
@@ -181,10 +181,6 @@ isis.services = \
                 # JDO implementation of the two SettingsServices, \
                 # org.apache.isis.objectstore.jdo.applib.service.settings.ApplicationSettingsServiceJdo,\
                 # org.apache.isis.objectstore.jdo.applib.service.settings.UserSettingsServiceJdo,\
-                \
-                # Core (example) implementations of auditing and publishing services, \
-                # org.apache.isis.applib.services.audit.AuditingService3$Stderr,\
-                # org.apache.isis.applib.services.publish.PublishingService$Stderr,\
                 #
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/95b537b1/example/application/todoapp/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
----------------------------------------------------------------------
diff --git a/example/application/todoapp/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties b/example/application/todoapp/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
index 32919b5..a60a733 100644
--- a/example/application/todoapp/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
+++ b/example/application/todoapp/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
@@ -45,6 +45,7 @@ isis.persistor.datanucleus.impl.datanucleus.validateConstraints=true
 
 #
 # Require explicit persistence (since entities are Comparable and using ObjectContracts#compareTo).
+# see http://www.datanucleus.org/products/accessplatform_3_0/jdo/transaction_types.html
 #
 isis.persistor.datanucleus.impl.datanucleus.persistenceByReachabilityAtCommit=false
 
@@ -56,12 +57,14 @@ isis.persistor.datanucleus.impl.datanucleus.persistenceByReachabilityAtCommit=fa
 isis.persistor.datanucleus.impl.datanucleus.identifier.case=PreserveCase
 
 
-# L2 cache (on by default)
+#
+# L2 cache
+# off except if explicitly marked as cacheable
+# http://www.datanucleus.org/products/datanucleus/jdo/cache.html
+#
 isis.persistor.datanucleus.impl.datanucleus.cache.level2.type=none
 isis.persistor.datanucleus.impl.datanucleus.cache.level2.mode=ENABLE_SELECTIVE
 
-#see http://www.datanucleus.org/products/datanucleus/jdo/transaction_types.html#optimistic
-isis.persistor.datanucleus.impl.datanucleus.persistenceByReachabilityAtCommit=false
 
 
 #