Mitch Pronschinske is a Senior Content Analyst at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. Mitch is a DZone Zone Leader and has posted 2576 posts at DZone. You can read more from them at their website. View Full User Profile

Axon CQRS Framework Releases 0.6

  • submit to reddit
Allard Buijze of JTeam released version 0.6 of the Axon Framework (for Java) today.  He says that this version has taken another major step towards full production readiness.  Axon 0.6 has a new mechanism to trigger snapshots and supports testing applications with 'given-when-test' fixtures.  

The Google Code page introduces this framework for those who have never heard of it:

Axon Framework helps build scalable, extensible and maintainable applications by supporting developers apply the Command Query Responsibility Segregation (CQRS) architectural pattern. It does so by providing implementations, sometimes complete, sometimes abstract, of the most important building blocks, such as aggregates, repositories and event busses (the dispatching mechanism for events). Furthermore, Axon provides annotation support, which allows you to build aggregates and event listeners without tying your code to Axon specific logic. This allows you to focus on your business logic, instead of the plumbing, and helps you makes your code easier to test in isolation.

CQRS Architecture

Brand New in 0.6

Test Fixtures - Thes allow you to test command handling logic based on events and commands.  In 0.6 they are now part of the axon-test module.  You can define them in a given-when-then style.  

CommandBus - This interface now allows asynchronous command dispatching.  A callback can now be used to be notified of a command execution's result instead of using a return value.

- A new mechanism triggers snapshots based on the number of events that must load in order to reconstitute an aggregate.  When the events exceed a certain threshold, a snapshot is taken.

Repositories - They can now detect incompatible modifications.  Event sourcing repositories can provide a more advanced method for detecting conflicts.  The ConflictResolver can detect many of the conflicts in concurrent modifications.

UnitOfWork - The repositories now make use of the UnitOfWork instance to keep track of changed aggregates and generated events.  UnitOfWork can store changed aggregates and dispatch events when it is committed.  It does not have to save each aggregate separately.  

Finally, SimpleCommandBus and SimpleEventBus expose statistics over JMX.

Download the Axon Framework here.