Over a million developers have joined DZone.

Axon CQRS Framework Releases 0.6

DZone's Guide to

Axon CQRS Framework Releases 0.6

· Java Zone
Free Resource

Bitbucket is for the code that takes us to Mars, decodes the human genome, or drives your next car. What will your code do? Get started with Bitbucket today, it's free.

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.

Bitbucket is the Git solution for professional teams who code with a purpose, not just as a hobby. Get started today, it's free.


Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}