Setup with 2 datasources gives an error at startup

Hello Axon-friends,

I created a sample app with 2 datasources here to illustrate the problem i’m facing:

On startup there is some sort of a persistence error and the app quits. If I interpret the error messages correctly; the entity manager is unable to create or fetch segments for the token store. I think I have the “2 datasources” setup just as it is supposed to be. Giving Axon a seperate entity manager from the other JPA datasource.

Hopefully someone is willing to help and can spot my mistake?

regards,
Rafiek

Hello,

Check out this PR → Fix persistence configuration with two data sources by bogdhy · Pull Request #1 · rafiek/double-datasource-axon · GitHub

1 Like

Well the pull-request speaks for itself. Lots of corrections but I guess the main one being that just providing the entity manager instead of a provider is the way to go.

Thank you very much!

1 Like