[keycloak-dev] Hybrid store committed

Stian Thorgersen stian at redhat.com
Tue Jul 8 08:37:38 EDT 2014



----- Original Message -----
> From: "Bill Burke" <bburke at redhat.com>
> To: keycloak-dev at lists.jboss.org
> Sent: Tuesday, 8 July, 2014 1:17:17 PM
> Subject: Re: [keycloak-dev] Hybrid store committed
> 
> 
> 
> On 7/8/2014 7:10 AM, Stian Thorgersen wrote:
> > I've committed the hybrid store including jpa store implementations. It's
> > enabled by default for the testsuite and the server, using jpa for realms
> > and users, and mem for sessions.
> >
> > By default the JPA stores all use the same persistence-unit, but it's
> > possible to split into multiple persistence-units and configure through
> > keycloak-server.json if someone wants to for example store realms in one
> > db and users in another.
> >
> > Remaining work includes:
> >
> > * Mongo stores
> > * Updates to Keycloak session - remove model methods and add an enlist
> > transaction feature for providers
> > * EntityManager and Mongo connection providers - I'm going to add providers
> > for retrieving EntityManager instances and Mongo clients. The main reason
> > for this is so that multiple stores can share the same
> > connection/transaction when possible
> 
> My memory is hazy, but I think there is some automatic session
> management that EMF is supposed to do.  So I don't think you need
> keycloak providers for EM creation. I'll have to look into it.

It may share the connection, but it's not going to share the transaction. With the EM provider we can have a single transaction enlisted with the KeycloakSession. At the moment you could end up with 4 transactions (realms, users, sessions and audit) for a single request!

> 
> > * Delete JPA and Mongo model providers
> > * Update tests
> > _______________________________________________
> > keycloak-dev mailing list
> > keycloak-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-dev
> >
> 
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
> 


More information about the keycloak-dev mailing list