[keycloak-user] How to have multiple data sources?

Bill Burke bburke at redhat.com
Tue Feb 28 09:27:06 EST 2017


It would be a lot less effort and maintenance to just provision a 
different keycloak server per realm.  Really easy in this world of 
virtualization and cloud computing.  Why would you not take this 
approach?  We would gladly accept patches that improved provisioning.

But if you're being stubborn, you'd have to refactor the Jpa provider so 
that it could acquire an EntityManager based on the realm name or id as 
datasource and Entitymanager have a one-to-one relationship.

On 2/28/17 6:35 AM, Danny Trunk wrote:
> I have multiple projects and need to set different external databases to
> each of them. I already wrote my own User Storage Provider in order to
> connect to the OFBiz UserLogin Entity. Maybe this can be accomplished by
> writing a custom connection provider?
>
>
> Am 27.02.2017 um 15:58 schrieb Bill Burke:
>> It is not possible to have a data source per realm.  Why would you want
>> to do this?  Why not just provision a different Keycloak deployment?
>> What are you trying to accomplish?
>>
>>
>> On 2/27/17 9:20 AM, Danny Trunk wrote:
>>>       <subsystem xmlns="urn:jboss:domain:datasources:4.0">
>>>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user



More information about the keycloak-user mailing list