[keycloak-user] admin-client hang

Nhut Thai Le ntle at castortech.com
Wed Apr 18 09:35:15 EDT 2018


Thank you for the hint. I use the builder with 80 connections pool and I
still have the hang problem. I didn't know that I have to close the
response. I though the whole point of using pool is that i dont have to
worry about the life cycle of the connection anymore. Anyway, will try what
you suggested.

Thai



On Wed, Apr 18, 2018 at 3:21 AM, Marek Posolda <mposolda at redhat.com> wrote:

> On 17/04/18 21:28, Nhut Thai Le wrote:
>
>> Hello,
>>
>> I'm writing a script to automate our realm setup using keycloak
>> admin-client. I use the same client for multiple calls and at some point,
>> my script hang. Is there any issue with using the same client for multiple
>> calls?
>>
> It's not an issue, but make sure that:
> - You use connection pooling. By default, it's 10 connections. See source
> of classes Keycloak and KeycloakBuilder
> - Make sure you close responses. Especially for the "create" methods,
> which returns Response objects, you need to explicitly close them. For the
> methods, which returns void or JSON objects, you don't need to do anything
>
> If needed, see our testsuite for more inspirations. It's using adminClient
> in almost all the tests.
>
> Is each public method of the admin-client asynchronous? If yes, how
>> do I chain calls like: create realm-> create client -> create resource ->
>> create permissions -> create policy,...
>>
> No, calls are synchronous and chaining shouldn't be an issue.
>
> Marek
>
>>
>> Thai
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
>
>
>


-- 
Castor Technologies Inc
460 rue St-Catherine St Ouest, Suite 613
Montréal, Québec H3B-1A7
(514) 360-7208 o
(514) 798-2044 f
ntle at castortech.com
www.castortech.com

CONFIDENTIALITY NOTICE: The information contained in this e-mail is
confidential and may be proprietary information intended only for the use
of the individual or entity to whom it is addressed. If the reader of this
message is not the intended recipient, you are hereby notified that any
viewing, dissemination, distribution, disclosure, copy or use of the
information contained in this e-mail message is strictly prohibited. If you
have received and/or are viewing this e-mail in error, please immediately
notify the sender by reply e-mail, and delete it from your system without
reading, forwarding, copying or saving in any manner. Thank you.
AVIS DE CONFIDENTIALITE: L’information contenue dans ce message est
confidentiel, peut être protégé par le secret professionnel et est réservé
à l'usage exclusif du destinataire. Toute autre personne est par les
présentes avisée qu'il lui est strictement interdit de diffuser, distribuer
ou reproduire ce message. Si vous avez reçu cette communication par erreur,
veuillez la détruire immédiatement et en aviser l'expéditeur. Merci.


More information about the keycloak-user mailing list