Something we'll have to look into. Maybe something you'd be interested
in persuing? :)
On 1/26/17 6:36 AM, Matuszak, Eduard wrote:
In any case, it seems not to be a trivial task. I adhered to Bill's suggestions and
additionally did some expirimental attempts but without success.
It's not a critical topic for me as I can live and work without CDI. Anyhow thanks
for your comments.
[mailto:email@example.com] On Behalf Of Stian Thorgersen
Sent: Tuesday, January 24, 2017 8:50 AM
To: Bill Burke
Subject: Re: [keycloak-user] user storage provider (Keycloak 2.5.0) deployed as war file:
CDI does not work
I'm pretty sure CDI just won't work. When we invoke the provider from Keycloak it
doesn't setup the CDI context as it's not a managed request to the deployment so
the necessary CDI filters and such are not invoked.
On 19 January 2017 at 16:01, Bill Burke <bburke(a)redhat.com> wrote:
> How exactly are you implementing it? Can you point me to some example
> code? Remember, UserStorageProviderFactory *MUST* be a POJO. I
> haven't done CDI in years, but I believe it would work similarly to
> the EJB example, except you'd look up the CDI bean manager and
> allocate your provider through the bean manager.
> On 1/19/17 5:36 AM, Matuszak, Eduard wrote:
>> It is not possible for me, to bring CDI (@Inject) to work in a user
> storage provider application (Keycloak 2.5.0), deployed as a war-file.
> The required beans.xml is placed correctly in the war-file and passed
> by Weld during deployment, but all injected objects are null.
>> Is this a known (and possibly perforced) behaviour, a (minor) bug
> simply due to a missing trick?
>> Thanks in advance for a feedback, Eduard Matuszak
>> keycloak-user mailing list
> keycloak-user mailing list
keycloak-user mailing list