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 2016/05/26 16:30:06 UTC
[3/4] isis git commit: ISIS-1414: removing
'numberOfPropertiesModified' from ixn.xsd and MetricsService;
this is xactn-scoped information, not request-scoped. Also introduced
WithTransactionScoped as a means to indicate which of the request-scoped mem
ISIS-1414: removing 'numberOfPropertiesModified' from ixn.xsd and MetricsService; this is xactn-scoped information, not request-scoped. Also introduced WithTransactionScoped as a means to indicate which of the request-scoped members are really transaction-scoped.
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/ad9cec42
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/ad9cec42
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/ad9cec42
Branch: refs/heads/ISIS-1414
Commit: ad9cec42cb3828f2f9c4d43c62bd787ccff94d81
Parents: 21b27fe
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu May 26 17:25:46 2016 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu May 26 17:26:54 2016 +0100
----------------------------------------------------------------------
.../main/asciidoc/guides/_rgcms_schema-ixn.adoc | 7 +--
.../src/main/asciidoc/schema/ixn/ixn-1.0.xsd | 6 ---
.../src/main/asciidoc/schema/ixn/ixn.xsd | 6 ---
core/applib/pom.xml | 4 +-
.../isis/applib/services/iactn/Interaction.java | 20 +++------
.../applib/services/metrics/MetricsService.java | 13 ------
.../schema/utils/MemberExecutionDtoUtils.java | 8 ----
core/pom.xml | 5 ---
.../changes/ChangedObjectsServiceInternal.java | 45 ++++++++++----------
.../services/metrics/MetricsServiceDefault.java | 18 +++++---
.../PublishingServiceInternalDefault.java | 2 +-
.../system/transaction/IsisTransaction.java | 9 +++-
.../transaction/WithTransactionScope.java | 27 ++++++++++++
.../service/support/TimestampService.java | 8 ++--
.../org/apache/isis/schema/ixn/ixn-1.0.xsd | 6 ---
15 files changed, 81 insertions(+), 103 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/adocs/documentation/src/main/asciidoc/guides/_rgcms_schema-ixn.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgcms_schema-ixn.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgcms_schema-ixn.adoc
index 6acacd0..6aa0e94 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rgcms_schema-ixn.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rgcms_schema-ixn.adoc
@@ -187,8 +187,6 @@ The schema also defines a small number of supporting types:
<xs:sequence>
<xs:element name="loaded" type="com:differenceDto"/>
<xs:element name="dirtied" type="com:differenceDto"/>
- <xs:element name="propertiesModified"
- type="com:differenceDto"/>
</xs:sequence>
</xs:complexType>
@@ -203,9 +201,8 @@ The schema also defines a small number of supporting types:
----
<1> the `metricsDto` captures the time to perform an execution, and also the differences in various object counts.
<2> the `objectCountsDto` complex type is the set of before/after differences, one for each execution; the framework
-tracks number of objects loaded (read from) the database, the number of objects dirtied (will need to be saved back
-to the database), and the number of properties across all objects that changed. Together these metrics give an idea of
-the "size" of this particular execution.
+tracks number of objects loaded (read from) the database and the number of objects dirtied (will need to be saved back
+to the database). Together these metrics give an idea of the "size" of this particular execution.
<3> the `exceptionDto` complex type defines a structure for capturing the stack trace of any exception that might occur
in the course of invoking an action or editing a property.
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd
index 3527234..77a733e 100644
--- a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd
@@ -197,12 +197,6 @@
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="propertiesModified" type="com:differenceDto">
- <xs:annotation>
- <xs:documentation>The number of individual properties of objects that were modified (each such change would correspond to a separate call to AuditingService if configured).
- </xs:documentation>
- </xs:annotation>
- </xs:element>
</xs:sequence>
</xs:complexType>
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd
index 3527234..77a733e 100644
--- a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn.xsd
@@ -197,12 +197,6 @@
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="propertiesModified" type="com:differenceDto">
- <xs:annotation>
- <xs:documentation>The number of individual properties of objects that were modified (each such change would correspond to a separate call to AuditingService if configured).
- </xs:documentation>
- </xs:annotation>
- </xs:element>
</xs:sequence>
</xs:complexType>
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/core/applib/pom.xml
----------------------------------------------------------------------
diff --git a/core/applib/pom.xml b/core/applib/pom.xml
index a38461c..27c2239 100644
--- a/core/applib/pom.xml
+++ b/core/applib/pom.xml
@@ -102,8 +102,8 @@
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>transaction-api</artifactId>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/core/applib/src/main/java/org/apache/isis/applib/services/iactn/Interaction.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/iactn/Interaction.java b/core/applib/src/main/java/org/apache/isis/applib/services/iactn/Interaction.java
index dbf7083..5a70c18 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/iactn/Interaction.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/iactn/Interaction.java
@@ -549,8 +549,7 @@ public class Interaction implements HasTransactionId {
final Execution<?, ?> execution,
final Timestamp timestamp,
final int numberObjectsLoaded,
- final int numberObjectsDirtied,
- final int numberObjectPropertiesModified) {
+ final int numberObjectsDirtied) {
execution.startedAt = timestamp;
@@ -562,7 +561,6 @@ public class Interaction implements HasTransactionId {
final ObjectCountsDto objectCountsDto = objectCountsFor(metricsDto);
numberObjectsLoadedFor(objectCountsDto).setBefore(numberObjectsLoaded);
numberObjectsDirtiedFor(objectCountsDto).setBefore(numberObjectsDirtied);
- numberObjectPropertiesModifiedFor(objectCountsDto).setBefore(numberObjectPropertiesModified);
}
},
@@ -571,8 +569,7 @@ public class Interaction implements HasTransactionId {
final Execution<?, ?> execution,
final Timestamp timestamp,
final int numberObjectsLoaded,
- final int numberObjectsDirtied,
- final int numberObjectPropertiesModified) {
+ final int numberObjectsDirtied) {
execution.completedAt = timestamp;
@@ -584,16 +581,11 @@ public class Interaction implements HasTransactionId {
final ObjectCountsDto objectCountsDto = objectCountsFor(metricsDto);
numberObjectsLoadedFor(objectCountsDto).setAfter(numberObjectsLoaded);
numberObjectsDirtiedFor(objectCountsDto).setAfter(numberObjectsDirtied);
- numberObjectPropertiesModifiedFor(objectCountsDto).setAfter(numberObjectPropertiesModified);
-
}
};
//region > helpers
- private static DifferenceDto numberObjectPropertiesModifiedFor(final ObjectCountsDto objectCountsDto) {
- return MemberExecutionDtoUtils.numberObjectPropertiesModifiedFor(objectCountsDto);
- }
private static DifferenceDto numberObjectsDirtiedFor(final ObjectCountsDto objectCountsDto) {
return MemberExecutionDtoUtils.numberObjectsDirtiedFor(objectCountsDto);
@@ -617,20 +609,18 @@ public class Interaction implements HasTransactionId {
//endregion
abstract void syncMetrics(
- final Execution<?,?> teExecution,
+ final Execution<?, ?> teExecution,
final Timestamp timestamp,
final int numberObjectsLoaded,
- final int numberObjectsDirtied,
- final int numberObjectPropertiesModified);
+ final int numberObjectsDirtied);
}
private void syncMetrics(final When when, final Timestamp timestamp) {
final MetricsService metricsService = interaction.metricsService;
final int numberObjectsLoaded = metricsService.numberObjectsLoaded();
final int numberObjectsDirtied = metricsService.numberObjectsDirtied();
- final int numberObjectPropertiesModified = metricsService.numberObjectPropertiesModified();
- when.syncMetrics(this, timestamp, numberObjectsLoaded, numberObjectsDirtied, numberObjectPropertiesModified);
+ when.syncMetrics(this, timestamp, numberObjectsLoaded, numberObjectsDirtied);
}
//endregion
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/core/applib/src/main/java/org/apache/isis/applib/services/metrics/MetricsService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/metrics/MetricsService.java b/core/applib/src/main/java/org/apache/isis/applib/services/metrics/MetricsService.java
index 4404418..2460d23 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/metrics/MetricsService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/metrics/MetricsService.java
@@ -61,19 +61,6 @@ public interface MetricsService {
@Programmatic
int numberObjectsDirtied();
- /**
- * The number of individual properties of objects that were modified; a good measure of the amount of work being done in the interaction.
- *
- * <p>
- * Related to {@link #numberObjectsDirtied()}, corresponds to the number of times that {@link org.apache.isis.applib.services.audit.AuditingService3#audit(UUID, String, Bookmark, String, String, String, String, String, Timestamp)} would be called if the transaction were to complete.
- * </p>
- *
- * <p>
- * Is captured within {@link MemberExecutionDto#getMetrics()} (accessible from {@link InteractionContext#getInteraction()}).
- * </p>
- */
- @Programmatic
- int numberObjectPropertiesModified();
}
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/core/applib/src/main/java/org/apache/isis/schema/utils/MemberExecutionDtoUtils.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/schema/utils/MemberExecutionDtoUtils.java b/core/applib/src/main/java/org/apache/isis/schema/utils/MemberExecutionDtoUtils.java
index f1309f5..121ea92 100644
--- a/core/applib/src/main/java/org/apache/isis/schema/utils/MemberExecutionDtoUtils.java
+++ b/core/applib/src/main/java/org/apache/isis/schema/utils/MemberExecutionDtoUtils.java
@@ -110,12 +110,4 @@ public final class MemberExecutionDtoUtils {
}
return differenceDto;
}
- public static DifferenceDto numberObjectPropertiesModifiedFor(final ObjectCountsDto objectCountsDto) {
- DifferenceDto differenceDto = objectCountsDto.getPropertiesModified();
- if(differenceDto == null) {
- differenceDto = new DifferenceDto();
- objectCountsDto.setPropertiesModified(differenceDto);
- }
- return differenceDto;
- }
}
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 611c6bb..6564bf4 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -1891,11 +1891,6 @@ ${license.additional-notes}
<artifactId>validation-api</artifactId>
<version>${validation-api.version}</version>
</dependency>
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>transaction-api</artifactId>
- <version>${transaction-api.version}</version>
- </dependency>
<!-- DataNucleus -->
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/core/runtime/src/main/java/org/apache/isis/core/runtime/services/changes/ChangedObjectsServiceInternal.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/changes/ChangedObjectsServiceInternal.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/changes/ChangedObjectsServiceInternal.java
index 8001b6b..f450729 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/changes/ChangedObjectsServiceInternal.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/changes/ChangedObjectsServiceInternal.java
@@ -25,7 +25,6 @@ import java.util.Set;
import javax.enterprise.context.RequestScoped;
import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -38,10 +37,11 @@ import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
import org.apache.isis.core.metamodel.spec.feature.Contributed;
import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
import org.apache.isis.core.runtime.system.transaction.IsisTransaction;
+import org.apache.isis.core.runtime.system.transaction.WithTransactionScope;
@DomainService(nature = NatureOfService.DOMAIN)
@RequestScoped
-public class ChangedObjectsServiceInternal {
+public class ChangedObjectsServiceInternal implements WithTransactionScope {
/**
* Used for auditing: this contains the pre- values of every property of every object enlisted.
@@ -209,19 +209,9 @@ public class ChangedObjectsServiceInternal {
return previous == null;
}
-
- @Programmatic
- public boolean hasChangedAdapters() {
- final Set<Map.Entry<AdapterAndProperty, PreAndPostValues>> changedObjectProperties = getChangedObjectProperties();
-
- final Set<ObjectAdapter> changedAdapters = Sets.newHashSet(
- Iterables.transform(
- changedObjectProperties,
- AdapterAndProperty.Functions.GET_ADAPTER)
- );
- return !changedAdapters.isEmpty();
- }
-
+ /**
+ * Intended to be called at the end of the transaction. Use {@link #resetForNextTransaction()} once fully read.
+ */
@Programmatic
public Set<Map.Entry<AdapterAndProperty, PreAndPostValues>> getChangedObjectProperties() {
return changedObjectProperties != null
@@ -257,12 +247,6 @@ public class ChangedObjectsServiceInternal {
Sets.filter(processedObjectProperties1.entrySet(), PreAndPostValues.Predicates.CHANGED));
}
- @Programmatic
- public void clearChangedObjectProperties() {
- enlistedObjectProperties.clear();
- changedObjectProperties = null;
- }
-
private static final Predicate<ObjectAdapter> IS_TRANSACTION_ID = new Predicate<ObjectAdapter>() {
@Override
public boolean apply(ObjectAdapter input) {
@@ -285,9 +269,26 @@ public class ChangedObjectsServiceInternal {
return changeKindByEnlistedAdapter.size();
}
+ /**
+ * Must be called only after {@link #getChangedObjectProperties()} has been called at least once.
+ */
@Programmatic
public int numberObjectPropertiesModified() {
- return enlistedObjectProperties.size();
+ if(changedObjectProperties == null) {
+ throw new IllegalStateException("getChangedObjectProperties() has not yet been called");
+ }
+ return changedObjectProperties.size();
+ }
+
+ /**
+ * Intended to be called at the end of a transaction. (This service really ought to be considered
+ * a transaction-scoped service; since that isn't yet supported by the framework, we have to manually reset).
+ */
+ @Override
+ @Programmatic
+ public void resetForNextTransaction() {
+ enlistedObjectProperties.clear();
+ changedObjectProperties = null;
}
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/core/runtime/src/main/java/org/apache/isis/core/runtime/services/metrics/MetricsServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/metrics/MetricsServiceDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/metrics/MetricsServiceDefault.java
index f06c81d..604e097 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/metrics/MetricsServiceDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/metrics/MetricsServiceDefault.java
@@ -31,10 +31,11 @@ import org.apache.isis.applib.annotation.NatureOfService;
import org.apache.isis.applib.annotation.Programmatic;
import org.apache.isis.applib.services.metrics.MetricsService;
import org.apache.isis.core.runtime.services.changes.ChangedObjectsServiceInternal;
+import org.apache.isis.core.runtime.system.transaction.WithTransactionScope;
@RequestScoped
@DomainService(nature = NatureOfService.DOMAIN)
-public class MetricsServiceDefault implements MetricsService, InstanceLifecycleListener, LoadLifecycleListener {
+public class MetricsServiceDefault implements MetricsService, InstanceLifecycleListener, LoadLifecycleListener, WithTransactionScope {
private AtomicInteger numberLoaded = new AtomicInteger(0);
@@ -48,20 +49,23 @@ public class MetricsServiceDefault implements MetricsService, InstanceLifecycleL
return changedObjectsServiceInternal.numberObjectsDirtied();
}
- @Override
- public int numberObjectPropertiesModified() {
- return changedObjectsServiceInternal.numberObjectPropertiesModified();
- }
-
@Programmatic
@Override
public void postLoad(final InstanceLifecycleEvent event) {
numberLoaded.incrementAndGet();
}
+ /**
+ * Intended to be called at the end of a transaction. (This service really ought to be considered
+ * a transaction-scoped service; since that isn't yet supported by the framework, we have to manually reset).
+ */
+ @Programmatic
+ @Override
+ public void resetForNextTransaction() {
+ numberLoaded.set(0);
+ }
@Inject
ChangedObjectsServiceInternal changedObjectsServiceInternal;
-
}
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java
index 3d570b8..c063506 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/publish/PublishingServiceInternalDefault.java
@@ -183,7 +183,7 @@ public class PublishingServiceInternalDefault implements PublishingServiceIntern
}
final int numberLoaded = metricsService.numberObjectsLoaded();
- final int numberObjectPropertiesModified = metricsService.numberObjectPropertiesModified();
+ final int numberObjectPropertiesModified = changedObjectsServiceInternal.numberObjectPropertiesModified();
final PublishedObjects publishedObjects = newPublishedObjects(numberLoaded, numberObjectPropertiesModified,
changeKindByPublishedAdapter);
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/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 98535f7..c79977b 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
@@ -27,6 +27,7 @@ import com.google.common.collect.Lists;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.apache.isis.applib.services.metrics.MetricsService;
import org.apache.isis.core.commons.authentication.AuthenticationSession;
import org.apache.isis.core.commons.authentication.MessageBroker;
import org.apache.isis.core.commons.components.TransactionScopedComponent;
@@ -172,6 +173,7 @@ public class IsisTransaction implements TransactionScopedComponent {
private final PublishingServiceInternal publishingServiceInternal;
private final AuditingServiceInternal auditingServiceInternal;
private final ChangedObjectsServiceInternal changedObjectsServiceInternal;
+ private final MetricsService metricsService;
private final UUID transactionId;
@@ -194,7 +196,7 @@ public class IsisTransaction implements TransactionScopedComponent {
this.publishingServiceInternal = lookupService(PublishingServiceInternal.class);
this.auditingServiceInternal = lookupService(AuditingServiceInternal.class);
this.changedObjectsServiceInternal = lookupService(ChangedObjectsServiceInternal.class);
-
+ this.metricsService = lookupService(MetricsService.class);
this.transactionId = transactionId;
@@ -411,7 +413,10 @@ public class IsisTransaction implements TransactionScopedComponent {
setAbortCause(new IsisTransactionManagerException(ex));
throw ex;
} finally {
- changedObjectsServiceInternal.clearChangedObjectProperties();
+ changedObjectsServiceInternal.resetForNextTransaction();
+ if(metricsService instanceof WithTransactionScope) {
+ ((WithTransactionScope) metricsService).resetForNextTransaction();
+ }
}
}
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/WithTransactionScope.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/WithTransactionScope.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/WithTransactionScope.java
new file mode 100644
index 0000000..c0b156a
--- /dev/null
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/transaction/WithTransactionScope.java
@@ -0,0 +1,27 @@
+/*
+ * 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.system.transaction;
+
+/**
+ * Hacky workaround since we don't currently support @TransactionScoped.
+ */
+public interface WithTransactionScope {
+ void resetForNextTransaction();
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/TimestampService.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/TimestampService.java b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/TimestampService.java
index fb18cfe..b270f39 100644
--- a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/TimestampService.java
+++ b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/TimestampService.java
@@ -22,7 +22,6 @@ import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.jdo.listener.InstanceLifecycleEvent;
-import org.apache.isis.applib.DomainObjectContainer;
import org.apache.isis.applib.annotation.DomainService;
import org.apache.isis.applib.annotation.NatureOfService;
import org.apache.isis.applib.annotation.Programmatic;
@@ -30,6 +29,7 @@ import org.apache.isis.applib.services.clock.ClockService;
import org.apache.isis.applib.services.jdosupport.IsisJdoSupport;
import org.apache.isis.applib.services.timestamp.HoldsUpdatedAt;
import org.apache.isis.applib.services.timestamp.HoldsUpdatedBy;
+import org.apache.isis.applib.services.user.UserService;
@RequestScoped
@DomainService(
@@ -54,11 +54,9 @@ public class TimestampService implements
final Object pi = event.getPersistentInstance();
if(pi instanceof org.datanucleus.enhancement.Persistable) {
- boolean isPersistent =
- ((org.datanucleus.enhancement.Persistable)pi).dnIsPersistent();
if(pi instanceof HoldsUpdatedBy) {
- ((HoldsUpdatedBy)pi).setUpdatedBy(container.getUser().getName());
+ ((HoldsUpdatedBy)pi).setUpdatedBy(userService.getUser().getName());
}
if(pi instanceof HoldsUpdatedAt) {
((HoldsUpdatedAt)pi).setUpdatedAt(clockService.nowAsJavaSqlTimestamp());
@@ -72,7 +70,7 @@ public class TimestampService implements
}
@Inject
- DomainObjectContainer container;
+ UserService userService;
@Inject
ClockService clockService;
http://git-wip-us.apache.org/repos/asf/isis/blob/ad9cec42/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.0.xsd
----------------------------------------------------------------------
diff --git a/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.0.xsd b/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.0.xsd
index 359eca0..53afb2d 100644
--- a/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.0.xsd
+++ b/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.0.xsd
@@ -197,12 +197,6 @@
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="propertiesModified" type="com:differenceDto">
- <xs:annotation>
- <xs:documentation>The number of individual properties of objects that were modified (each such change would correspond to a separate call to AuditingService if configured).
- </xs:documentation>
- </xs:annotation>
- </xs:element>
</xs:sequence>
</xs:complexType>