Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
#115 - factors out a new outbox module, and have 'jdo' module depend …
Browse files Browse the repository at this point in the history
…upon it.

Also adds implementations of InteractionExecutionRepository and PublishedObjectsRepository for OutboxEvent.
  • Loading branch information
danhaywood committed Oct 1, 2019
1 parent 230cf5a commit 3417c63
Show file tree
Hide file tree
Showing 44 changed files with 681 additions and 13 deletions.
4 changes: 4 additions & 0 deletions archetype/app/quickstart/appdefn/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-jdo</artifactId>
</dependency>
<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>
<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-jdo</artifactId>
</dependency>
<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>
<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions modules/ext/flywaydb/fixture/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ TODO: to reinstate, think that FixturesManifest needs some attention.
<artifactId>isis-module-publishmq-dom-jdo</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions modules/lib/docx/fixture/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ TODO: to reinstate, think that FixturesManifest needs some attention.
<artifactId>isis-module-publishmq-dom-jdo</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions modules/lib/excel/fixture/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ TODO: to reinstate, think that FixturesManifest needs some attention.
<artifactId>isis-module-publishmq-dom-jdo</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions modules/lib/fakedata/fixture/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ TODO: to reinstate, think that FixturesManifest needs some attention.
<artifactId>isis-module-publishmq-dom-jdo</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions modules/lib/poly/fixture/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ TODO: to reinstate, think that FixturesManifest needs some attention.
<artifactId>isis-module-publishmq-dom-jdo</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions modules/lib/servletapi/fixture/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ TODO: to reinstate, think that FixturesManifest needs some attention.
<artifactId>isis-module-publishmq-dom-jdo</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions modules/lib/stringinterpolator/fixture/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ TODO: to reinstate, think that FixturesManifest needs some attention.
<artifactId>isis-module-publishmq-dom-jdo</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
12 changes: 12 additions & 0 deletions modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,18 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
<version>${incode-platform.version}</version>
</dependency>
<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
<version>${incode-platform.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions modules/spi/audit/fixture/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ TODO: to reinstate, think that FixturesManifest needs some attention.
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-jdo</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>
<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
6 changes: 6 additions & 0 deletions modules/spi/audit/integtests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions modules/spi/command/fixture/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ TODO: to reinstate, think that FixturesManifest needs some attention.
<artifactId>isis-module-publishmq-dom-jdo</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions modules/spi/command/integtests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions modules/spi/publishmq/fixture/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ TODO: to reinstate, think that FixturesManifest needs some attention.
<artifactId>isis-module-publishmq-dom-jdo</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>

<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-mq</artifactId>
Expand Down
9 changes: 8 additions & 1 deletion modules/spi/publishmq/impl/jdo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,15 @@
<dependencies>
<dependency>
<groupId>org.isisaddons.module.publishmq</groupId>
<artifactId>isis-module-publishmq-dom-servicespi</artifactId>
<artifactId>isis-module-publishmq-dom-outbox</artifactId>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-runtime</artifactId>
<!-- to avoid polluting the classpath of any referencing projects -->
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ language governing permissions and limitations under the License.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">

<persistence-unit name="org-isisaddons-module-publishmq-dom">
<persistence-unit name="org-isisaddons-module-publishmq-dom-jdo">
</persistence-unit>
</persistence>
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
package org.isisaddons.module.publishmq.dom.jdo;

import java.util.Set;

import javax.xml.bind.annotation.XmlRootElement;

import com.google.common.collect.Sets;

import org.apache.isis.applib.Module;
import org.apache.isis.applib.ModuleAbstract;
import org.apache.isis.applib.fixturescripts.FixtureScript;
import org.apache.isis.applib.fixturescripts.teardown.TeardownFixtureAbstract;

import org.isisaddons.module.publishmq.dom.jdo.events.PublishedEvent;
import org.isisaddons.module.publishmq.dom.jdo.status.StatusMessage;
import org.isisaddons.module.publishmq.dom.outbox.PublishMqSpiOutboxModule;

@XmlRootElement(name = "module")
public class PublishMqSpiJdoModule extends ModuleAbstract {

@Override public Set<Module> getDependencies() {
return Sets.newHashSet(new PublishMqSpiOutboxModule());
}

@Override
public FixtureScript getTeardownFixture() {
return new TeardownFixtureAbstract() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
import org.apache.isis.applib.annotation.DomainObject;
import org.apache.isis.applib.annotation.DomainObjectLayout;
import org.apache.isis.applib.annotation.Editing;
import org.isisaddons.module.publishmq.dom.outbox.events.PublishedEventAbstract;

/**
* This entity is in the "incorrect" module because it shares a superclass with OutboxEvent.
*/
@javax.jdo.annotations.PersistenceCapable(
schema = "isispublishmq",
table="PublishedEvent")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
import org.apache.isis.schema.common.v1.InteractionType;
import org.apache.isis.schema.ixn.v1.InteractionDto;
import org.apache.isis.schema.utils.InteractionDtoUtils;

import org.isisaddons.module.publishmq.dom.jdo.events.PublishedEvent;
import org.isisaddons.module.publishmq.dom.jdo.events.PublishedEventType;
import org.isisaddons.module.publishmq.dom.outbox.events.PublishedEventType;
import org.isisaddons.module.publishmq.dom.servicespi.InteractionExecutionRepository;

@DomainService(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
import org.apache.isis.applib.services.title.TitleService;
import org.apache.isis.schema.chg.v1.ChangesDto;
import org.apache.isis.schema.utils.ChangesDtoUtils;

import org.isisaddons.module.publishmq.dom.jdo.events.PublishedEvent;
import org.isisaddons.module.publishmq.dom.jdo.events.PublishedEventType;
import org.isisaddons.module.publishmq.dom.outbox.events.PublishedEventType;
import org.isisaddons.module.publishmq.dom.servicespi.PublishedObjectsRepository;

@DomainService(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package org.isisaddons.module.publishmq.dom.mq;

import java.util.Set;

import javax.xml.bind.annotation.XmlRootElement;

import com.google.common.collect.Sets;

import org.apache.isis.applib.Module;
import org.apache.isis.applib.ModuleAbstract;
import org.isisaddons.module.publishmq.dom.servicespi.PublishMqSpiServicesModule;

@XmlRootElement(name = "module")
public class PublishMqSpiMqModule extends ModuleAbstract {

@Override public Set<Module> getDependencies() {
return Sets.newHashSet(new PublishMqSpiServicesModule());
}


}
22 changes: 22 additions & 0 deletions modules/spi/publishmq/impl/outbox/logging-dn-enhance.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

# Basic logging goes to "datanucleus.log"
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.File=datanucleus.log
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) %-5p [%c] - %m%n
#log4j.appender.A1.Threshold=INFO

# Categories
# Each category can be set to a "level", and to direct to an appender

# Default to DEBUG level for all DataNucleus categories
log4j.logger.DataNucleus = DEBUG, A1

log4j.category.com.mchange.v2.c3p0=INFO, A1
log4j.category.com.mchange.v2.resourcepool=INFO, A1
log4j.category.org.logicalcobwebs.proxool=INFO,A1


# Hbase libs logging
log4j.category.org.apache.hadoop=INFO,A1
log4j.category.org.apache.zookeeper=INFO,A1
Loading

0 comments on commit 3417c63

Please sign in to comment.