Permalink
Browse files

Extracted the trading context into separate module

The trade engine itself can be seen as a separate context. It is now
split into separate modules: one for the API, and one for the handler.
  • Loading branch information...
1 parent f2326b7 commit 7e35daba178bf97598594525766d12d3004a13bf @abuijze abuijze committed Feb 1, 2012
Showing with 43 additions and 10 deletions.
  1. +14 −0 trade-engine-api/pom.xml
  2. +1 −1 ...i/src/main/java/org/axonframework/samples/trader/tradeengine}/api/order/AbstractOrderCommand.java
  3. +1 −1 ...c/main/java/org/axonframework/samples/trader/tradeengine}/api/order/AbstractOrderPlacedEvent.java
  4. +1 −1 ...pi/src/main/java/org/axonframework/samples/trader/tradeengine}/api/order/BuyOrderPlacedEvent.java
  5. +1 −1 .../src/main/java/org/axonframework/samples/trader/tradeengine}/api/order/CreateBuyOrderCommand.java
  6. +1 −1 ...src/main/java/org/axonframework/samples/trader/tradeengine}/api/order/CreateOrderBookCommand.java
  7. +1 −1 ...src/main/java/org/axonframework/samples/trader/tradeengine}/api/order/CreateSellOrderCommand.java
  8. +1 −1 .../src/main/java/org/axonframework/samples/trader/tradeengine}/api/order/OrderBookCreatedEvent.java
  9. +1 −1 ...i/src/main/java/org/axonframework/samples/trader/tradeengine}/api/order/SellOrderPlacedEvent.java
  10. +1 −1 ...api/src/main/java/org/axonframework/samples/trader/tradeengine}/api/order/TradeExecutedEvent.java
  11. +14 −0 trade-engine/pom.xml
  12. 0 {app → trade-engine}/src/main/java/org/axonframework/samples/trader/app/command/trading/Order.java
  13. 0 ...→ trade-engine}/src/main/java/org/axonframework/samples/trader/app/command/trading/OrderBook.java
  14. 0 ...}/src/main/java/org/axonframework/samples/trader/app/command/trading/OrderBookCommandHandler.java
  15. +6 −0 trade-engine/src/main/resources/META-INF/spring/trade-engine-context.xml
  16. +0 −1 ...c/test/java/org/axonframework/samples/trader/app/command/trading/OrderBookCommandHandlerTest.java
View
14 trade-engine-api/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+ <parent>
+ <artifactId>axon-trader</artifactId>
+ <groupId>org.axonframework.samples</groupId>
+ <version>0.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>axon-trader-trade-engine-api</artifactId>
+
+</project>
View
2 ...r/app/api/order/AbstractOrderCommand.java → ...ngine/api/order/AbstractOrderCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.order;
+package org.axonframework.samples.trader.tradeengine.api.order;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.UUIDAggregateIdentifier;
View
2 ...p/api/order/AbstractOrderPlacedEvent.java → ...e/api/order/AbstractOrderPlacedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.order;
+package org.axonframework.samples.trader.tradeengine.api.order;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2 ...er/app/api/order/BuyOrderPlacedEvent.java → ...engine/api/order/BuyOrderPlacedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.order;
+package org.axonframework.samples.trader.tradeengine.api.order;
import org.axonframework.domain.AggregateIdentifier;
View
2 .../app/api/order/CreateBuyOrderCommand.java → ...gine/api/order/CreateBuyOrderCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.order;
+package org.axonframework.samples.trader.tradeengine.api.order;
import org.axonframework.domain.AggregateIdentifier;
View
2 ...app/api/order/CreateOrderBookCommand.java → ...ine/api/order/CreateOrderBookCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.order;
+package org.axonframework.samples.trader.tradeengine.api.order;
import org.axonframework.domain.AggregateIdentifier;
View
2 ...app/api/order/CreateSellOrderCommand.java → ...ine/api/order/CreateSellOrderCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.order;
+package org.axonframework.samples.trader.tradeengine.api.order;
import org.axonframework.domain.AggregateIdentifier;
View
2 .../app/api/order/OrderBookCreatedEvent.java → ...gine/api/order/OrderBookCreatedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.order;
+package org.axonframework.samples.trader.tradeengine.api.order;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2 ...r/app/api/order/SellOrderPlacedEvent.java → ...ngine/api/order/SellOrderPlacedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.order;
+package org.axonframework.samples.trader.tradeengine.api.order;
import org.axonframework.domain.AggregateIdentifier;
View
2 ...der/app/api/order/TradeExecutedEvent.java → ...eengine/api/order/TradeExecutedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.order;
+package org.axonframework.samples.trader.tradeengine.api.order;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
14 trade-engine/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+ <parent>
+ <artifactId>axon-trader</artifactId>
+ <groupId>org.axonframework.samples</groupId>
+ <version>0.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>axon-trader-trade-engine</artifactId>
+
+</project>
View
0 ...les/trader/app/command/trading/Order.java → ...les/trader/app/command/trading/Order.java
File renamed without changes.
View
0 ...trader/app/command/trading/OrderBook.java → ...trader/app/command/trading/OrderBook.java
File renamed without changes.
View
0 ...mand/trading/OrderBookCommandHandler.java → ...mand/trading/OrderBookCommandHandler.java
File renamed without changes.
View
6 trade-engine/src/main/resources/META-INF/spring/trade-engine-context.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+</beans>
View
1 .../trading/OrderBookCommandHandlerTest.java → .../trading/OrderBookCommandHandlerTest.java
@@ -17,7 +17,6 @@
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.UUIDAggregateIdentifier;
-import org.axonframework.samples.trader.app.api.order.*;
import org.axonframework.test.FixtureConfiguration;
import org.axonframework.test.Fixtures;
import org.junit.Before;

0 comments on commit 7e35dab

Please sign in to comment.