I’m facing a strange issue after having developed my own CommandBus implementation. The code is available right here: https://github.com/teivah/sky-centralrepository (develop branch).
Basically I implemented a JMSCommandBus and a JMSRequestSubscriber in charge to receive the commands and to manage the UOW events (onCommit, onRollback). When I run the unit tests, everything is working fine.
Yet when I run my main method (the Post test class is then triggered after the application is configured), I am facing an exception in the JMSRequestSubscriber during the handler.handle(command) call. As I said, during unit tests this call in working fine but at runtime, the exception thrown is: java.lang.IllegalArgumentException: argument type mismatch. It’s just like if my CommandHandler was not correctly registered…
If I change the CommandBus bean to the SimpleCommandBus, everything is working fine though.
Any idea guys?