Skip to content

Commit

Permalink
Updated tram
Browse files Browse the repository at this point in the history
  • Loading branch information
dartartem committed Jul 5, 2019
1 parent 7331083 commit c7381df
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 29 deletions.
4 changes: 2 additions & 2 deletions eventuate-tram-examples-common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies {
compile "io.eventuate.tram.core:eventuate-tram-messaging:$eventuateTramVersion"
compile "io.eventuate.tram.core:eventuate-tram-messaging-spring:$eventuateTramVersion"
compile "io.eventuate.tram.core:eventuate-tram-commands:$eventuateTramVersion"
compile "io.eventuate.tram.core:eventuate-tram-events:$eventuateTramVersion"
compile "io.eventuate.tram.core:eventuate-tram-events-spring:$eventuateTramVersion"

compile "org.springframework.boot:spring-boot-starter:$springBootVersion"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
package io.eventuate.tram.examples.basic.commands;

import io.eventuate.tram.commands.common.ChannelMapping;
import io.eventuate.tram.commands.common.DefaultChannelMapping;
import io.eventuate.tram.commands.consumer.CommandDispatcher;
import io.eventuate.tram.commands.consumer.CommandDispatcherFactory;
import io.eventuate.tram.commands.consumer.TramCommandConsumerConfiguration;
import io.eventuate.tram.commands.producer.TramCommandProducerConfiguration;
import io.eventuate.tram.messaging.common.ChannelMapping;
import io.eventuate.tram.messaging.common.DefaultChannelMapping;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

import java.util.Collections;

@Configuration
@Import(TramCommandProducerConfiguration.class)
@Import({TramCommandProducerConfiguration.class, TramCommandConsumerConfiguration.class})
public class AbstractTramCommandTestConfiguration {

@Bean
Expand All @@ -26,8 +28,8 @@ public TramCommandTestCommandHandler abstractTramCommandTestTarget(AbstractTramC
}

@Bean
public CommandDispatcher commandDispatcher(AbstractTramCommandTestConfig config, TramCommandTestCommandHandler target) {
return new CommandDispatcher(config.getCommandDispatcheId(), target.getCommandHandlers());
public CommandDispatcher commandDispatcher(CommandDispatcherFactory commandDispatcherFactory, AbstractTramCommandTestConfig config, TramCommandTestCommandHandler target) {
return commandDispatcherFactory.make(config.getCommandDispatcheId(), target.getCommandHandlers());
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
package io.eventuate.tram.examples.basic.events;

import io.eventuate.tram.events.publisher.TramEventsPublisherConfiguration;
import io.eventuate.tram.events.spring.publisher.TramEventsPublisherConfiguration;
import io.eventuate.tram.events.spring.subscriber.TramEventSubscriberConfiguration;
import io.eventuate.tram.events.subscriber.DomainEventDispatcher;
import io.eventuate.tram.examples.basic.events.domain.AccountDebited;
import io.eventuate.tram.messaging.consumer.MessageConsumer;
import io.eventuate.tram.events.subscriber.DomainEventDispatcherFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

import java.util.Collections;

import static java.util.Collections.singleton;

@Configuration
@Import(TramEventsPublisherConfiguration.class)
@Import({TramEventsPublisherConfiguration.class, TramEventSubscriberConfiguration.class})
public class AbstractTramEventTestConfiguration {

@Bean
Expand All @@ -22,12 +18,10 @@ public AbstractTramEventTestConfig abstractTramEventTestConfig() {
}

@Bean
public DomainEventDispatcher domainEventDispatcher(AbstractTramEventTestConfig config,
TramEventTestEventConsumer target,
MessageConsumer messageConsumer) {
return new DomainEventDispatcher("eventDispatcherId" + config.getUniqueId(),
target.domainEventHandlers(),
messageConsumer);
public DomainEventDispatcher domainEventDispatcher(DomainEventDispatcherFactory domainEventDispatcherFactory,
AbstractTramEventTestConfig config,
TramEventTestEventConsumer target) {
return domainEventDispatcherFactory.make("eventDispatcherId" + config.getUniqueId(), target.domainEventHandlers());
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.eventuate.tram.examples.basic.activemq.commands;

import io.eventuate.jdbcactivemq.TramJdbcActiveMQConfiguration;
import io.eventuate.tram.examples.basic.commands.AbstractTramCommandTestConfiguration;
import io.eventuate.tram.jdbcactivemq.TramJdbcActiveMQConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.eventuate.tram.examples.basic.activemq.events;

import io.eventuate.jdbcactivemq.TramJdbcActiveMQConfiguration;
import io.eventuate.tram.examples.basic.events.AbstractTramEventTestConfiguration;
import io.eventuate.tram.jdbcactivemq.TramJdbcActiveMQConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.eventuate.tram.examples.basic.activemq.messages;

import io.eventuate.jdbcactivemq.TramJdbcActiveMQConfiguration;
import io.eventuate.tram.jdbcactivemq.TramJdbcActiveMQConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.eventuate.tram.examples.basic.rabbitmq.commands;

import io.eventuate.jdbcrabbitmq.TramJdbcRabbitMQConfiguration;
import io.eventuate.tram.examples.basic.commands.AbstractTramCommandTestConfiguration;
import io.eventuate.tram.jdbcrabbitmq.TramJdbcRabbitMQConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.eventuate.tram.examples.basic.rabbitmq.events;

import io.eventuate.jdbcrabbitmq.TramJdbcRabbitMQConfiguration;
import io.eventuate.tram.examples.basic.events.AbstractTramEventTestConfiguration;
import io.eventuate.tram.jdbcrabbitmq.TramJdbcRabbitMQConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.eventuate.tram.examples.basic.rabbitmq.messages;

import io.eventuate.jdbcrabbitmq.TramJdbcRabbitMQConfiguration;
import io.eventuate.tram.jdbcrabbitmq.TramJdbcRabbitMQConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ eventuateMavenRepoUrl=https://dl.bintray.com/eventuateio-oss/eventuate-maven-rel
springBootVersion=2.1.1.RELEASE

version=0.1.0-SNAPSHOT
eventuateTramVersion=0.21.2.RELEASE
eventuateTramVersion=0.21.0-SNAPSHOT
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include 'eventuate-tram-examples-common'
include 'eventuate-tram-examples-jdbc-kafka'
include 'eventuate-tram-examples-jdbc-kafka-spring'
include 'eventuate-tram-examples-jdbc-rabbitmq'
include 'eventuate-tram-examples-jdbc-activemq'
include 'eventuate-tram-examples-in-memory'

0 comments on commit c7381df

Please sign in to comment.