Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Pulled the companies into their own module

  • Loading branch information...
commit 7a24d6662f21a81eab04a7d138052081f17c9b98 1 parent c9556b7
@jettro jettro authored
View
5 app/pom.xml
@@ -44,6 +44,11 @@
<artifactId>axon-trader-users-query</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axon-trader-companies-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.axonframework</groupId>
View
8 app/src/main/resources/META-INF/spring/command-context.xml
@@ -29,14 +29,6 @@
<context:component-scan base-package="org.axonframework.samples.trader.app"/>
- <axon:event-sourcing-repository id="companyRepository"
- aggregate-type="org.axonframework.samples.trader.app.command.trading.Company"
- cache-ref="ehcache"
- event-bus="eventBus"
- event-store="eventStore">
- <axon:snapshotter-trigger event-count-threshold="50" snapshotter-ref="snapshotter"/>
- </axon:event-sourcing-repository>
-
<axon:event-sourcing-repository id="portfolioRepository"
aggregate-type="org.axonframework.samples.trader.app.command.trading.Portfolio"
cache-ref="ehcache"
View
39 companies-api/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (c) 2012. Gridshore
+ ~ Licensed 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.axonframework.samples</groupId>
+ <artifactId>axon-trader</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>axon-trader-companies-api</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.axonframework</groupId>
+ <artifactId>axon-core</artifactId>
+ <version>${axon.version}</version>
+ </dependency>
+ </dependencies>
+
+
+</project>
View
0  ...s/trader/app/api/company/CompanyCreatedEvent.java → ...s/trader/app/api/company/CompanyCreatedEvent.java
File renamed without changes
View
0  .../trader/app/api/company/CreateCompanyCommand.java → .../trader/app/api/company/CreateCompanyCommand.java
File renamed without changes
View
77 companies/pom.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (c) 2012. Gridshore
+ ~ Licensed 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.axonframework.samples</groupId>
+ <artifactId>axon-trader</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>axon-trader-companies</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axon-trader-companies-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.axonframework</groupId>
+ <artifactId>axon-core</artifactId>
+ <version>${axon.version}</version>
+ </dependency>
+
+ <!-- Test dependencies -->
+ <dependency>
+ <groupId>org.axonframework</groupId>
+ <artifactId>axon-test</artifactId>
+ <version>${axon.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-all</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
View
2  ...k/samples/trader/app/command/trading/Company.java → ...k/samples/trader/app/command/company/Company.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.command.trading;
+package org.axonframework.samples.trader.app.command.company;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.eventhandling.annotation.EventHandler;
View
4 ...er/app/command/trading/CompanyCommandHandler.java → ...er/app/command/company/CompanyCommandHandler.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.command.trading;
+package org.axonframework.samples.trader.app.command.company;
import org.axonframework.commandhandling.annotation.CommandHandler;
import org.axonframework.domain.UUIDAggregateIdentifier;
@@ -21,12 +21,10 @@
import org.axonframework.samples.trader.app.api.company.CreateCompanyCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Component;
/**
* @author Jettro Coenradie
*/
-@Component
public class CompanyCommandHandler {
private Repository<Company> repository;
View
34 companies/src/main/resources/META-INF/spring/companies-context.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (c) 2012. Gridshore
+ ~ Licensed 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.
+ -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:axon="http://www.axonframework.org/schema/core"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.axonframework.org/schema/core http://www.axonframework.org/schema/axon-core-1.2.xsd">
+
+ <bean class="org.axonframework.samples.trader.app.command.company.CompanyCommandHandler">
+ <property name="repository" ref="companyRepository"/>
+ </bean>
+
+ <axon:event-sourcing-repository id="companyRepository"
+ aggregate-type="org.axonframework.samples.trader.app.command.company.Company"
+ cache-ref="ehcache"
+ event-bus="eventBus"
+ event-store="eventStore">
+ <axon:snapshotter-trigger event-count-threshold="50" snapshotter-ref="snapshotter"/>
+ </axon:event-sourcing-repository>
+
+</beans>
View
2  ...pp/command/trading/CompanyCommandHandlerTest.java → ...pp/command/company/CompanyCommandHandlerTest.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.command.trading;
+package org.axonframework.samples.trader.app.command.company;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.UUIDAggregateIdentifier;
View
3  pom.xml
@@ -47,6 +47,9 @@
<module>users-api</module>
<module>users</module>
<module>users-query</module>
+ <module>companies-api</module>
+ <module>companies</module>
+
</modules>
<build>
View
5 web-ui/pom.xml
@@ -61,6 +61,11 @@
<artifactId>axon-trader-users</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axon-trader-companies</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<!-- spring dependencies -->
<dependency>
View
1  web-ui/src/main/webapp/WEB-INF/web.xml
@@ -32,6 +32,7 @@
classpath:META-INF/spring/command-context.xml,
classpath:META-INF/spring/trade-engine-context.xml,
classpath:META-INF/spring/users-context.xml,
+ classpath:META-INF/spring/companies-context.xml,
classpath:META-INF/spring/configuration-context.xml,
classpath:META-INF/spring/cqrs-infrastructure-context.xml,
classpath:META-INF/spring/persistence-infrastructure-context.xml,
Please sign in to comment.
Something went wrong with that request. Please try again.