[keycloak-dev] need explanation of distribution for adapters

Pedro Igor Silva psilva at redhat.com
Thu Jan 21 15:15:55 EST 2016


I'm working an adapter based on WildFly Elytron's SPI. In theory, you would be able to implement Elytron's SPI once and have it supported in different WildFly versions.

----- Original Message -----
From: "Stian Thorgersen" <sthorger at redhat.com>
To: "Bill Burke" <bburke at redhat.com>
Cc: keycloak-dev at lists.jboss.org
Sent: Thursday, January 21, 2016 5:37:48 PM
Subject: Re: [keycloak-dev] need explanation of distribution for adapters

True, didn't consider that. We could do it with Infinispan because the methods where actually there, just didn't work on the old version. 

I can't see any other option then. Sucks to have to maintain all this different versions of the adapters. 

On 21 January 2016 at 20:27, Bill Burke < bburke at redhat.com > wrote: 



You still have to have different jars as how would Wildfly9Impl and Wildfly10Impl compile? Again, the type parameters used in Wildfly9 don't exist in 10. The ones used in 10 don't exist in 9. 


On 1/21/2016 2:19 PM, Stian Thorgersen wrote: 



What I mean is: 

if (TheProblemClass.class.getMethod("..").getParameterTypes()[0].equals(SomeObject.class)) { 
return new WildFly9Impl(); 
} else { 
return new WildFly10Impl(); 
} 

Is that not simpler and easier for users than creating a whole new adapter dist? 

On 21 January 2016 at 20:11, Bill Burke < bburke at redhat.com > wrote: 





On 1/21/2016 1:43 PM, Stian Thorgersen wrote: 





On 21 January 2016 at 18:31, Bill Burke < bburke at redhat.com > wrote: 


I need to create a separate adapter distro for Wildfly 10 as it is not 
compatible with Wildfly 8 and 9. To do this, I need an explanation of 
the distribution directory for adapters 

Would it not be cleaner to incorporate something in the adapter that uses different classes depending on the undertow version? 

No idea what you mean. The undertow class/method in question has a different signature between 8-9 and 10. The method call has parameters whose types don't exist in one or the other's versions. Basically I'll be creating a wildfly10-adapter-spi and wildfly9-adapter-spi jar that each have one class in them. These modules are included in the adapter-spi module. I just don't see any way around that. 

-- 
Bill Burke
JBoss, a division of Red Hat http://bill.burkecentral.com 


-- 
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