Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Weer een grote stap gezet in het refactoren van de oplossing in een m…

…eer modulaire opzet
  • Loading branch information...
commit c1523e0dcb14d338ebf7df11695d23fb1abf6ccf 1 parent feca19c
@jettro jettro authored
Showing with 641 additions and 396 deletions.
  1. +102 −0 infrastructure/pom.xml
  2. +1 −1  .../app → infrastructure/src/main/java/org/axonframework/samples/trader/infra}/mongo/CFMongoTemplate.java
  3. +1 −1  ... → infrastructure/src/main/java/org/axonframework/samples/trader/infra}/mongo/CFSagaMongoTemplate.java
  4. +1 −1  ...r/app → infrastructure/src/main/java/org/axonframework/samples/trader/infra}/util/ProfilingAspect.java
  5. +23 −23 {orders → infrastructure}/src/main/resources/META-INF/spring/configuration-context.xml
  6. +22 −8 {orders → infrastructure}/src/main/resources/META-INF/spring/cqrs-infrastructure-context.xml
  7. +3 −4 {orders → infrastructure}/src/main/resources/META-INF/spring/persistence-infrastructure-context.xml
  8. 0  {orders → infrastructure}/src/main/resources/trader.properties
  9. +39 −0 orders-api/pom.xml
  10. +1 −1  ...orders-api/src/main/java/org/axonframework/samples/trader/orders}/api/portfolio/CreatePortfolioCommand.java
  11. +1 −1  ... orders-api/src/main/java/org/axonframework/samples/trader/orders}/api/portfolio/PortfolioCreatedEvent.java
  12. +1 −1  ...i/src/main/java/org/axonframework/samples/trader/orders}/api/portfolio/item/AddItemsToPortfolioCommand.java
  13. +1 −1  ...a/org/axonframework/samples/trader/orders}/api/portfolio/item/CancelItemReservationForPortfolioCommand.java
  14. +1 −1  .../org/axonframework/samples/trader/orders}/api/portfolio/item/ConfirmItemReservationForPortfolioCommand.java
  15. +1 −1  .../org/axonframework/samples/trader/orders}/api/portfolio/item/ItemReservationCancelledForPortfolioEvent.java
  16. +1 −1  .../org/axonframework/samples/trader/orders}/api/portfolio/item/ItemReservationConfirmedForPortfolioEvent.java
  17. +1 −1  .../org/axonframework/samples/trader/orders}/api/portfolio/item/ItemToReserveNotAvailableInPortfolioEvent.java
  18. +1 −1  ...i/src/main/java/org/axonframework/samples/trader/orders}/api/portfolio/item/ItemsAddedToPortfolioEvent.java
  19. +1 −1  ...rders-api/src/main/java/org/axonframework/samples/trader/orders}/api/portfolio/item/ItemsReservedEvent.java
  20. +1 −1  ...rg/axonframework/samples/trader/orders}/api/portfolio/item/NotEnoughItemsAvailableToReserveInPortfolio.java
  21. +1 −1  ...ders-api/src/main/java/org/axonframework/samples/trader/orders}/api/portfolio/item/ReserveItemsCommand.java
  22. +1 −1  ...rg/axonframework/samples/trader/orders}/api/portfolio/money/CancelMoneyReservationFromPortfolioCommand.java
  23. +1 −1  .../axonframework/samples/trader/orders}/api/portfolio/money/ConfirmMoneyReservationFromPortfolionCommand.java
  24. +1 −1  .../main/java/org/axonframework/samples/trader/orders}/api/portfolio/money/DepositMoneyToPortfolioCommand.java
  25. +1 −1  .../main/java/org/axonframework/samples/trader/orders}/api/portfolio/money/MoneyDepositedToPortfolioEvent.java
  26. +1 −1  ...g/axonframework/samples/trader/orders}/api/portfolio/money/MoneyReservationCancelledFromPortfolioEvent.java
  27. +1 −1  ...g/axonframework/samples/trader/orders}/api/portfolio/money/MoneyReservationConfirmedFromPortfolioEvent.java
  28. +1 −1  ...main/java/org/axonframework/samples/trader/orders}/api/portfolio/money/MoneyReservedFromPortfolioEvent.java
  29. +1 −1  ...ain/java/org/axonframework/samples/trader/orders}/api/portfolio/money/MoneyWithdrawnFromPortfolioEvent.java
  30. +1 −1  ...onframework/samples/trader/orders}/api/portfolio/money/NotEnoughMoneyInPortfolioToMakeReservationEvent.java
  31. +1 −1  ...ain/java/org/axonframework/samples/trader/orders}/api/portfolio/money/ReserveMoneyFromPortfolioCommand.java
  32. +1 −1  ...in/java/org/axonframework/samples/trader/orders}/api/portfolio/money/WithdrawMoneyFromPortfolioCommand.java
  33. +1 −1  ...src/main/java/org/axonframework/samples/trader/orders}/api/transaction/AbstractStartTransactionCommand.java
  34. +1 −1  ...c/main/java/org/axonframework/samples/trader/orders}/api/transaction/AbstractTransactionCancelledEvent.java
  35. +1 −1  ...c/main/java/org/axonframework/samples/trader/orders}/api/transaction/AbstractTransactionConfirmedEvent.java
  36. +1 −1  ...rc/main/java/org/axonframework/samples/trader/orders}/api/transaction/AbstractTransactionExecutedEvent.java
  37. +1 −1  ...ava/org/axonframework/samples/trader/orders}/api/transaction/AbstractTransactionPartiallyExecutedEvent.java
  38. +1 −1  ...src/main/java/org/axonframework/samples/trader/orders}/api/transaction/AbstractTransactionStartedEvent.java
  39. +1 −1  ...pi/src/main/java/org/axonframework/samples/trader/orders}/api/transaction/BuyTransactionCancelledEvent.java
  40. +1 −1  ...pi/src/main/java/org/axonframework/samples/trader/orders}/api/transaction/BuyTransactionConfirmedEvent.java
  41. +1 −1  ...api/src/main/java/org/axonframework/samples/trader/orders}/api/transaction/BuyTransactionExecutedEvent.java
  42. +1 −1  ...ain/java/org/axonframework/samples/trader/orders}/api/transaction/BuyTransactionPartiallyExecutedEvent.java
  43. +1 −1  ...-api/src/main/java/org/axonframework/samples/trader/orders}/api/transaction/BuyTransactionStartedEvent.java
  44. +1 −1  ...rs-api/src/main/java/org/axonframework/samples/trader/orders}/api/transaction/CancelTransactionCommand.java
  45. +1 −1  ...s-api/src/main/java/org/axonframework/samples/trader/orders}/api/transaction/ConfirmTransactionCommand.java
  46. +1 −1  ...-api/src/main/java/org/axonframework/samples/trader/orders}/api/transaction/ExecutedTransactionCommand.java
  47. +1 −1  ...i/src/main/java/org/axonframework/samples/trader/orders}/api/transaction/SellTransactionCancelledEvent.java
  48. +1 −1  ...i/src/main/java/org/axonframework/samples/trader/orders}/api/transaction/SellTransactionConfirmedEvent.java
  49. +1 −1  ...pi/src/main/java/org/axonframework/samples/trader/orders}/api/transaction/SellTransactionExecutedEvent.java
  50. +1 −1  ...in/java/org/axonframework/samples/trader/orders}/api/transaction/SellTransactionPartiallyExecutedEvent.java
  51. +1 −1  ...api/src/main/java/org/axonframework/samples/trader/orders}/api/transaction/SellTransactionStartedEvent.java
  52. +1 −1  ...-api/src/main/java/org/axonframework/samples/trader/orders}/api/transaction/StartBuyTransactionCommand.java
  53. +1 −1  ...api/src/main/java/org/axonframework/samples/trader/orders}/api/transaction/StartSellTransactionCommand.java
  54. +1 −1  ...arr; orders-api/src/main/java/org/axonframework/samples/trader/orders/api/transaction}/TransactionType.java
  55. +5 −61 orders/pom.xml
  56. +4 −4 ...src/main/java/org/axonframework/samples/trader/{app → orders}/command/trading/BuyTradeManagerSaga.java
  57. +4 −4 orders/src/main/java/org/axonframework/samples/trader/{app → orders}/command/trading/Portfolio.java
  58. +7 −7 ...main/java/org/axonframework/samples/trader/{app → orders}/command/trading/PortfolioCommandHandler.java
  59. +4 −4 ...rc/main/java/org/axonframework/samples/trader/{app → orders}/command/trading/SellTradeManagerSaga.java
  60. +1 −1  ...rs/src/main/java/org/axonframework/samples/trader/{app → orders}/command/trading/TradeManagerSaga.java
  61. +2 −2 orders/src/main/java/org/axonframework/samples/trader/{app → orders}/command/trading/Transaction.java
  62. +2 −2 ...in/java/org/axonframework/samples/trader/{app → orders}/command/trading/TransactionCommandHandler.java
  63. +0 −9 orders/src/main/java/rebel.xml
  64. +10 −25 orders/src/main/resources/META-INF/spring/{command-context.xml → orders-context.xml}
  65. +5 −4 orders/src/test/java/org/axonframework/samples/trader/app/command/trading/BuyTradeManagerSagaTest.java
  66. +6 −4 orders/src/test/java/org/axonframework/samples/trader/app/command/trading/PortfolioCommandHandlerTest.java
  67. +5 −4 orders/src/test/java/org/axonframework/samples/trader/app/command/trading/SellTradeManagerSagaTest.java
  68. +3 −1 orders/src/test/java/org/axonframework/samples/trader/app/command/trading/TransactionCommandHandlingTest.java
  69. +1 −1  ...t/java/org/axonframework/samples/trader/app/command/trading/matchers/AddItemsToPortfolioCommandMatcher.java
  70. +1 −1  ...nframework/samples/trader/app/command/trading/matchers/CancelItemReservationForPortfolioCommandMatcher.java
  71. +1 −1  ...ramework/samples/trader/app/command/trading/matchers/CancelMoneyReservationFromPortfolioCommandMatcher.java
  72. +1 −1  ...est/java/org/axonframework/samples/trader/app/command/trading/matchers/CancelTransactionCommandMatcher.java
  73. +1 −1  ...framework/samples/trader/app/command/trading/matchers/ConfirmItemReservationForPortfolioCommandMatcher.java
  74. +1 −1  ...mework/samples/trader/app/command/trading/matchers/ConfirmMoneyReservationFromPortfolionCommandMatcher.java
  75. +1 −1  ...st/java/org/axonframework/samples/trader/app/command/trading/matchers/ConfirmTransactionCommandMatcher.java
  76. +1 −1  ...va/org/axonframework/samples/trader/app/command/trading/matchers/DepositMoneyToPortfolioCommandMatcher.java
  77. +1 −1  ...t/java/org/axonframework/samples/trader/app/command/trading/matchers/ExecutedTransactionCommandMatcher.java
  78. +1 −1  .../org/axonframework/samples/trader/app/command/trading/matchers/ReserveMoneyFromPortfolioCommandMatcher.java
  79. +1 −1  ...rc/test/java/org/axonframework/samples/trader/app/command/trading/matchers/ReservedItemsCommandMatcher.java
  80. +3 −0  pom.xml
  81. +96 −0 query/pom.xml
  82. +1 −1  ...les/trader/app → query/src/main/java/org/axonframework/samples/trader}/query/company/CompanyEntry.java
  83. +2 −2 .../trader/app → query/src/main/java/org/axonframework/samples/trader}/query/company/CompanyListener.java
  84. +2 −2 ...uery/src/main/java/org/axonframework/samples/trader}/query/company/repositories/CompanyQueryRepository.java
  85. +1 −1  ...trader/app → query/src/main/java/org/axonframework/samples/trader}/query/orderbook/OrderBookEntry.java
  86. +6 −6 ...der/app → query/src/main/java/org/axonframework/samples/trader}/query/orderbook/OrderBookListener.java
  87. +1 −1  ...les/trader/app → query/src/main/java/org/axonframework/samples/trader}/query/orderbook/OrderEntry.java
  88. +2 −2 .../src/main/java/org/axonframework/samples/trader}/query/orderbook/repositories/OrderBookQueryRepository.java
  89. +1 −1  ...ples/trader/app → query/src/main/java/org/axonframework/samples/trader}/query/portfolio/ItemEntry.java
  90. +1 −1  ...trader/app → query/src/main/java/org/axonframework/samples/trader}/query/portfolio/PortfolioEntry.java
  91. +8 −8 ...rarr; query/src/main/java/org/axonframework/samples/trader}/query/portfolio/PortfolioItemEventListener.java
  92. +5 −5 ...arr; query/src/main/java/org/axonframework/samples/trader}/query/portfolio/PortfolioMoneyEventListener.java
  93. +2 −2 .../src/main/java/org/axonframework/samples/trader}/query/portfolio/repositories/PortfolioQueryRepository.java
  94. +1 −1  ...pp → query/src/main/java/org/axonframework/samples/trader}/query/tradeexecuted/TradeExecutedEntry.java
  95. +2 −2 ...n/java/org/axonframework/samples/trader}/query/tradeexecuted/repositories/TradeExecutedQueryRepository.java
  96. +2 −2 ...er/app → query/src/main/java/org/axonframework/samples/trader}/query/transaction/TransactionEntry.java
  97. +14 −19 ...rarr; query/src/main/java/org/axonframework/samples/trader}/query/transaction/TransactionEventListener.java
  98. +1 −1  ...er/app → query/src/main/java/org/axonframework/samples/trader}/query/transaction/TransactionState.java
  99. +2 −2 .../main/java/org/axonframework/samples/trader}/query/transaction/repositories/TransactionQueryRepository.java
  100. +27 −0 query/src/main/resources/META-INF/spring/query-context.xml
  101. +2 −2 ...est/java/org/axonframework/samples/trader}/query/company/repositories/CompanyRepositoryIntegrationTest.java
  102. +6 −6 ...query/src/test/java/org/axonframework/samples/trader}/query/orderbook/OrderBookListenerIntegrationTest.java
  103. +1 −1  ...app → query/src/test/java/org/axonframework/samples/trader}/query/portfolio/PortfolioEntryMatcher.java
  104. +1 −1  ...er/app → query/src/test/java/org/axonframework/samples/trader}/query/portfolio/PortfolioEntryTest.java
  105. +18 −19 ...; query/src/test/java/org/axonframework/samples/trader}/query/portfolio/PortfolioItemEventListenerTest.java
  106. +2 −2 ...→ query/src/test/java/org/axonframework/samples/trader}/query/transaction/TransactionEntryMatcher.java
  107. +23 −21 ...; query/src/test/java/org/axonframework/samples/trader}/query/transaction/TransactionEventListenerTest.java
  108. +1 −1  users-query/src/main/java/org/axonframework/samples/trader/{app/query/user → query/users}/UserEntry.java
  109. +2 −2 ...-query/src/main/java/org/axonframework/samples/trader/{app/query/user → query/users}/UserListener.java
  110. +2 −2 .../org/axonframework/samples/trader/{app/query/user → query/users}/repositories/UserQueryRepository.java
  111. +23 −0 users-query/src/main/resources/META-INF/spring/users-query-context.xml
  112. +5 −0 users/pom.xml
  113. +2 −2 ...users/src/main/java/org/axonframework/samples/trader/app/command/user}/PortfolioManagementUserListener.java
  114. +1 −1  users/src/main/java/org/axonframework/samples/trader/app/command/user/UserCommandHandler.java
  115. +6 −8 ...s/src/test/java/org/axonframework/samples/trader/app/command/user}/PortfolioManagementUserListenerTest.java
  116. +2 −2 users/src/test/java/org/axonframework/samples/trader/app/command/user/UserCommandHandlerTest.java
  117. +15 −0 web-ui/pom.xml
  118. +6 −6 web-ui/src/main/java/org/axonframework/samples/trader/webui/admin/AdminController.java
  119. +12 −12 web-ui/src/main/java/org/axonframework/samples/trader/webui/companies/CompanyController.java
  120. +4 −4 web-ui/src/main/java/org/axonframework/samples/trader/webui/dashboard/DashboardController.java
  121. +13 −13 web-ui/src/main/java/org/axonframework/samples/trader/webui/init/DBInit.java
  122. +2 −2 web-ui/src/main/java/org/axonframework/samples/trader/webui/order/OrderBookController.java
  123. +1 −1  web-ui/src/main/java/org/axonframework/samples/trader/webui/security/UserController.java
  124. +5 −3 web-ui/src/main/webapp/WEB-INF/web.xml
View
102 infrastructure/pom.xml
@@ -0,0 +1,102 @@
+<?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-infrastructure</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.axonframework</groupId>
+ <artifactId>axon-core</artifactId>
+ <version>${axon.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.axonframework.incubator</groupId>
+ <artifactId>axon-mongo</artifactId>
+ <version>${axon.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mongodb</groupId>
+ <artifactId>mongo-java-driver</artifactId>
+ <version>${mongodb.java.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.cloudfoundry</groupId>
+ <artifactId>cloudfoundry-runtime</artifactId>
+ <version>0.8.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.data</groupId>
+ <artifactId>spring-data-mongodb</artifactId>
+ <version>${springdata.mongodb.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.thoughtworks.xstream</groupId>
+ <artifactId>xstream</artifactId>
+ <version>1.3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aspects</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <version>1.6.11</version>
+ </dependency>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjweaver</artifactId>
+ <version>1.6.11</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache-core</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache-jcache</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
View
2  ...ork/samples/trader/app/mongo/CFMongoTemplate.java → ...k/samples/trader/infra/mongo/CFMongoTemplate.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.mongo;
+package org.axonframework.samples.trader.infra.mongo;
import com.mongodb.DB;
import com.mongodb.DBCollection;
View
2  ...samples/trader/app/mongo/CFSagaMongoTemplate.java → ...mples/trader/infra/mongo/CFSagaMongoTemplate.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.mongo;
+package org.axonframework.samples.trader.infra.mongo;
import com.mongodb.DB;
import com.mongodb.DBCollection;
View
2  ...work/samples/trader/app/util/ProfilingAspect.java → ...rk/samples/trader/infra/util/ProfilingAspect.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.util;
+package org.axonframework.samples.trader.infra.util;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
View
46 ...sources/META-INF/spring/configuration-context.xml → ...sources/META-INF/spring/configuration-context.xml
@@ -1,24 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2010. 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:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
- <context:property-placeholder location="classpath:/trader.properties"/>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (c) 2010. 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:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
+
+ <context:property-placeholder location="classpath:/trader.properties"/>
+
</beans>
View
30 ...s/META-INF/spring/cqrs-infrastructure-context.xml → ...s/META-INF/spring/cqrs-infrastructure-context.xml
@@ -17,10 +17,12 @@
<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"
+ xmlns:context="http://www.springframework.org/schema/context"
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.xsd">
+ http://www.axonframework.org/schema/core http://www.axonframework.org/schema/axon-core.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<axon:annotation-config/>
+ <context:component-scan base-package="org.axonframework.samples.trader"/>
<axon:event-bus id="eventBus"/>
@@ -34,12 +36,24 @@
<constructor-arg ref="mongoSagaTemplate"/>
</bean>
- <axon:saga-manager id="sagaManager" saga-repository="sagaRepository" event-bus="eventBus">
- <axon:types>
- org.axonframework.samples.trader.app.command.trading.SellTradeManagerSaga,
- org.axonframework.samples.trader.app.command.trading.BuyTradeManagerSaga
- </axon:types>
- </axon:saga-manager>
-
<bean id="resourceInjector" class="org.axonframework.saga.spring.SpringResourceInjector"/>
+
+ <bean id="snapshotter" class="org.axonframework.eventsourcing.SpringAggregateSnapshotter">
+ <property name="eventStore" ref="eventStore"/>
+ <property name="executor" ref="taskExecutor"/>
+ </bean>
+
+ <bean id="taskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
+ <property name="corePoolSize" value="2"/>
+ <property name="maxPoolSize" value="5"/>
+ <property name="waitForTasksToCompleteOnShutdown" value="true"/>
+ </bean>
+
+ <!-- TODO jettro : come up with a more than default configuration for caching -->
+ <bean id="ehcache" class="net.sf.ehcache.jcache.JCache">
+ <constructor-arg>
+ <bean class="org.springframework.cache.ehcache.EhCacheFactoryBean"/>
+ </constructor-arg>
+ </bean>
+
</beans>
View
7 ...INF/spring/persistence-infrastructure-context.xml → ...INF/spring/persistence-infrastructure-context.xml
@@ -23,18 +23,17 @@
http://schema.cloudfoundry.org/spring http://schema.cloudfoundry.org/spring/cloudfoundry-spring-0.8.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
- <mongo:repositories base-package="org.axonframework.samples.trader.app.query.*.repositories"
- mongo-template-ref="mongoSpringTemplate"/>
+ <mongo:repositories base-package="**.query.*.repositories" mongo-template-ref="mongoSpringTemplate"/>
<bean id="mongoSpringTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
<constructor-arg ref="mongoDbFactory"/>
</bean>
- <bean id="mongoTemplate" class="org.axonframework.samples.trader.app.mongo.CFMongoTemplate">
+ <bean id="mongoTemplate" class="org.axonframework.samples.trader.infra.mongo.CFMongoTemplate">
<constructor-arg ref="mongoDbFactory"/>
</bean>
- <bean id="mongoSagaTemplate" class="org.axonframework.samples.trader.app.mongo.CFSagaMongoTemplate">
+ <bean id="mongoSagaTemplate" class="org.axonframework.samples.trader.infra.mongo.CFSagaMongoTemplate">
<constructor-arg ref="mongoDbFactory"/>
</bean>
View
0  orders/src/main/resources/trader.properties → infrastructure/src/main/resources/trader.properties
File renamed without changes
View
39 orders-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-orders-api</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.axonframework</groupId>
+ <artifactId>axon-core</artifactId>
+ <version>${axon.version}</version>
+ </dependency>
+ </dependencies>
+
+
+</project>
View
2  ...der/app/api/portfolio/CreatePortfolioCommand.java → .../orders/api/portfolio/CreatePortfolioCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio;
+package org.axonframework.samples.trader.orders.api.portfolio;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...ader/app/api/portfolio/PortfolioCreatedEvent.java → ...r/orders/api/portfolio/PortfolioCreatedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio;
+package org.axonframework.samples.trader.orders.api.portfolio;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...pi/portfolio/item/AddItemsToPortfolioCommand.java → ...pi/portfolio/item/AddItemsToPortfolioCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.item;
+package org.axonframework.samples.trader.orders.api.portfolio.item;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...tem/CancelItemReservationForPortfolioCommand.java → ...tem/CancelItemReservationForPortfolioCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.item;
+package org.axonframework.samples.trader.orders.api.portfolio.item;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...em/ConfirmItemReservationForPortfolioCommand.java → ...em/ConfirmItemReservationForPortfolioCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.item;
+package org.axonframework.samples.trader.orders.api.portfolio.item;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...em/ItemReservationCancelledForPortfolioEvent.java → ...em/ItemReservationCancelledForPortfolioEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.item;
+package org.axonframework.samples.trader.orders.api.portfolio.item;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...em/ItemReservationConfirmedForPortfolioEvent.java → ...em/ItemReservationConfirmedForPortfolioEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.item;
+package org.axonframework.samples.trader.orders.api.portfolio.item;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...em/ItemToReserveNotAvailableInPortfolioEvent.java → ...em/ItemToReserveNotAvailableInPortfolioEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.item;
+package org.axonframework.samples.trader.orders.api.portfolio.item;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...pi/portfolio/item/ItemsAddedToPortfolioEvent.java → ...pi/portfolio/item/ItemsAddedToPortfolioEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.item;
+package org.axonframework.samples.trader.orders.api.portfolio.item;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...er/app/api/portfolio/item/ItemsReservedEvent.java → ...orders/api/portfolio/item/ItemsReservedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.item;
+package org.axonframework.samples.trader.orders.api.portfolio.item;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  .../NotEnoughItemsAvailableToReserveInPortfolio.java → .../NotEnoughItemsAvailableToReserveInPortfolio.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.item;
+package org.axonframework.samples.trader.orders.api.portfolio.item;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...r/app/api/portfolio/item/ReserveItemsCommand.java → ...rders/api/portfolio/item/ReserveItemsCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.item;
+package org.axonframework.samples.trader.orders.api.portfolio.item;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...y/CancelMoneyReservationFromPortfolioCommand.java → ...y/CancelMoneyReservationFromPortfolioCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.money;
+package org.axonframework.samples.trader.orders.api.portfolio.money;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...ConfirmMoneyReservationFromPortfolionCommand.java → ...ConfirmMoneyReservationFromPortfolionCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.money;
+package org.axonframework.samples.trader.orders.api.portfolio.money;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...rtfolio/money/DepositMoneyToPortfolioCommand.java → ...rtfolio/money/DepositMoneyToPortfolioCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.money;
+package org.axonframework.samples.trader.orders.api.portfolio.money;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...rtfolio/money/MoneyDepositedToPortfolioEvent.java → ...rtfolio/money/MoneyDepositedToPortfolioEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.money;
+package org.axonframework.samples.trader.orders.api.portfolio.money;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  .../MoneyReservationCancelledFromPortfolioEvent.java → .../MoneyReservationCancelledFromPortfolioEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.money;
+package org.axonframework.samples.trader.orders.api.portfolio.money;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  .../MoneyReservationConfirmedFromPortfolioEvent.java → .../MoneyReservationConfirmedFromPortfolioEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.money;
+package org.axonframework.samples.trader.orders.api.portfolio.money;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...tfolio/money/MoneyReservedFromPortfolioEvent.java → ...tfolio/money/MoneyReservedFromPortfolioEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.money;
+package org.axonframework.samples.trader.orders.api.portfolio.money;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...folio/money/MoneyWithdrawnFromPortfolioEvent.java → ...folio/money/MoneyWithdrawnFromPortfolioEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.money;
+package org.axonframework.samples.trader.orders.api.portfolio.money;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...EnoughMoneyInPortfolioToMakeReservationEvent.java → ...EnoughMoneyInPortfolioToMakeReservationEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.money;
+package org.axonframework.samples.trader.orders.api.portfolio.money;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...folio/money/ReserveMoneyFromPortfolioCommand.java → ...folio/money/ReserveMoneyFromPortfolioCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.money;
+package org.axonframework.samples.trader.orders.api.portfolio.money;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...olio/money/WithdrawMoneyFromPortfolioCommand.java → ...olio/money/WithdrawMoneyFromPortfolioCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.portfolio.money;
+package org.axonframework.samples.trader.orders.api.portfolio.money;
import org.axonframework.domain.AggregateIdentifier;
View
2  .../transaction/AbstractStartTransactionCommand.java → .../transaction/AbstractStartTransactionCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...ransaction/AbstractTransactionCancelledEvent.java → ...ransaction/AbstractTransactionCancelledEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...ransaction/AbstractTransactionConfirmedEvent.java → ...ransaction/AbstractTransactionConfirmedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...transaction/AbstractTransactionExecutedEvent.java → ...transaction/AbstractTransactionExecutedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...on/AbstractTransactionPartiallyExecutedEvent.java → ...on/AbstractTransactionPartiallyExecutedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  .../transaction/AbstractTransactionStartedEvent.java → .../transaction/AbstractTransactionStartedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.DomainEvent;
View
2  ...api/transaction/BuyTransactionCancelledEvent.java → ...api/transaction/BuyTransactionCancelledEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
/**
* @author Jettro Coenradie
View
2  ...api/transaction/BuyTransactionConfirmedEvent.java → ...api/transaction/BuyTransactionConfirmedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
/**
* @author Jettro Coenradie
View
2  .../api/transaction/BuyTransactionExecutedEvent.java → .../api/transaction/BuyTransactionExecutedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
/**
* @author Jettro Coenradie
View
2  ...saction/BuyTransactionPartiallyExecutedEvent.java → ...saction/BuyTransactionPartiallyExecutedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
/**
* @author Jettro Coenradie
View
2  ...p/api/transaction/BuyTransactionStartedEvent.java → ...s/api/transaction/BuyTransactionStartedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...app/api/transaction/CancelTransactionCommand.java → ...ers/api/transaction/CancelTransactionCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...pp/api/transaction/ConfirmTransactionCommand.java → ...rs/api/transaction/ConfirmTransactionCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...p/api/transaction/ExecutedTransactionCommand.java → ...s/api/transaction/ExecutedTransactionCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...pi/transaction/SellTransactionCancelledEvent.java → ...pi/transaction/SellTransactionCancelledEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
/**
* @author Jettro Coenradie
View
2  ...pi/transaction/SellTransactionConfirmedEvent.java → ...pi/transaction/SellTransactionConfirmedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...api/transaction/SellTransactionExecutedEvent.java → ...api/transaction/SellTransactionExecutedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
/**
* @author Jettro Coenradie
View
2  ...action/SellTransactionPartiallyExecutedEvent.java → ...action/SellTransactionPartiallyExecutedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
/**
* @author Jettro Coenradie
View
2  .../api/transaction/SellTransactionStartedEvent.java → .../api/transaction/SellTransactionStartedEvent.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...p/api/transaction/StartBuyTransactionCommand.java → ...s/api/transaction/StartBuyTransactionCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
View
2  .../api/transaction/StartSellTransactionCommand.java → .../api/transaction/StartSellTransactionCommand.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.api.transaction;
+package org.axonframework.samples.trader.orders.api.transaction;
import org.axonframework.domain.AggregateIdentifier;
View
2  ...s/trader/app/command/trading/TransactionType.java → ...rader/orders/api/transaction/TransactionType.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.command.trading;
+package org.axonframework.samples.trader.orders.api.transaction;
/**
* @author Jettro Coenradie
View
66 orders/pom.xml
@@ -29,6 +29,11 @@
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
+ <artifactId>axon-trader-orders-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
<artifactId>axon-trader-trade-engine-api</artifactId>
<version>${project.version}</version>
</dependency>
@@ -53,65 +58,7 @@
<artifactId>axon-core</artifactId>
<version>${axon.version}</version>
</dependency>
- <dependency>
- <groupId>org.axonframework.incubator</groupId>
- <artifactId>axon-mongo</artifactId>
- <version>${axon.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.mongodb</groupId>
- <artifactId>mongo-java-driver</artifactId>
- <version>${mongodb.java.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.cloudfoundry</groupId>
- <artifactId>cloudfoundry-runtime</artifactId>
- <version>0.8.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.data</groupId>
- <artifactId>spring-data-mongodb</artifactId>
- <version>${springdata.mongodb.version}</version>
- </dependency>
- <dependency>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- <version>1.3.1</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-aspects</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <version>1.6.8</version>
- </dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjweaver</artifactId>
- <version>1.6.8</version>
- </dependency>
- <dependency>
- <groupId>net.sf.ehcache</groupId>
- <artifactId>ehcache-core</artifactId>
- <version>2.2.0</version>
- </dependency>
- <dependency>
- <groupId>net.sf.ehcache</groupId>
- <artifactId>ehcache-jcache</artifactId>
- <version>1.2</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-tx</artifactId>
- <version>${spring.version}</version>
- </dependency>
<!-- test dependencies -->
<dependency>
@@ -128,19 +75,16 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
- <version>1.8.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
- <version>1.1</version>
<scope>test</scope>
</dependency>
View
8 ...ader/app/command/trading/BuyTradeManagerSaga.java → ...r/orders/command/trading/BuyTradeManagerSaga.java
@@ -13,17 +13,17 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.command.trading;
+package org.axonframework.samples.trader.orders.command.trading;
import org.axonframework.commandhandling.CommandCallback;
import org.axonframework.saga.annotation.EndSaga;
import org.axonframework.saga.annotation.SagaEventHandler;
import org.axonframework.saga.annotation.StartSaga;
+import org.axonframework.samples.trader.orders.api.portfolio.item.AddItemsToPortfolioCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.money.*;
+import org.axonframework.samples.trader.orders.api.transaction.*;
import org.axonframework.samples.trader.tradeengine.api.order.CreateBuyOrderCommand;
import org.axonframework.samples.trader.tradeengine.api.order.TradeExecutedEvent;
-import org.axonframework.samples.trader.app.api.portfolio.item.AddItemsToPortfolioCommand;
-import org.axonframework.samples.trader.app.api.portfolio.money.*;
-import org.axonframework.samples.trader.app.api.transaction.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
View
8 ...samples/trader/app/command/trading/Portfolio.java → ...ples/trader/orders/command/trading/Portfolio.java
@@ -13,14 +13,14 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.command.trading;
+package org.axonframework.samples.trader.orders.command.trading;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.eventhandling.annotation.EventHandler;
import org.axonframework.eventsourcing.annotation.AbstractAnnotatedAggregateRoot;
-import org.axonframework.samples.trader.app.api.portfolio.PortfolioCreatedEvent;
-import org.axonframework.samples.trader.app.api.portfolio.item.*;
-import org.axonframework.samples.trader.app.api.portfolio.money.*;
+import org.axonframework.samples.trader.orders.api.portfolio.PortfolioCreatedEvent;
+import org.axonframework.samples.trader.orders.api.portfolio.item.*;
+import org.axonframework.samples.trader.orders.api.portfolio.money.*;
import java.util.HashMap;
import java.util.Map;
View
14 .../app/command/trading/PortfolioCommandHandler.java → ...ders/command/trading/PortfolioCommandHandler.java
@@ -13,18 +13,18 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.command.trading;
+package org.axonframework.samples.trader.orders.command.trading;
import org.axonframework.commandhandling.annotation.CommandHandler;
import org.axonframework.domain.UUIDAggregateIdentifier;
import org.axonframework.eventsourcing.EventSourcingRepository;
import org.axonframework.repository.Repository;
-import org.axonframework.samples.trader.app.api.portfolio.CreatePortfolioCommand;
-import org.axonframework.samples.trader.app.api.portfolio.item.AddItemsToPortfolioCommand;
-import org.axonframework.samples.trader.app.api.portfolio.item.CancelItemReservationForPortfolioCommand;
-import org.axonframework.samples.trader.app.api.portfolio.item.ConfirmItemReservationForPortfolioCommand;
-import org.axonframework.samples.trader.app.api.portfolio.item.ReserveItemsCommand;
-import org.axonframework.samples.trader.app.api.portfolio.money.*;
+import org.axonframework.samples.trader.orders.api.portfolio.CreatePortfolioCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.item.AddItemsToPortfolioCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.item.CancelItemReservationForPortfolioCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.item.ConfirmItemReservationForPortfolioCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.item.ReserveItemsCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.money.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
View
8 ...der/app/command/trading/SellTradeManagerSaga.java → .../orders/command/trading/SellTradeManagerSaga.java
@@ -13,16 +13,16 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.command.trading;
+package org.axonframework.samples.trader.orders.command.trading;
import org.axonframework.saga.annotation.EndSaga;
import org.axonframework.saga.annotation.SagaEventHandler;
import org.axonframework.saga.annotation.StartSaga;
+import org.axonframework.samples.trader.orders.api.portfolio.item.*;
+import org.axonframework.samples.trader.orders.api.portfolio.money.DepositMoneyToPortfolioCommand;
+import org.axonframework.samples.trader.orders.api.transaction.*;
import org.axonframework.samples.trader.tradeengine.api.order.CreateSellOrderCommand;
import org.axonframework.samples.trader.tradeengine.api.order.TradeExecutedEvent;
-import org.axonframework.samples.trader.app.api.portfolio.item.*;
-import org.axonframework.samples.trader.app.api.portfolio.money.DepositMoneyToPortfolioCommand;
-import org.axonframework.samples.trader.app.api.transaction.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
View
2  .../trader/app/command/trading/TradeManagerSaga.java → ...ader/orders/command/trading/TradeManagerSaga.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.command.trading;
+package org.axonframework.samples.trader.orders.command.trading;
import org.axonframework.commandhandling.CommandBus;
import org.axonframework.domain.AggregateIdentifier;
View
4 ...mples/trader/app/command/trading/Transaction.java → ...es/trader/orders/command/trading/Transaction.java
@@ -13,12 +13,12 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.command.trading;
+package org.axonframework.samples.trader.orders.command.trading;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.eventhandling.annotation.EventHandler;
import org.axonframework.eventsourcing.annotation.AbstractAnnotatedAggregateRoot;
-import org.axonframework.samples.trader.app.api.transaction.*;
+import org.axonframework.samples.trader.orders.api.transaction.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
View
4 ...pp/command/trading/TransactionCommandHandler.java → ...rs/command/trading/TransactionCommandHandler.java
@@ -13,11 +13,11 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.command.trading;
+package org.axonframework.samples.trader.orders.command.trading;
import org.axonframework.commandhandling.annotation.CommandHandler;
import org.axonframework.repository.Repository;
-import org.axonframework.samples.trader.app.api.transaction.*;
+import org.axonframework.samples.trader.orders.api.transaction.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
View
9 orders/src/main/java/rebel.xml
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd">
-
- <classpath>
- <dir name="/Users/jcoenradie/sources/Axon-trader/app/target/classes">
- </dir>
- </classpath>
-
-</application>
View
35 ...ain/resources/META-INF/spring/command-context.xml → ...main/resources/META-INF/spring/orders-context.xml
@@ -16,21 +16,17 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
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.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
- http://www.axonframework.org/schema/core http://www.axonframework.org/schema/axon-core.xsd
- ">
+ http://www.axonframework.org/schema/core http://www.axonframework.org/schema/axon-core.xsd">
<aop:aspectj-autoproxy/>
- <context:component-scan base-package="org.axonframework.samples.trader.app"/>
-
<axon:event-sourcing-repository id="portfolioRepository"
- aggregate-type="org.axonframework.samples.trader.app.command.trading.Portfolio"
+ aggregate-type="org.axonframework.samples.trader.orders.command.trading.Portfolio"
cache-ref="ehcache"
event-bus="eventBus"
event-store="eventStore">
@@ -38,29 +34,18 @@
</axon:event-sourcing-repository>
<axon:event-sourcing-repository id="transactionRepository"
- aggregate-type="org.axonframework.samples.trader.app.command.trading.Transaction"
+ aggregate-type="org.axonframework.samples.trader.orders.command.trading.Transaction"
cache-ref="ehcache"
event-bus="eventBus"
event-store="eventStore">
<axon:snapshotter-trigger event-count-threshold="50" snapshotter-ref="snapshotter"/>
</axon:event-sourcing-repository>
+ <axon:saga-manager id="sagaManager" saga-repository="sagaRepository" event-bus="eventBus">
+ <axon:types>
+ org.axonframework.samples.trader.orders.command.trading.SellTradeManagerSaga,
+ org.axonframework.samples.trader.orders.command.trading.BuyTradeManagerSaga
+ </axon:types>
+ </axon:saga-manager>
- <bean id="snapshotter" class="org.axonframework.eventsourcing.SpringAggregateSnapshotter">
- <property name="eventStore" ref="eventStore"/>
- <property name="executor" ref="taskExecutor"/>
- </bean>
-
- <bean id="taskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
- <property name="corePoolSize" value="2"/>
- <property name="maxPoolSize" value="5"/>
- <property name="waitForTasksToCompleteOnShutdown" value="true"/>
- </bean>
-
- <!-- TODO jettro : come up with a more than default configuration for caching -->
- <bean id="ehcache" class="net.sf.ehcache.jcache.JCache">
- <constructor-arg>
- <bean class="org.springframework.cache.ehcache.EhCacheFactoryBean"/>
- </constructor-arg>
- </bean>
</beans>
View
9 orders/src/test/java/org/axonframework/samples/trader/app/command/trading/BuyTradeManagerSagaTest.java
@@ -17,11 +17,12 @@
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.UUIDAggregateIdentifier;
-import org.axonframework.samples.trader.tradeengine.api.order.TradeExecutedEvent;
-import org.axonframework.samples.trader.app.api.portfolio.money.MoneyReservedFromPortfolioEvent;
-import org.axonframework.samples.trader.app.api.portfolio.money.NotEnoughMoneyInPortfolioToMakeReservationEvent;
-import org.axonframework.samples.trader.app.api.transaction.*;
import org.axonframework.samples.trader.app.command.trading.matchers.*;
+import org.axonframework.samples.trader.orders.api.portfolio.money.MoneyReservedFromPortfolioEvent;
+import org.axonframework.samples.trader.orders.api.portfolio.money.NotEnoughMoneyInPortfolioToMakeReservationEvent;
+import org.axonframework.samples.trader.orders.api.transaction.*;
+import org.axonframework.samples.trader.orders.command.trading.BuyTradeManagerSaga;
+import org.axonframework.samples.trader.tradeengine.api.order.TradeExecutedEvent;
import org.axonframework.test.saga.AnnotatedSagaTestFixture;
import org.junit.Before;
import org.junit.Test;
View
10 orders/src/test/java/org/axonframework/samples/trader/app/command/trading/PortfolioCommandHandlerTest.java
@@ -17,10 +17,12 @@
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.UUIDAggregateIdentifier;
-import org.axonframework.samples.trader.app.api.portfolio.CreatePortfolioCommand;
-import org.axonframework.samples.trader.app.api.portfolio.PortfolioCreatedEvent;
-import org.axonframework.samples.trader.app.api.portfolio.item.*;
-import org.axonframework.samples.trader.app.api.portfolio.money.*;
+import org.axonframework.samples.trader.orders.api.portfolio.CreatePortfolioCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.PortfolioCreatedEvent;
+import org.axonframework.samples.trader.orders.api.portfolio.item.*;
+import org.axonframework.samples.trader.orders.api.portfolio.money.*;
+import org.axonframework.samples.trader.orders.command.trading.Portfolio;
+import org.axonframework.samples.trader.orders.command.trading.PortfolioCommandHandler;
import org.axonframework.test.FixtureConfiguration;
import org.axonframework.test.Fixtures;
import org.junit.Before;
View
9 orders/src/test/java/org/axonframework/samples/trader/app/command/trading/SellTradeManagerSagaTest.java
@@ -17,11 +17,12 @@
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.UUIDAggregateIdentifier;
-import org.axonframework.samples.trader.tradeengine.api.order.TradeExecutedEvent;
-import org.axonframework.samples.trader.app.api.portfolio.item.ItemsReservedEvent;
-import org.axonframework.samples.trader.app.api.portfolio.item.NotEnoughItemsAvailableToReserveInPortfolio;
-import org.axonframework.samples.trader.app.api.transaction.*;
import org.axonframework.samples.trader.app.command.trading.matchers.*;
+import org.axonframework.samples.trader.orders.api.portfolio.item.ItemsReservedEvent;
+import org.axonframework.samples.trader.orders.api.portfolio.item.NotEnoughItemsAvailableToReserveInPortfolio;
+import org.axonframework.samples.trader.orders.api.transaction.*;
+import org.axonframework.samples.trader.orders.command.trading.SellTradeManagerSaga;
+import org.axonframework.samples.trader.tradeengine.api.order.TradeExecutedEvent;
import org.axonframework.test.saga.AnnotatedSagaTestFixture;
import org.junit.Before;
import org.junit.Test;
View
4 ...s/src/test/java/org/axonframework/samples/trader/app/command/trading/TransactionCommandHandlingTest.java
@@ -17,7 +17,9 @@
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.domain.UUIDAggregateIdentifier;
-import org.axonframework.samples.trader.app.api.transaction.*;
+import org.axonframework.samples.trader.orders.api.transaction.*;
+import org.axonframework.samples.trader.orders.command.trading.Transaction;
+import org.axonframework.samples.trader.orders.command.trading.TransactionCommandHandler;
import org.axonframework.test.FixtureConfiguration;
import org.axonframework.test.Fixtures;
import org.junit.Before;
View
2  ...ava/org/axonframework/samples/trader/app/command/trading/matchers/AddItemsToPortfolioCommandMatcher.java
@@ -16,7 +16,7 @@
package org.axonframework.samples.trader.app.command.trading.matchers;
import org.axonframework.domain.AggregateIdentifier;
-import org.axonframework.samples.trader.app.api.portfolio.item.AddItemsToPortfolioCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.item.AddItemsToPortfolioCommand;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
View
2  ...amework/samples/trader/app/command/trading/matchers/CancelItemReservationForPortfolioCommandMatcher.java
@@ -16,7 +16,7 @@
package org.axonframework.samples.trader.app.command.trading.matchers;
import org.axonframework.domain.AggregateIdentifier;
-import org.axonframework.samples.trader.app.api.portfolio.item.CancelItemReservationForPortfolioCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.item.CancelItemReservationForPortfolioCommand;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
View
2  ...ework/samples/trader/app/command/trading/matchers/CancelMoneyReservationFromPortfolioCommandMatcher.java
@@ -16,7 +16,7 @@
package org.axonframework.samples.trader.app.command.trading.matchers;
import org.axonframework.domain.AggregateIdentifier;
-import org.axonframework.samples.trader.app.api.portfolio.money.CancelMoneyReservationFromPortfolioCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.money.CancelMoneyReservationFromPortfolioCommand;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
View
2  .../java/org/axonframework/samples/trader/app/command/trading/matchers/CancelTransactionCommandMatcher.java
@@ -16,7 +16,7 @@
package org.axonframework.samples.trader.app.command.trading.matchers;
import org.axonframework.domain.AggregateIdentifier;
-import org.axonframework.samples.trader.app.api.transaction.CancelTransactionCommand;
+import org.axonframework.samples.trader.orders.api.transaction.CancelTransactionCommand;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
View
2  ...mework/samples/trader/app/command/trading/matchers/ConfirmItemReservationForPortfolioCommandMatcher.java
@@ -16,7 +16,7 @@
package org.axonframework.samples.trader.app.command.trading.matchers;
import org.axonframework.domain.AggregateIdentifier;
-import org.axonframework.samples.trader.app.api.portfolio.item.ConfirmItemReservationForPortfolioCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.item.ConfirmItemReservationForPortfolioCommand;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
View
2  ...ork/samples/trader/app/command/trading/matchers/ConfirmMoneyReservationFromPortfolionCommandMatcher.java
@@ -16,7 +16,7 @@
package org.axonframework.samples.trader.app.command.trading.matchers;
import org.axonframework.domain.AggregateIdentifier;
-import org.axonframework.samples.trader.app.api.portfolio.money.ConfirmMoneyReservationFromPortfolionCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.money.ConfirmMoneyReservationFromPortfolionCommand;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
View
2  ...java/org/axonframework/samples/trader/app/command/trading/matchers/ConfirmTransactionCommandMatcher.java
@@ -16,7 +16,7 @@
package org.axonframework.samples.trader.app.command.trading.matchers;
import org.axonframework.domain.AggregateIdentifier;
-import org.axonframework.samples.trader.app.api.transaction.ConfirmTransactionCommand;
+import org.axonframework.samples.trader.orders.api.transaction.ConfirmTransactionCommand;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
View
2  ...org/axonframework/samples/trader/app/command/trading/matchers/DepositMoneyToPortfolioCommandMatcher.java
@@ -16,7 +16,7 @@
package org.axonframework.samples.trader.app.command.trading.matchers;
import org.axonframework.domain.AggregateIdentifier;
-import org.axonframework.samples.trader.app.api.portfolio.money.DepositMoneyToPortfolioCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.money.DepositMoneyToPortfolioCommand;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
View
2  ...ava/org/axonframework/samples/trader/app/command/trading/matchers/ExecutedTransactionCommandMatcher.java
@@ -16,7 +16,7 @@
package org.axonframework.samples.trader.app.command.trading.matchers;
import org.axonframework.domain.AggregateIdentifier;
-import org.axonframework.samples.trader.app.api.transaction.ExecutedTransactionCommand;
+import org.axonframework.samples.trader.orders.api.transaction.ExecutedTransactionCommand;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
View
2  ...g/axonframework/samples/trader/app/command/trading/matchers/ReserveMoneyFromPortfolioCommandMatcher.java
@@ -16,7 +16,7 @@
package org.axonframework.samples.trader.app.command.trading.matchers;
import org.axonframework.domain.AggregateIdentifier;
-import org.axonframework.samples.trader.app.api.portfolio.money.ReserveMoneyFromPortfolioCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.money.ReserveMoneyFromPortfolioCommand;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
View
2  ...test/java/org/axonframework/samples/trader/app/command/trading/matchers/ReservedItemsCommandMatcher.java
@@ -15,7 +15,7 @@
package org.axonframework.samples.trader.app.command.trading.matchers;
-import org.axonframework.samples.trader.app.api.portfolio.item.ReserveItemsCommand;
+import org.axonframework.samples.trader.orders.api.portfolio.item.ReserveItemsCommand;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
View
3  pom.xml
@@ -40,7 +40,10 @@
</properties>
<modules>
+ <module>infrastructure</module>
+ <module>query</module>
<module>orders</module>
+ <module>orders-api</module>
<module>trade-engine-api</module>
<module>trade-engine</module>
<module>users-api</module>
View
96 query/pom.xml
@@ -0,0 +1,96 @@
+<?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-query</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axon-trader-orders-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axon-trader-trade-engine-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axon-trader-users-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <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>${project.groupId}</groupId>
+ <artifactId>axon-trader-infrastructure</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.axonframework</groupId>
+ <artifactId>axon-core</artifactId>
+ <version>${axon.version}</version>
+ </dependency>
+
+ <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  ...amples/trader/app/query/company/CompanyEntry.java → ...rk/samples/trader/query/company/CompanyEntry.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.query.company;
+package org.axonframework.samples.trader.query.company;
import org.springframework.data.annotation.Id;
View
4 ...les/trader/app/query/company/CompanyListener.java → ...samples/trader/query/company/CompanyListener.java
@@ -13,11 +13,11 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.query.company;
+package org.axonframework.samples.trader.query.company;
import org.axonframework.eventhandling.annotation.EventHandler;
import org.axonframework.samples.trader.app.api.company.CompanyCreatedEvent;
-import org.axonframework.samples.trader.app.query.company.repositories.CompanyQueryRepository;
+import org.axonframework.samples.trader.query.company.repositories.CompanyQueryRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
View
4 .../company/repositories/CompanyQueryRepository.java → .../company/repositories/CompanyQueryRepository.java
@@ -13,9 +13,9 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.query.company.repositories;
+package org.axonframework.samples.trader.query.company.repositories;
-import org.axonframework.samples.trader.app.query.company.CompanyEntry;
+import org.axonframework.samples.trader.query.company.CompanyEntry;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
View
2  ...es/trader/app/query/orderbook/OrderBookEntry.java → ...amples/trader/query/orderbook/OrderBookEntry.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.query.orderbook;
+package org.axonframework.samples.trader.query.orderbook;
import org.springframework.data.annotation.Id;
View
12 ...trader/app/query/orderbook/OrderBookListener.java → ...les/trader/query/orderbook/OrderBookListener.java
@@ -13,16 +13,16 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.query.orderbook;
+package org.axonframework.samples.trader.query.orderbook;
import org.axonframework.domain.AggregateIdentifier;
import org.axonframework.eventhandling.annotation.EventHandler;
+import org.axonframework.samples.trader.query.company.CompanyEntry;
+import org.axonframework.samples.trader.query.company.repositories.CompanyQueryRepository;
+import org.axonframework.samples.trader.query.orderbook.repositories.OrderBookQueryRepository;
+import org.axonframework.samples.trader.query.tradeexecuted.TradeExecutedEntry;
+import org.axonframework.samples.trader.query.tradeexecuted.repositories.TradeExecutedQueryRepository;
import org.axonframework.samples.trader.tradeengine.api.order.*;
-import org.axonframework.samples.trader.app.query.company.CompanyEntry;
-import org.axonframework.samples.trader.app.query.company.repositories.CompanyQueryRepository;
-import org.axonframework.samples.trader.app.query.orderbook.repositories.OrderBookQueryRepository;
-import org.axonframework.samples.trader.app.query.tradeexecuted.TradeExecutedEntry;
-import org.axonframework.samples.trader.app.query.tradeexecuted.repositories.TradeExecutedQueryRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
View
2  ...amples/trader/app/query/orderbook/OrderEntry.java → ...rk/samples/trader/query/orderbook/OrderEntry.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.query.orderbook;
+package org.axonframework.samples.trader.query.orderbook;
/**
* @author Jettro Coenradie
View
4 ...erbook/repositories/OrderBookQueryRepository.java → ...erbook/repositories/OrderBookQueryRepository.java
@@ -13,9 +13,9 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.query.orderbook.repositories;
+package org.axonframework.samples.trader.query.orderbook.repositories;
-import org.axonframework.samples.trader.app.query.orderbook.OrderBookEntry;
+import org.axonframework.samples.trader.query.orderbook.OrderBookEntry;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
View
2  ...samples/trader/app/query/portfolio/ItemEntry.java → ...ork/samples/trader/query/portfolio/ItemEntry.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.query.portfolio;
+package org.axonframework.samples.trader.query.portfolio;
/**
* @author Jettro Coenradie
View
2  ...es/trader/app/query/portfolio/PortfolioEntry.java → ...amples/trader/query/portfolio/PortfolioEntry.java
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.query.portfolio;
+package org.axonframework.samples.trader.query.portfolio;
import org.springframework.data.annotation.Id;
View
16 ...p/query/portfolio/PortfolioItemEventListener.java → ...r/query/portfolio/PortfolioItemEventListener.java
@@ -13,16 +13,16 @@
* limitations under the License.
*/
-package org.axonframework.samples.trader.app.query.portfolio;
+package org.axonframework.samples.trader.query.portfolio;
import org.axonframework.eventhandling.annotation.EventHandler;
-import org.axonframework.samples.trader.app.api.portfolio.item.ItemReservationCancelledForPortfolioEvent;
-import org.axonframework.samples.trader.app.api.portfolio.item.ItemReservationConfirmedForPortfolioEvent;
-import org.axonframework.samples.trader.app.api.portfolio.item.ItemsAddedToPortfolioEvent;
-import org.axonframework.samples.trader.app.api.portfolio.item.ItemsReservedEvent;
-import org.axonframework.samples.trader.app.query.orderbook.OrderBookEntry;
-import org.axonframework.samples.trader.app.query.orderbook.repositories.OrderBookQueryRepository;
-import org.axonframework.samples.trader.app.query.portfolio.repositories.PortfolioQueryRepository;
+import org.axonframework.samples.trader.orders.api.portfolio.item.ItemReservationCancelledForPortfolioEvent;
+import org.axonframework.samples.trader.orders.api.portfolio.item.ItemReservationConfirmedForPortfolioEvent;
+import org.axonframework.samples.trader.orders.api.portfolio.item.ItemsAddedToPortfolioEvent;
+import org.axonframework.samples.trader.orders.api.portfolio.item.