[keycloak-user] Keycloak JPA UserFederation Adapter in multiple realms with different Datasource names

Niels Bertram nielsbne at gmail.com
Thu Feb 8 11:49:07 EST 2018


Hi there,

we have a requirement to set the jndi datasource name on a UserFederation
provider when added to a realm to support connecting different realms in
the same Keycloak server to different databases. Been through the examples
and read a few emails from around 2016 in the developer list but do not
find anyone who'd actually done this before. we could create a user managed
EntityManagerFactory within the federation provider factory but the
question is then how can we inject it into the container context and enlist
our transactions in the JTA?

Has anyone ever had to implement something like that?

Cheers,
NIels


More information about the keycloak-user mailing list