[keycloak-dev] federation commited need feedback
Bill Burke
bburke at redhat.com
Thu Jul 24 15:13:06 EDT 2014
On 7/24/2014 1:42 PM, Marek Posolda wrote:
> Right now what I am doing for export/import is creating session just for
> retrieving ExportProvider or ImportProvider and then particular
> ExportProvider or ImportProvider is starting it's own
> session/transaction lifecycles whenever it needs them -
> https://github.com/keycloak/keycloak/blob/master/export-import/export-import-api/src/main/java/org/keycloak/exportimport/ExportImportManager.java#L34
> . It's kind of a hack IMO...
>
KeycloakSessionFactory now has:
<T extends Provider> ProviderFactory<T> getProviderFactory(Class<T>
clazz);
<T extends Provider> ProviderFactory<T> getProviderFactory(Class<T>
clazz, String id);
So you could use them instead of creating a session. Maybe there
should be a separate FactoryFinder interface? If you want to pull those
methods into a FactoryFinder interface I guess that could be done.
Honestly, I don't understand why we need all these component layers for
export/import. Seems a bit over-engineered in that regards, IMO, and
now you want to add even more component layers to manage something that
should be pretty straightforward.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
More information about the keycloak-dev
mailing list