AxonFramework/AxonFramework — pull request #95 by markdingram (2013-08-29 22:06:36+00:00)
Title: AXON-174: Allow specification of user defined Annotation types in AnnotationRoutingResolver

Extend AnnotationRoutingStrategy to allow specifying the type(s) of Annotation that will be checked for, rather than hard wiring to TargetAggregateIdentifier. The use case is to support Command payload classes in POJO API JARs that otherwise have no need to reference Axon code. With this change they can declare their own Annotation types and remain isolated.

-- ended up a bit more than I anticipated here.

(This request includes a 2nd commit which also adds a couple of static 'withCacheing' methods that show how the design allows extension through decoration ... not sure if you will actually want to include this in Axon itself, I am more than happy if this is left outside of the framework)