Example for Saga Spring config without "axon" namespace?

Hi Allard,

Do you have an example for a Spring based Saga configuration without
using the "axon" namespace?

Should something like this:

Hi Michael,

the entity manager is automatically injected by spring if you have an EntityManagerFactory in your context. No need to explicitly set it.

Cheers,

Allard

Hi Allard,

Thanks. Works so far.

Only injection of the CommandBus into the ProjectStructureSaga does
not work...
(Event method is called but the transient "commandBus" variable is
null)
Anything missing?

The config is now as follows:

Finally got it...

I added @Named to the ProjectStructureSaga and @Inject to the command
bus variable:

@Named
public class ProjectStructureSaga extends AbstractAnnotatedSaga {

@Inject
private transient CommandBus commandBus;
   :
}

The Spring context looks now like this:

Only one thing left:

The "associationvalueentry" contains Java serialized objects and does
not use the XStream Serializer.

Hi, good point. Probably the saga serializer should also serialize the association values. For some reason, I didn't apply the serialization configuration there.

Cheers,

Allard