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/10/08 00:37:13 UTC
[1/3] git commit: ISIS-872: trivial fixes for index.html in todoapp
(archetype).
Repository: isis
Updated Branches:
refs/heads/master 52c18eb8b -> b0e31f6f5
ISIS-872: trivial fixes for index.html in todoapp (archetype).
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/bf8ef0f4
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/bf8ef0f4
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/bf8ef0f4
Branch: refs/heads/master
Commit: bf8ef0f4f169b4a6e88edbc55584e74211a8f569
Parents: 52c18eb
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Oct 7 18:39:44 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Oct 7 18:39:44 2014 +0100
----------------------------------------------------------------------
.../todoapp/webapp/src/main/webapp/about/index.html | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/bf8ef0f4/example/application/todoapp/webapp/src/main/webapp/about/index.html
----------------------------------------------------------------------
diff --git a/example/application/todoapp/webapp/src/main/webapp/about/index.html b/example/application/todoapp/webapp/src/main/webapp/about/index.html
index a4bb026..5762e8f 100644
--- a/example/application/todoapp/webapp/src/main/webapp/about/index.html
+++ b/example/application/todoapp/webapp/src/main/webapp/about/index.html
@@ -128,7 +128,7 @@ th, td {
</li>
<li><tt><a href="https://github.com/apache/isis/blob/master/example/application/todo%61pp/webapp/src/main/webapp/WEB-INF/web.xml" target="_blank">WEB-INF/web.xml</a></tt> (in <tt>webapp</tt> module)
<ul>
- <li><tt><a href="https://github.com/apache/isis/blob/master/example/application/todo%61pp/webapp/src/main/webapp/WEB-INF/web.xml#L98" target="_blank">ResourceCachingFilter</a></tt> and <tt><a href="https://github.com/apache/isis/blob/master/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/web.xml#L134" target="_blank">ResourceServlet</a></tt> - filter and servlet for serving up static resources.
+ <li><tt><a href="https://github.com/apache/isis/blob/master/example/application/todo%61pp/webapp/src/main/webapp/WEB-INF/web.xml#L98" target="_blank">ResourceCachingFilter</a></tt> and <tt><a href="https://github.com/apache/isis/blob/master/example/application/todo%61pp/webapp/src/main/webapp/WEB-INF/web.xml#L134" target="_blank">ResourceServlet</a></tt> - filter and servlet for serving up static resources.
</li>
<li><tt><a href="https://github.com/apache/isis/blob/master/example/application/todo%61pp/webapp/src/main/webapp/WEB-INF/web.xml#L174" target="_blank">WicketFilter</a></tt> - filter for the wicket application, mapped to <tt>/wicket/*</tt>
</li>
@@ -142,24 +142,24 @@ th, td {
</li>
<li><tt><a href="https://github.com/apache/isis/blob/master/example/application/todo%61pp/webapp/src/main/webapp/WEB-INF/isis.properties" target="_blank">WEB-INF/isis.properties</a></tt> (in <tt>webapp</tt> module)
<ul>
- <li><tt>isis.services</tt> - specifies the two domain services described above (<tt>ToDoItems</tt> and <tt>ToDoItemsFixtureService</tt>), appearing on the menu bar in the Wicket viewer,
- along with a number of hidden framework-provided domain services demonstrating Isis' support for publishing, auditing and customizable error handling
+ <li><tt>isis.services</tt> - explicitly loaded framework-provide domain services. Other services (including <tt>ToDoItems</tt> and <tt>ToDoItemsFixtureService</tt> described above),
+ are loaded automatically from the classpath.
</li>
- <li><tt>isis.persistor</tt> - specifies to use the JDO object store
+ <li><tt>isis.persistor</tt> - specifies to use Isis' integration with <a href="http://datanucleus.org">DataNucleus</a> for (JDO-based) persistence.
</li>
- <li><tt>isis.authentication</tt> and <tt>isis.authorization</tt> - security mechanism to use (<tt>bypass</tt> effectively disables)
+ <li><tt>isis.authentication</tt> and <tt>isis.authorization</tt> - specifies to use Isis' integration with <a href="http://shiro.apache.org">Apache Shiro</a> for security.
</li>
</ul>
</li>
<li><tt><a href="https://github.com/apache/isis/blob/master/example/application/todo%61pp/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties" target="_blank">WEB-INF/persistor_datanucleus.properties</a></tt> (in <tt>webapp</tt> module)
<ul>
- <li>configuration for JDO object store
+ <li>configuration for the DataNucleus (JDO) object store
</li>
</ul>
</li>
<li><tt><a href="https://github.com/apache/isis/blob/master/example/application/todo%61pp/webapp/src/main/webapp/WEB-INF/persistor.properties" target="_blank">WEB-INF/persistor.properties</a></tt> (in <tt>webapp</tt> module)
<ul>
- <li>JDBC URL for JDO object store
+ <li>JDBC URL for DataNucleus (JDO) object store
</li>
</ul>
</li>
[2/3] git commit: ISIS-912: renaming an OptionHandler to better
reflect its intent.
Posted by da...@apache.org.
ISIS-912: renaming an OptionHandler to better reflect its intent.
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/dec49d62
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/dec49d62
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/dec49d62
Branch: refs/heads/master
Commit: dec49d62cb5831194cbfce28d5cea9a31b80434a
Parents: bf8ef0f
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Oct 7 23:34:16 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Oct 7 23:35:42 2014 +0100
----------------------------------------------------------------------
.../wicket/viewer/IsisWicketApplication.java | 4 +-
.../OptionHandlerFixtureFromInitParameters.java | 86 --------------------
.../opts/OptionHandlerInitParameters.java | 86 ++++++++++++++++++++
.../core/webapp/IsisWebAppBootstrapper.java | 4 +-
4 files changed, 90 insertions(+), 90 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/dec49d62/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java b/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
index d87e9df..d7cad73 100644
--- a/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
+++ b/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
@@ -63,7 +63,7 @@ import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
import org.apache.isis.core.metamodel.specloader.validator.MetaModelInvalidException;
import org.apache.isis.core.runtime.logging.IsisLoggingConfigurer;
import org.apache.isis.core.runtime.runner.IsisInjectModule;
-import org.apache.isis.core.runtime.runner.opts.OptionHandlerFixtureFromInitParameters;
+import org.apache.isis.core.runtime.runner.opts.OptionHandlerInitParameters;
import org.apache.isis.core.runtime.system.DeploymentType;
import org.apache.isis.core.runtime.system.IsisSystem;
import org.apache.isis.core.runtime.system.context.IsisContext;
@@ -395,7 +395,7 @@ public class IsisWicketApplication extends AuthenticatedWebApplication implement
isisConfigurationBuilderPrimers.addAll(primers);
}
// also support loading from init parameters (specifically, to support simplericity's jetty-console)
- isisConfigurationBuilderPrimers.add(new OptionHandlerFixtureFromInitParameters(servletContext));
+ isisConfigurationBuilderPrimers.add(new OptionHandlerInitParameters(servletContext));
for (final IsisConfigurationBuilderPrimer isisConfigurationBuilderPrimer : isisConfigurationBuilderPrimers) {
LOG.info("priming configurations for " + isisConfigurationBuilderPrimer);
isisConfigurationBuilderPrimer.primeConfigurationBuilder(isisConfigurationBuilder);
http://git-wip-us.apache.org/repos/asf/isis/blob/dec49d62/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerFixtureFromInitParameters.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerFixtureFromInitParameters.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerFixtureFromInitParameters.java
deleted file mode 100644
index 46e8f25..0000000
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerFixtureFromInitParameters.java
+++ /dev/null
@@ -1,86 +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.runner.opts;
-
-import java.util.Enumeration;
-import java.util.Map;
-import javax.servlet.ServletContext;
-import com.google.common.collect.Maps;
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.Options;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.isis.core.commons.config.IsisConfigurationBuilder;
-import org.apache.isis.core.runtime.optionhandler.BootPrinter;
-import org.apache.isis.core.runtime.optionhandler.OptionHandlerAbstract;
-
-public class OptionHandlerFixtureFromInitParameters extends OptionHandlerAbstract {
-
- private static final Logger LOG = LoggerFactory.getLogger(OptionHandlerFixtureFromInitParameters.class);
- private final ServletContext servletContext;
-
-
-
- public OptionHandlerFixtureFromInitParameters(ServletContext servletContext) {
- this.servletContext = servletContext;
- }
-
- @Override
- @SuppressWarnings("static-access")
- public void addOption(final Options options) {
- // no-op
- }
-
- @Override
- public boolean handle(final CommandLine commandLine, final BootPrinter bootPrinter, final Options options) {
- // no-op
- return true;
- }
-
- @Override
- public void primeConfigurationBuilder(final IsisConfigurationBuilder isisConfigurationBuilder) {
- Map<String,String> additionalProperties = asMap(servletContext);
- LOG.info("priming configuration builder: " + additionalProperties.size() + " properties to prime");
- addConfigurationProperties(isisConfigurationBuilder, additionalProperties);
- }
-
- private static Map<String, String> asMap(ServletContext servletContext) {
- Enumeration<String> initParameterNames = servletContext.getInitParameterNames();
- final Map<String,String> map = Maps.newTreeMap();
- while(initParameterNames.hasMoreElements()) {
- final String initParameterName = initParameterNames.nextElement();
- final String initParameterValue = servletContext.getInitParameter(initParameterName);
- if (initParameterName.startsWith("isis.")) {
- map.put(initParameterName, initParameterValue);
- }
- }
- return map;
- }
-
- private static void addConfigurationProperties(final IsisConfigurationBuilder isisConfigurationBuilder, final Map<String, String> additionalProperties) {
- for (final String propertyKey : additionalProperties.keySet()) {
- final String propertyValue = additionalProperties.get(propertyKey);
-
- LOG.info("priming: " + propertyKey + "=" + propertyValue);
- isisConfigurationBuilder.add(propertyKey, propertyValue);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/dec49d62/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerInitParameters.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerInitParameters.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerInitParameters.java
new file mode 100644
index 0000000..6996cc0
--- /dev/null
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerInitParameters.java
@@ -0,0 +1,86 @@
+/*
+ * 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.runner.opts;
+
+import java.util.Enumeration;
+import java.util.Map;
+import javax.servlet.ServletContext;
+import com.google.common.collect.Maps;
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.Options;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.isis.core.commons.config.IsisConfigurationBuilder;
+import org.apache.isis.core.runtime.optionhandler.BootPrinter;
+import org.apache.isis.core.runtime.optionhandler.OptionHandlerAbstract;
+
+public class OptionHandlerInitParameters extends OptionHandlerAbstract {
+
+ private static final Logger LOG = LoggerFactory.getLogger(OptionHandlerInitParameters.class);
+ private final ServletContext servletContext;
+
+
+
+ public OptionHandlerInitParameters(ServletContext servletContext) {
+ this.servletContext = servletContext;
+ }
+
+ @Override
+ @SuppressWarnings("static-access")
+ public void addOption(final Options options) {
+ // no-op
+ }
+
+ @Override
+ public boolean handle(final CommandLine commandLine, final BootPrinter bootPrinter, final Options options) {
+ // no-op
+ return true;
+ }
+
+ @Override
+ public void primeConfigurationBuilder(final IsisConfigurationBuilder isisConfigurationBuilder) {
+ Map<String,String> additionalProperties = asMap(servletContext);
+ LOG.info("priming configuration builder: " + additionalProperties.size() + " properties to prime");
+ addConfigurationProperties(isisConfigurationBuilder, additionalProperties);
+ }
+
+ private static Map<String, String> asMap(ServletContext servletContext) {
+ Enumeration<String> initParameterNames = servletContext.getInitParameterNames();
+ final Map<String,String> map = Maps.newTreeMap();
+ while(initParameterNames.hasMoreElements()) {
+ final String initParameterName = initParameterNames.nextElement();
+ final String initParameterValue = servletContext.getInitParameter(initParameterName);
+ if (initParameterName.startsWith("isis.")) {
+ map.put(initParameterName, initParameterValue);
+ }
+ }
+ return map;
+ }
+
+ private static void addConfigurationProperties(final IsisConfigurationBuilder isisConfigurationBuilder, final Map<String, String> additionalProperties) {
+ for (final String propertyKey : additionalProperties.keySet()) {
+ final String propertyValue = additionalProperties.get(propertyKey);
+
+ LOG.info("priming: " + propertyKey + "=" + propertyValue);
+ isisConfigurationBuilder.add(propertyKey, propertyValue);
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/dec49d62/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppBootstrapper.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppBootstrapper.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppBootstrapper.java
index a28619d..5e56693 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppBootstrapper.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/IsisWebAppBootstrapper.java
@@ -38,7 +38,7 @@ import org.apache.isis.core.commons.resource.ResourceStreamSourceFileSystem;
import org.apache.isis.core.runtime.installerregistry.InstallerLookup;
import org.apache.isis.core.runtime.logging.IsisLoggingConfigurer;
import org.apache.isis.core.runtime.runner.IsisInjectModule;
-import org.apache.isis.core.runtime.runner.opts.OptionHandlerFixtureFromInitParameters;
+import org.apache.isis.core.runtime.runner.opts.OptionHandlerInitParameters;
import org.apache.isis.core.runtime.system.DeploymentType;
import org.apache.isis.core.runtime.system.IsisSystem;
import org.apache.isis.core.runtime.system.SystemConstants;
@@ -139,7 +139,7 @@ public class IsisWebAppBootstrapper implements ServletContextListener {
isisConfigurationBuilderPrimers.addAll(primers);
}
// also support loading from init parameters (specifically, to support simplericity's jetty-console)
- isisConfigurationBuilderPrimers.add(new OptionHandlerFixtureFromInitParameters(servletContext));
+ isisConfigurationBuilderPrimers.add(new OptionHandlerInitParameters(servletContext));
for (final IsisConfigurationBuilderPrimer isisConfigurationBuilderPrimer : isisConfigurationBuilderPrimers) {
LOG.debug("priming configurations for " + isisConfigurationBuilderPrimer);
isisConfigurationBuilderPrimer.primeConfigurationBuilder(isisConfigurationBuilder);
[3/3] git commit: ISIS-864: persist commands if objects dirtied (even
if action semantics are query-only and ignoreQueryOnly flag is set).
Posted by da...@apache.org.
ISIS-864: persist commands if objects dirtied (even if action semantics are query-only and ignoreQueryOnly flag is set).
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/b0e31f6f
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/b0e31f6f
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/b0e31f6f
Branch: refs/heads/master
Commit: b0e31f6f595466a4f624c7df6bbda9bb8bbd0b0d
Parents: dec49d6
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Oct 7 23:36:57 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Oct 7 23:36:57 2014 +0100
----------------------------------------------------------------------
.../isis/applib/services/command/Command.java | 25 --------------------
.../isis/applib/services/command/Command2.java | 15 ++++++++----
.../system/transaction/IsisTransaction.java | 22 +++++++++++++----
3 files changed, 28 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/b0e31f6f/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
index fb92128..f791ba9 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
@@ -29,7 +29,6 @@ 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.eventbus.ActionInteractionEvent;
public interface Command extends HasTransactionId {
@@ -208,30 +207,6 @@ public interface Command extends HasTransactionId {
// //////////////////////////////////////
- // actionInteractionEvent (property)
- // //////////////////////////////////////
-
- /**
- * The corresponding {@link org.apache.isis.applib.services.eventbus.ActionInteractionEvent}.
- *
- * <p>
- * Note that the {@link org.apache.isis.applib.services.eventbus.ActionInteractionEvent} itself is mutable,
- * as its {@link org.apache.isis.applib.services.eventbus.ActionInteractionEvent#getPhase() phase} changes from
- * {@link org.apache.isis.applib.services.eventbus.AbstractInteractionEvent.Phase#EXECUTING executing} to
- * {@link org.apache.isis.applib.services.eventbus.AbstractInteractionEvent.Phase#EXECUTED executed}. The
- * event returned from this method will always be in one or other of these phases.
- * </p>
- * @return
- */
- ActionInteractionEvent<?> getActionInteractionEvent();
-
- /**
- * <b>NOT API</b>: intended to be called only by the framework.
- */
- void setActionInteractionEvent(ActionInteractionEvent<?> event);
-
-
- // //////////////////////////////////////
// executor (property)
// //////////////////////////////////////
http://git-wip-us.apache.org/repos/asf/isis/blob/b0e31f6f/core/applib/src/main/java/org/apache/isis/applib/services/command/Command2.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command2.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command2.java
index 2734c7e..0664ba1 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command2.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command2.java
@@ -24,12 +24,17 @@ import org.apache.isis.applib.services.eventbus.ActionInteractionEvent;
*/
public interface Command2 extends Command {
- // //////////////////////////////////////
- // actionInteractionEvent (property)
- // //////////////////////////////////////
-
/**
* The corresponding {@link org.apache.isis.applib.services.eventbus.ActionInteractionEvent}.
+ *
+ * <p>
+ * Note that the {@link org.apache.isis.applib.services.eventbus.ActionInteractionEvent} itself is mutable,
+ * as its {@link org.apache.isis.applib.services.eventbus.ActionInteractionEvent#getPhase() phase} changes from
+ * {@link org.apache.isis.applib.services.eventbus.AbstractInteractionEvent.Phase#EXECUTING executing} to
+ * {@link org.apache.isis.applib.services.eventbus.AbstractInteractionEvent.Phase#EXECUTED executed}. The
+ * event returned from this method will always be in one or other of these phases.
+ * </p>
+ * @return
*/
ActionInteractionEvent<?> getActionInteractionEvent();
@@ -39,4 +44,6 @@ public interface Command2 extends Command {
void setActionInteractionEvent(ActionInteractionEvent<?> event);
+
+
}
http://git-wip-us.apache.org/repos/asf/isis/blob/b0e31f6f/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/IsisTransaction.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/IsisTransaction.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/IsisTransaction.java
index 9060315..9f52c24 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/IsisTransaction.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/IsisTransaction.java
@@ -724,7 +724,7 @@ public class IsisTransaction implements TransactionScopedComponent {
try {
final Set<Entry<AdapterAndProperty, PreAndPostValues>> changedObjectProperties = getChangedObjectProperties();
- ensureAnySafeSemanticsHonoured(changedObjectProperties);
+ ensureCommandsPersistedIfDirtyXactnAndAnySafeSemanticsHonoured(changedObjectProperties);
preCommitServices(changedObjectProperties);
} catch (final RuntimeException ex) {
setAbortCause(new IsisTransactionManagerException(ex));
@@ -733,14 +733,27 @@ public class IsisTransaction implements TransactionScopedComponent {
}
}
- private void ensureAnySafeSemanticsHonoured(final Set<Entry<AdapterAndProperty, PreAndPostValues>> changedObjectProperties) {
- final CommandContext commandContext = getServiceOrNull(CommandContext.class);
+ private void ensureCommandsPersistedIfDirtyXactnAndAnySafeSemanticsHonoured(final Set<Entry<AdapterAndProperty, PreAndPostValues>> changedObjectProperties) {
- // playing it safe, but the following guards are almost certainly not necessary.
+ final CommandContext commandContext = getServiceOrNull(CommandContext.class);
if (commandContext == null) {
return;
}
final Command command = commandContext.getCommand();
+ if(command == null) {
+ return;
+ }
+
+ // ensure that any changed objects means that the command should be persisted
+ final Set<ObjectAdapter> changedAdapters = findChangedAdapters(changedObjectProperties);
+ if(!changedAdapters.isEmpty()) {
+ command.setPersistHint(true);
+ }
+
+ ensureSafeSemanticsHonoured(command, changedAdapters);
+ }
+
+ private void ensureSafeSemanticsHonoured(Command command, Set<ObjectAdapter> changedAdapters) {
if (!(command instanceof Command2)) {
return;
}
@@ -758,7 +771,6 @@ public class IsisTransaction implements TransactionScopedComponent {
return;
}
- final Set<ObjectAdapter> changedAdapters = findChangedAdapters(changedObjectProperties);
if(!changedAdapters.isEmpty()) {
final String msg = "Action '" + event.getIdentifier().toFullIdentityString() + "'" +
" (with safe semantics)" +