This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-3110
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/ISIS-3110 by this push:
     new 2010ddb753 ISIS-3110: don't log queries in the command log
2010ddb753 is described below

commit 2010ddb7535a1b7246b04055c27cc2e318975989
Author: Dan Haywood <[email protected]>
AuthorDate: Thu Aug 4 12:33:29 2022 +0100

    ISIS-3110: don't log queries in the command log
---
 .../isis/extensions/commandlog/applib/dom/CommandLogEntry.java     | 1 +
 .../applib/subscriber/CommandSubscriberForCommandLog.java          | 7 +++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntry.java
 
b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntry.java
index e865155e06..3e1bedd8c3 100644
--- 
a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntry.java
+++ 
b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntry.java
@@ -635,6 +635,7 @@ implements Comparable<CommandLogEntry>, DomainChangeRecord, 
HasCommandDto {
         return stringifier.toString(this);
     }
 
+    @Programmatic
     public CommandOutcomeHandler outcomeHandler() {
         return new CommandOutcomeHandler() {
             @Override
diff --git 
a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/subscriber/CommandSubscriberForCommandLog.java
 
b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/subscriber/CommandSubscriberForCommandLog.java
index 356df758ff..3344bdc1cd 100644
--- 
a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/subscriber/CommandSubscriberForCommandLog.java
+++ 
b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/subscriber/CommandSubscriberForCommandLog.java
@@ -51,10 +51,9 @@ public class CommandSubscriberForCommandLog implements 
CommandSubscriber {
     @Override
     public void onCompleted(final Command command) {
 
-        // TODO: JPA does not yet support lifecycle listeners, so always would 
be false.
-//        if(!command.isSystemStateChanged()) {
-//            return;
-//        }
+        if(!command.isSystemStateChanged()) {
+            return;
+        }
 
         val existingCommandJdoIfAny =
                 
commandLogEntryRepository.findByInteractionId(command.getInteractionId());

Reply via email to