[keycloak-dev] Resolving cyclic dependency issues while implementing new SPI's

Giriraj Sharma giriraj.sharma27 at gmail.com
Tue Aug 4 04:14:10 EDT 2015


Agreed,
For now I managed some work around for PKI/Certificate SPI's to resolve
cyclic dependency issues without moving or refactoring org.keycloak.provider.*
from keycloak-model-api. We may consider moving/refactoring in future.

I am having separate modules for PKI/Certificate SPI's just to keep the
modules structured and independent. But, may be for now I can just put
SPI's directly into keycloak-model-api as you have suggested.

Thanks,

On Tue, Aug 4, 2015 at 1:16 PM, Marek Posolda <mposolda at redhat.com> wrote:

> I agree that moving providers to separate module might be clearer, but not
> sure if it's easily doable. For example
> org.keycloak.provider.ProviderFactory requires KeycloakSession from
> org.keycloak.models package, which requires access to all model classes
> like RealmProvider, UserProvider etc. So moving might require removing
> 'dependency' on RealmProvider and UserProvider from KeycloakSession, which
> will be quite big refactoring...
>
> So I am like 50/50 whether to move or not. Until that, I suggest that you
> put your SPI directly to keycloak-model-api . It already contains bunch of
> other basic SPIs like RealmProvider, UserProvider, UserFederationProvider
> etc.
>
> Marek
>
>
>
> On 4.8.2015 07:31, Giriraj Sharma wrote:
>
> Hi,
>
> IMHO, it will be good if we move the package (org.keycloak.provider) from
> keycloak-model-api to some other module which is used as a common
> dependency by most other modules (like keycloak-core) .
>
> org.keycloak.provider.*  from keycloak-model-api  is used by most of the
> modules which implement certain Spi.
> A module (X) having keycloak-model-api (Y) added as a dependency may in
> turn be used by classes or other Spi's in keycloak-model-api (Y) and thus
> result into a cyclic dependency.
>
> X dependent on Y for org.keycloak.provider.* classes
> Y dependent on X for X specific services/SPI's or classes
>
> keycloak-core is used by many modules but in turn keycloak-core doesn't
> uses any of keycloak-* dependency and hence will not result into any issues
> like cyclic dependency. So, may be moving org.keycloak.provider.* from
> keycloak-model-api to some other(like keycloak-core) will be helpful or may
> be a better practice.
>
> If this seems fine, I will be happy to make the required changes :)
>
> Cheers,
> --
>
> Giriraj Sharma
> about.me/girirajsharma
> <http://about.me/girirajsharma?promo=email_sig>
>   Giriraj Sharma,
> Department of Computer Science
> National Institute of Technology Hamirpur
> Himachal Pradesh, India 177005
>
>
> _______________________________________________
> keycloak-dev mailing listkeycloak-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/keycloak-dev
>
>
>


-- 

Giriraj Sharma
about.me/girirajsharma
<http://about.me/girirajsharma?promo=email_sig>
 Giriraj Sharma,
Department of Computer Science
National Institute of Technology Hamirpur
Himachal Pradesh, India 177005
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20150804/56a1a811/attachment-0001.html 


More information about the keycloak-dev mailing list