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

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


The following commit(s) were added to refs/heads/ISIS-3002 by this push:
     new 6fc8266f9e ISIS-3002: integ test for command log; demo app dependencies
6fc8266f9e is described below

commit 6fc8266f9ea8964742ef229df88e838a0e9cc6e0
Author: Dan Haywood <[email protected]>
AuthorDate: Tue Jul 12 23:18:08 2022 +0100

    ISIS-3002: integ test for command log; demo app dependencies
---
 .../src/main/java/demoapp/dom/DemoModuleJdo.java   |  4 +-
 .../src/main/java/demoapp/dom/DemoModuleJpa.java   |  4 +-
 .../integtest/CommandLogIntegTestAbstract.java     | 72 ++++++++++++++++++++
 .../commandlog/persistence-jdo/log4j2-test.xml     | 78 ++++++++++++++++++++++
 extensions/core/commandlog/persistence-jdo/pom.xml |  7 ++
 ... => IsisModuleExtCommandLogPersistenceJdo.java} |  2 +-
 .../jdo/dom/CommandLogEntryRepository.java         |  4 +-
 .../commandlog/jdo/CommandLog_IntegTest.java       | 44 +++++++-----
 .../commandlog/persistence-jpa/log4j2-test.xml     | 78 ++++++++++++++++++++++
 extensions/core/commandlog/persistence-jpa/pom.xml |  9 ++-
 ... => IsisModuleExtCommandLogPersistenceJpa.java} |  2 +-
 .../jpa/dom/CommandLogEntryRepository.java         | 35 +---------
 .../commandlog/jpa/CommandLog_IntegTest.java       | 44 +++++++-----
 extensions/core/commandlog/pom.xml                 |  7 ++
 14 files changed, 316 insertions(+), 74 deletions(-)

diff --git a/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJdo.java 
b/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJdo.java
index a57d43bbad..a2b8a1321a 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJdo.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJdo.java
@@ -25,7 +25,7 @@ import org.springframework.context.annotation.PropertySource;
 import org.springframework.context.annotation.PropertySources;
 
 import org.apache.isis.core.config.presets.IsisPresets;
-import org.apache.isis.extensions.commandlog.jdo.IsisModuleExtCommandLogJdo;
+import 
org.apache.isis.extensions.commandlog.jdo.IsisModuleExtCommandLogPersistenceJdo;
 import 
org.apache.isis.persistence.jdo.datanucleus.IsisModulePersistenceJdoDatanucleus;
 
 @Configuration
@@ -33,7 +33,7 @@ import 
org.apache.isis.persistence.jdo.datanucleus.IsisModulePersistenceJdoDatan
 @Import({
     DemoModuleCommon.class,
     IsisModulePersistenceJdoDatanucleus.class,
-    IsisModuleExtCommandLogJdo.class,
+    IsisModuleExtCommandLogPersistenceJdo.class,
 })
 @PropertySources({
     @PropertySource(IsisPresets.DatanucleusAutocreateNoValidate),
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJpa.java 
b/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJpa.java
index 996f8a5b86..bb3ad8b134 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJpa.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJpa.java
@@ -23,7 +23,7 @@ import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Import;
 import org.springframework.context.annotation.Profile;
 
-import org.apache.isis.extensions.commandlog.jpa.IsisModuleExtCommandLogJpa;
+import 
org.apache.isis.extensions.commandlog.jpa.IsisModuleExtCommandLogPersistenceJpa;
 import 
org.apache.isis.persistence.jpa.eclipselink.IsisModulePersistenceJpaEclipselink;
 
 import 
demoapp.dom.domain.actions.Action.commandPublishing.jpa.ActionCommandPublishingJpa;
@@ -86,7 +86,7 @@ import 
demoapp.dom.types.primitive.shorts.jpa.PrimitiveShortJpa;
 @Import({
     DemoModuleCommon.class,
     IsisModulePersistenceJpaEclipselink.class,
-    IsisModuleExtCommandLogJpa.class,
+    IsisModuleExtCommandLogPersistenceJpa.class,
 })
 @EntityScan(basePackageClasses = {
 
diff --git 
a/extensions/core/commandlog/applib/src/test/java/org/apache/isis/extensions/commandlog/applib/integtest/CommandLogIntegTestAbstract.java
 
b/extensions/core/commandlog/applib/src/test/java/org/apache/isis/extensions/commandlog/applib/integtest/CommandLogIntegTestAbstract.java
new file mode 100644
index 0000000000..38b7082c77
--- /dev/null
+++ 
b/extensions/core/commandlog/applib/src/test/java/org/apache/isis/extensions/commandlog/applib/integtest/CommandLogIntegTestAbstract.java
@@ -0,0 +1,72 @@
+/*
+ *  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.extensions.commandlog.applib.integtest;
+
+import java.sql.Timestamp;
+import java.time.Duration;
+import java.time.Instant;
+import java.util.Date;
+import java.util.List;
+import java.util.Optional;
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.inject.Inject;
+
+import org.assertj.core.api.Assertions;
+import org.eclipse.persistence.logging.SessionLogEntry;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Qualifier;
+
+import org.apache.isis.applib.annotation.Value;
+import org.apache.isis.applib.services.session.SessionLogService;
+import org.apache.isis.applib.services.wrapper.WrapperFactory;
+import org.apache.isis.extensions.commandlog.applib.app.CommandLogMenu;
+import org.apache.isis.extensions.commandlog.applib.dom.CommandLogEntry;
+import 
org.apache.isis.extensions.commandlog.applib.dom.CommandLogEntryRepository;
+import 
org.apache.isis.testing.integtestsupport.applib.IsisIntegrationTestAbstract;
+
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+
+public abstract class CommandLogIntegTestAbstract extends 
IsisIntegrationTestAbstract {
+
+
+
+    @BeforeEach
+    void setUp() {
+    }
+
+    @Test
+    void invoke_mixin() {
+
+        List<CommandLogEntry> notYetReplayed = 
commandLogEntryRepository.findNotYetReplayed();
+
+        wrapperFactory.wrapMixin(CommandLogMenu.truncateLog.class, 
commandLogMenu).act();
+
+        List<CommandLogEntry> notYetReplayedAfter = 
commandLogEntryRepository.findNotYetReplayed();
+
+    }
+
+    @Inject CommandLogMenu commandLogMenu;
+    @Inject CommandLogEntryRepository<CommandLogEntry> 
commandLogEntryRepository;
+    @Inject WrapperFactory wrapperFactory;
+
+}
diff --git a/extensions/core/commandlog/persistence-jdo/log4j2-test.xml 
b/extensions/core/commandlog/persistence-jdo/log4j2-test.xml
new file mode 100644
index 0000000000..0ed7986e24
--- /dev/null
+++ b/extensions/core/commandlog/persistence-jdo/log4j2-test.xml
@@ -0,0 +1,78 @@
+<?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.
+-->
+<Configuration status="WARN">
+       <Properties>
+               <Property name="PID">????</Property>
+               <Property name="LOG_EXCEPTION_CONVERSION_WORD">%xwEx</Property>
+               <Property name="LOG_LEVEL_PATTERN">%5p</Property>
+               <Property name="LOG_DATEFORMAT_PATTERN">yyyy-MM-dd 
HH:mm:ss.SSS</Property>
+               <Property 
name="CONSOLE_LOG_PATTERN">%clr{%d{${LOG_DATEFORMAT_PATTERN}}}{faint} 
%clr{${LOG_LEVEL_PATTERN}} %clr{${sys:PID}}{magenta} %clr{---}{faint} 
%clr{[%15.15t]}{faint} %clr{%-40.40c{1.}}{cyan} %clr{:}{faint} 
%m%n${sys:LOG_EXCEPTION_CONVERSION_WORD}</Property>
+               <Property name="FILE_LOG_PATTERN">%d{${LOG_DATEFORMAT_PATTERN}} 
${LOG_LEVEL_PATTERN} ${sys:PID} --- [%t] %-40.40c{1.} : 
%m%n${sys:LOG_EXCEPTION_CONVERSION_WORD}</Property>
+       </Properties>
+       <Appenders>
+               <Console name="Console" target="SYSTEM_OUT" follow="true">
+                       <PatternLayout pattern="${sys:CONSOLE_LOG_PATTERN}" />
+               </Console>
+       </Appenders>
+       <Loggers>
+               <Logger name="org.apache.catalina.startup.DigesterFactory" 
level="error" />
+               <Logger name="org.apache.catalina.util.LifecycleBase" 
level="error" />
+               <Logger name="org.apache.coyote.http11.Http11NioProtocol" 
level="warn" />
+               <logger name="org.apache.sshd.common.util.SecurityUtils" 
level="warn"/>
+               <Logger name="org.apache.tomcat.util.net.NioSelectorPool" 
level="warn" />
+               <Logger 
name="org.eclipse.jetty.util.component.AbstractLifeCycle" level="error" />
+               <Logger name="org.hibernate.validator.internal.util.Version" 
level="warn" />
+               <logger name="org.springframework.boot.actuate.endpoint.jmx" 
level="warn"/>
+               
+               <logger name="org.apache.directory" level="warn"/>
+               <logger name="org.apache.directory.api.ldap.model.entry.Value" 
level="off"/>
+               
+               <logger name="DataNucleus.Persistence" level="info"/>
+               <logger name="DataNucleus.Transaction" level="info"/>
+               <logger name="DataNucleus.Datastore.Schema" level="info"/>
+               <logger name="DataNucleus.Datastore.Native" level="info"/>
+               
+               <Root level="info">
+                       <AppenderRef ref="Console" />
+               </Root>
+       </Loggers>
+</Configuration>
+
+<!-- # DataNucleus Logging Categories -->
+<!-- DataNucleus.Persistence - All messages relating to the persistence 
process -->
+<!-- DataNucleus.Transaction - All messages relating to transactions -->
+<!-- DataNucleus.Connection - All messages relating to Connections. -->
+<!-- DataNucleus.Query - All messages relating to queries -->
+<!-- DataNucleus.Cache - All messages relating to the DataNucleus Cache -->
+<!-- DataNucleus.MetaData - All messages relating to MetaData -->
+<!-- DataNucleus.Datastore - All general datastore messages -->
+<!-- DataNucleus.Datastore.Schema - All schema related datastore log messages 
-->
+<!-- DataNucleus.Datastore.Persist - All datastore persistence messages -->
+<!-- DataNucleus.Datastore.Retrieve - All datastore retrieval messages -->
+<!-- DataNucleus.Datastore.Native - Log of all 'native' statements sent to the 
datastore -->
+<!-- DataNucleus.General - All general operational messages -->
+<!-- DataNucleus.Lifecycle - All messages relating to object lifecycle changes 
-->
+<!-- DataNucleus.ValueGeneration - All messages relating to value generation 
-->
+<!-- DataNucleus.Enhancer - All messages from the DataNucleus Enhancer. -->
+<!-- DataNucleus.SchemaTool - All messages from DataNucleus SchemaTool -->
+<!-- DataNucleus.JDO - All messages general to JDO -->
+<!-- DataNucleus.JPA - All messages general to JPA -->
+<!-- DataNucleus.JCA - All messages relating to Connector JCA. -->
+<!-- DataNucleus.IDE - Messages from the DataNucleus IDE. -->
\ No newline at end of file
diff --git a/extensions/core/commandlog/persistence-jdo/pom.xml 
b/extensions/core/commandlog/persistence-jdo/pom.xml
index 915899e8e8..062d7a97d1 100644
--- a/extensions/core/commandlog/persistence-jdo/pom.xml
+++ b/extensions/core/commandlog/persistence-jdo/pom.xml
@@ -62,6 +62,13 @@
 
         <!-- TESTING -->
 
+        <dependency>
+            <groupId>org.apache.isis.extensions</groupId>
+            <artifactId>isis-extensions-commandlog-applib</artifactId>
+            <scope>test</scope>
+            <type>test-jar</type>
+        </dependency>
+
                <dependency>
                        <groupId>org.apache.isis.testing</groupId>
                        
<artifactId>isis-testing-unittestsupport-applib</artifactId>
diff --git 
a/extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/IsisModuleExtCommandLogJdo.java
 
b/extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/IsisModuleExtCommandLogPersistenceJdo.java
similarity index 97%
rename from 
extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/IsisModuleExtCommandLogJdo.java
rename to 
extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/IsisModuleExtCommandLogPersistenceJdo.java
index 555781da2a..fd8d6eb703 100644
--- 
a/extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/IsisModuleExtCommandLogJdo.java
+++ 
b/extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/IsisModuleExtCommandLogPersistenceJdo.java
@@ -41,7 +41,7 @@ import 
org.apache.isis.testing.fixtures.applib.teardown.jdo.TeardownFixtureJdoAb
         // entities
         CommandLogEntry.class
 })
-public class IsisModuleExtCommandLogJdo {
+public class IsisModuleExtCommandLogPersistenceJdo {
 
     public static final String NAMESPACE = 
IsisModuleExtCommandLogApplib.NAMESPACE;
     public static final String SCHEMA = IsisModuleExtCommandLogApplib.SCHEMA;
diff --git 
a/extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/dom/CommandLogEntryRepository.java
 
b/extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/dom/CommandLogEntryRepository.java
index 0e47c7bd00..d7c00e30ca 100644
--- 
a/extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/dom/CommandLogEntryRepository.java
+++ 
b/extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/dom/CommandLogEntryRepository.java
@@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Service;
 
 import org.apache.isis.applib.annotation.PriorityPrecedence;
-import org.apache.isis.extensions.commandlog.jdo.IsisModuleExtCommandLogJdo;
+import 
org.apache.isis.extensions.commandlog.jdo.IsisModuleExtCommandLogPersistenceJdo;
 
 /**
  * Provides supporting functionality for querying and persisting
@@ -37,7 +37,7 @@ import 
org.apache.isis.extensions.commandlog.jdo.IsisModuleExtCommandLogJdo;
 public class CommandLogEntryRepository
 extends 
org.apache.isis.extensions.commandlog.applib.dom.CommandLogEntryRepository<CommandLogEntry>
 {
 
-    public static final String LOGICAL_TYPE_NAME = 
IsisModuleExtCommandLogJdo.NAMESPACE + ".CommandLogEntryRepository";
+    public static final String LOGICAL_TYPE_NAME = 
IsisModuleExtCommandLogPersistenceJdo.NAMESPACE + ".CommandLogEntryRepository";
 
     public CommandLogEntryRepository() {
         super(CommandLogEntry.class);
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJdo.java 
b/extensions/core/commandlog/persistence-jdo/src/test/java/org/apache/isis/extensions/commandlog/jdo/CommandLog_IntegTest.java
similarity index 50%
copy from examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJdo.java
copy to 
extensions/core/commandlog/persistence-jdo/src/test/java/org/apache/isis/extensions/commandlog/jdo/CommandLog_IntegTest.java
index a57d43bbad..b69c6aad4d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJdo.java
+++ 
b/extensions/core/commandlog/persistence-jdo/src/test/java/org/apache/isis/extensions/commandlog/jdo/CommandLog_IntegTest.java
@@ -16,28 +16,40 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package demoapp.dom;
+package org.apache.isis.extensions.commandlog.jdo;
 
-import org.springframework.context.annotation.Configuration;
+import org.springframework.boot.SpringBootConfiguration;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.context.annotation.Import;
-import org.springframework.context.annotation.Profile;
 import org.springframework.context.annotation.PropertySource;
 import org.springframework.context.annotation.PropertySources;
+import org.springframework.test.context.ActiveProfiles;
 
 import org.apache.isis.core.config.presets.IsisPresets;
-import org.apache.isis.extensions.commandlog.jdo.IsisModuleExtCommandLogJdo;
-import 
org.apache.isis.persistence.jdo.datanucleus.IsisModulePersistenceJdoDatanucleus;
+import org.apache.isis.core.runtimeservices.IsisModuleCoreRuntimeServices;
+import 
org.apache.isis.extensions.commandlog.applib.integtest.CommandLogIntegTestAbstract;
+import org.apache.isis.security.bypass.IsisModuleSecurityBypass;
+
+@SpringBootTest(
+        classes = CommandLog_IntegTest.AppManifest.class
+)
+@ActiveProfiles("test")
+public class CommandLog_IntegTest extends CommandLogIntegTestAbstract {
+
+
+    @SpringBootConfiguration
+    @EnableAutoConfiguration
+    @Import({
+            IsisModuleCoreRuntimeServices.class,
+            IsisModuleSecurityBypass.class,
+            IsisModuleExtCommandLogPersistenceJdo.class,
+    })
+    @PropertySources({
+            @PropertySource(IsisPresets.UseLog4j2Test),
+    })
+    public static class AppManifest {
+    }
 
-@Configuration
-@Profile("demo-jdo")
-@Import({
-    DemoModuleCommon.class,
-    IsisModulePersistenceJdoDatanucleus.class,
-    IsisModuleExtCommandLogJdo.class,
-})
-@PropertySources({
-    @PropertySource(IsisPresets.DatanucleusAutocreateNoValidate),
-})
-public class DemoModuleJdo {
 
 }
diff --git a/extensions/core/commandlog/persistence-jpa/log4j2-test.xml 
b/extensions/core/commandlog/persistence-jpa/log4j2-test.xml
new file mode 100644
index 0000000000..0ed7986e24
--- /dev/null
+++ b/extensions/core/commandlog/persistence-jpa/log4j2-test.xml
@@ -0,0 +1,78 @@
+<?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.
+-->
+<Configuration status="WARN">
+       <Properties>
+               <Property name="PID">????</Property>
+               <Property name="LOG_EXCEPTION_CONVERSION_WORD">%xwEx</Property>
+               <Property name="LOG_LEVEL_PATTERN">%5p</Property>
+               <Property name="LOG_DATEFORMAT_PATTERN">yyyy-MM-dd 
HH:mm:ss.SSS</Property>
+               <Property 
name="CONSOLE_LOG_PATTERN">%clr{%d{${LOG_DATEFORMAT_PATTERN}}}{faint} 
%clr{${LOG_LEVEL_PATTERN}} %clr{${sys:PID}}{magenta} %clr{---}{faint} 
%clr{[%15.15t]}{faint} %clr{%-40.40c{1.}}{cyan} %clr{:}{faint} 
%m%n${sys:LOG_EXCEPTION_CONVERSION_WORD}</Property>
+               <Property name="FILE_LOG_PATTERN">%d{${LOG_DATEFORMAT_PATTERN}} 
${LOG_LEVEL_PATTERN} ${sys:PID} --- [%t] %-40.40c{1.} : 
%m%n${sys:LOG_EXCEPTION_CONVERSION_WORD}</Property>
+       </Properties>
+       <Appenders>
+               <Console name="Console" target="SYSTEM_OUT" follow="true">
+                       <PatternLayout pattern="${sys:CONSOLE_LOG_PATTERN}" />
+               </Console>
+       </Appenders>
+       <Loggers>
+               <Logger name="org.apache.catalina.startup.DigesterFactory" 
level="error" />
+               <Logger name="org.apache.catalina.util.LifecycleBase" 
level="error" />
+               <Logger name="org.apache.coyote.http11.Http11NioProtocol" 
level="warn" />
+               <logger name="org.apache.sshd.common.util.SecurityUtils" 
level="warn"/>
+               <Logger name="org.apache.tomcat.util.net.NioSelectorPool" 
level="warn" />
+               <Logger 
name="org.eclipse.jetty.util.component.AbstractLifeCycle" level="error" />
+               <Logger name="org.hibernate.validator.internal.util.Version" 
level="warn" />
+               <logger name="org.springframework.boot.actuate.endpoint.jmx" 
level="warn"/>
+               
+               <logger name="org.apache.directory" level="warn"/>
+               <logger name="org.apache.directory.api.ldap.model.entry.Value" 
level="off"/>
+               
+               <logger name="DataNucleus.Persistence" level="info"/>
+               <logger name="DataNucleus.Transaction" level="info"/>
+               <logger name="DataNucleus.Datastore.Schema" level="info"/>
+               <logger name="DataNucleus.Datastore.Native" level="info"/>
+               
+               <Root level="info">
+                       <AppenderRef ref="Console" />
+               </Root>
+       </Loggers>
+</Configuration>
+
+<!-- # DataNucleus Logging Categories -->
+<!-- DataNucleus.Persistence - All messages relating to the persistence 
process -->
+<!-- DataNucleus.Transaction - All messages relating to transactions -->
+<!-- DataNucleus.Connection - All messages relating to Connections. -->
+<!-- DataNucleus.Query - All messages relating to queries -->
+<!-- DataNucleus.Cache - All messages relating to the DataNucleus Cache -->
+<!-- DataNucleus.MetaData - All messages relating to MetaData -->
+<!-- DataNucleus.Datastore - All general datastore messages -->
+<!-- DataNucleus.Datastore.Schema - All schema related datastore log messages 
-->
+<!-- DataNucleus.Datastore.Persist - All datastore persistence messages -->
+<!-- DataNucleus.Datastore.Retrieve - All datastore retrieval messages -->
+<!-- DataNucleus.Datastore.Native - Log of all 'native' statements sent to the 
datastore -->
+<!-- DataNucleus.General - All general operational messages -->
+<!-- DataNucleus.Lifecycle - All messages relating to object lifecycle changes 
-->
+<!-- DataNucleus.ValueGeneration - All messages relating to value generation 
-->
+<!-- DataNucleus.Enhancer - All messages from the DataNucleus Enhancer. -->
+<!-- DataNucleus.SchemaTool - All messages from DataNucleus SchemaTool -->
+<!-- DataNucleus.JDO - All messages general to JDO -->
+<!-- DataNucleus.JPA - All messages general to JPA -->
+<!-- DataNucleus.JCA - All messages relating to Connector JCA. -->
+<!-- DataNucleus.IDE - Messages from the DataNucleus IDE. -->
\ No newline at end of file
diff --git a/extensions/core/commandlog/persistence-jpa/pom.xml 
b/extensions/core/commandlog/persistence-jpa/pom.xml
index 62709c7145..634085fcd3 100644
--- a/extensions/core/commandlog/persistence-jpa/pom.xml
+++ b/extensions/core/commandlog/persistence-jpa/pom.xml
@@ -62,7 +62,14 @@
 
         <!-- TESTING -->
 
-               <dependency>
+        <dependency>
+            <groupId>org.apache.isis.extensions</groupId>
+            <artifactId>isis-extensions-commandlog-applib</artifactId>
+            <scope>test</scope>
+            <type>test-jar</type>
+        </dependency>
+
+        <dependency>
                        <groupId>org.apache.isis.testing</groupId>
                        
<artifactId>isis-testing-unittestsupport-applib</artifactId>
             <scope>test</scope>
diff --git 
a/extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/IsisModuleExtCommandLogJpa.java
 
b/extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/IsisModuleExtCommandLogPersistenceJpa.java
similarity index 97%
rename from 
extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/IsisModuleExtCommandLogJpa.java
rename to 
extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/IsisModuleExtCommandLogPersistenceJpa.java
index 66ab0eaa20..9260c5707c 100644
--- 
a/extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/IsisModuleExtCommandLogJpa.java
+++ 
b/extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/IsisModuleExtCommandLogPersistenceJpa.java
@@ -43,7 +43,7 @@ import 
org.apache.isis.extensions.commandlog.jpa.dom.CommandLogEntryRepository;
 @EntityScan(basePackageClasses = {
     CommandLogEntry.class,
 })
-public class IsisModuleExtCommandLogJpa {
+public class IsisModuleExtCommandLogPersistenceJpa {
 
     public static final String NAMESPACE = 
IsisModuleExtCommandLogApplib.NAMESPACE;
     public static final String SCHEMA = IsisModuleExtCommandLogApplib.SCHEMA;
diff --git 
a/extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/dom/CommandLogEntryRepository.java
 
b/extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/dom/CommandLogEntryRepository.java
index 155c66ccfd..409b1c50b1 100644
--- 
a/extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/dom/CommandLogEntryRepository.java
+++ 
b/extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/dom/CommandLogEntryRepository.java
@@ -18,44 +18,13 @@
  */
 package org.apache.isis.extensions.commandlog.jpa.dom;
 
-import java.sql.Timestamp;
-import java.time.Instant;
-import java.time.LocalDate;
-import java.time.ZoneId;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Optional;
-import java.util.UUID;
-
-import javax.inject.Inject;
 import javax.inject.Named;
-import javax.inject.Provider;
 
 import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.lang.Nullable;
 import org.springframework.stereotype.Service;
 
 import org.apache.isis.applib.annotation.PriorityPrecedence;
-import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.jaxb.JavaSqlXMLGregorianCalendarMarshalling;
-import org.apache.isis.applib.query.Query;
-import org.apache.isis.applib.query.QueryRange;
-import org.apache.isis.applib.services.bookmark.Bookmark;
-import org.apache.isis.applib.services.command.Command;
-import org.apache.isis.applib.services.iactn.InteractionProvider;
-import org.apache.isis.applib.services.repository.RepositoryService;
-import org.apache.isis.applib.util.schema.CommandDtoUtils;
-import org.apache.isis.extensions.commandlog.applib.dom.ReplayState;
-import org.apache.isis.extensions.commandlog.jpa.IsisModuleExtCommandLogJpa;
-import org.apache.isis.schema.cmd.v2.CommandDto;
-import org.apache.isis.schema.cmd.v2.CommandsDto;
-import org.apache.isis.schema.cmd.v2.MapDto;
-import org.apache.isis.schema.common.v2.InteractionType;
-import org.apache.isis.schema.common.v2.OidDto;
-
-import lombok.RequiredArgsConstructor;
-import lombok.val;
+import 
org.apache.isis.extensions.commandlog.jpa.IsisModuleExtCommandLogPersistenceJpa;
 
 /**
  * Provides supporting functionality for querying and persisting
@@ -68,7 +37,7 @@ import lombok.val;
 public class CommandLogEntryRepository
 extends 
org.apache.isis.extensions.commandlog.applib.dom.CommandLogEntryRepository<CommandLogEntry>
 {
 
-    public static final String LOGICAL_TYPE_NAME = 
IsisModuleExtCommandLogJpa.NAMESPACE + ".CommandLogEntryRepository";
+    public static final String LOGICAL_TYPE_NAME = 
IsisModuleExtCommandLogPersistenceJpa.NAMESPACE + ".CommandLogEntryRepository";
 
     public CommandLogEntryRepository() {
         super(CommandLogEntry.class);
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJdo.java 
b/extensions/core/commandlog/persistence-jpa/src/test/java/org/apache/isis/extensions/commandlog/jpa/CommandLog_IntegTest.java
similarity index 50%
copy from examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJdo.java
copy to 
extensions/core/commandlog/persistence-jpa/src/test/java/org/apache/isis/extensions/commandlog/jpa/CommandLog_IntegTest.java
index a57d43bbad..a96e609809 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleJdo.java
+++ 
b/extensions/core/commandlog/persistence-jpa/src/test/java/org/apache/isis/extensions/commandlog/jpa/CommandLog_IntegTest.java
@@ -16,28 +16,40 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package demoapp.dom;
+package org.apache.isis.extensions.commandlog.jpa;
 
-import org.springframework.context.annotation.Configuration;
+import org.springframework.boot.SpringBootConfiguration;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.context.annotation.Import;
-import org.springframework.context.annotation.Profile;
 import org.springframework.context.annotation.PropertySource;
 import org.springframework.context.annotation.PropertySources;
+import org.springframework.test.context.ActiveProfiles;
 
 import org.apache.isis.core.config.presets.IsisPresets;
-import org.apache.isis.extensions.commandlog.jdo.IsisModuleExtCommandLogJdo;
-import 
org.apache.isis.persistence.jdo.datanucleus.IsisModulePersistenceJdoDatanucleus;
+import org.apache.isis.core.runtimeservices.IsisModuleCoreRuntimeServices;
+import 
org.apache.isis.extensions.commandlog.applib.integtest.CommandLogIntegTestAbstract;
+import org.apache.isis.security.bypass.IsisModuleSecurityBypass;
+
+@SpringBootTest(
+        classes = CommandLog_IntegTest.AppManifest.class
+)
+@ActiveProfiles("test")
+public class CommandLog_IntegTest extends CommandLogIntegTestAbstract {
+
+
+    @SpringBootConfiguration
+    @EnableAutoConfiguration
+    @Import({
+            IsisModuleCoreRuntimeServices.class,
+            IsisModuleSecurityBypass.class,
+            IsisModuleExtCommandLogPersistenceJpa.class,
+    })
+    @PropertySources({
+            @PropertySource(IsisPresets.UseLog4j2Test),
+    })
+    public static class AppManifest {
+    }
 
-@Configuration
-@Profile("demo-jdo")
-@Import({
-    DemoModuleCommon.class,
-    IsisModulePersistenceJdoDatanucleus.class,
-    IsisModuleExtCommandLogJdo.class,
-})
-@PropertySources({
-    @PropertySource(IsisPresets.DatanucleusAutocreateNoValidate),
-})
-public class DemoModuleJdo {
 
 }
diff --git a/extensions/core/commandlog/pom.xml 
b/extensions/core/commandlog/pom.xml
index a21e1c054d..aa42900d28 100644
--- a/extensions/core/commandlog/pom.xml
+++ b/extensions/core/commandlog/pom.xml
@@ -34,6 +34,13 @@
                                
<artifactId>isis-extensions-commandlog-applib</artifactId>
                                <version>2.0.0-SNAPSHOT</version>
                        </dependency>
+                       <dependency>
+                               <groupId>org.apache.isis.extensions</groupId>
+                               
<artifactId>isis-extensions-commandlog-applib</artifactId>
+                               <version>2.0.0-SNAPSHOT</version>
+                               <scope>test</scope>
+                               <type>test-jar</type>
+                       </dependency>
                        <dependency>
                                <groupId>org.apache.isis.extensions</groupId>
                                
<artifactId>isis-extensions-commandlog-persistence-jdo</artifactId>

Reply via email to