jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds/jclouds-site] Document workaround to revert to shared credential store (#200)
Date Tue, 18 Jul 2017 06:27:06 GMT
nacx commented on this pull request.

> @@ -548,3 +548,20 @@ The jclouds API allows many `Statements` to be built entirely from
high-level co
 without having to resort to OS-specific scripts. This enables developers to express what
they mean without having
  to deal with the gory details of various OS flavors.
 To see the commands that will be executed, print the result of `Statement.render(OsFamily.UNIX)`,
for example.
+### Sharing the credential store between ComputeService instances
+By default there's a separate credential store per ComputeService instance. To change that
and share the
+same credential store between instances create your ComputeService as follows:
+{% highlight java %}
+public static final Map<String, ByteSource> SHARED_CREDENTIAL_STORE = new ConcurrentHashMap<String,
+Module sharedCredStore = new CredentialStoreModule(SHARED_CREDENTIAL_STORE);

It should make no difference. The important thing is to have every context using the same
backing map for the credential store. Whether it is static or not is not relevant.
I think being the Map the static field (and not the module) better emphasizes the fact that
what needs to be shared is the backing map? And that anyone can switch implementations to
whatever meaning of `shared` applies to their use case.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
View raw message