You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2015/05/07 15:28:41 UTC
jclouds-site git commit: Minor addition to context definition
Repository: jclouds-site
Updated Branches:
refs/heads/master 7ba3e07f2 -> 56a75bbb1
Minor addition to context definition
Project: http://git-wip-us.apache.org/repos/asf/jclouds-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds-site/commit/56a75bbb
Tree: http://git-wip-us.apache.org/repos/asf/jclouds-site/tree/56a75bbb
Diff: http://git-wip-us.apache.org/repos/asf/jclouds-site/diff/56a75bbb
Branch: refs/heads/master
Commit: 56a75bbb1b15f94b5707235f74b71941fe47f40e
Parents: 7ba3e07
Author: Ignasi Barrera <na...@apache.org>
Authored: Thu May 7 11:33:38 2015 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Thu May 7 15:26:46 2015 +0200
----------------------------------------------------------------------
start/concepts.md | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jclouds-site/blob/56a75bbb/start/concepts.md
----------------------------------------------------------------------
diff --git a/start/concepts.md b/start/concepts.md
index 30599b9..aaf0a16 100644
--- a/start/concepts.md
+++ b/start/concepts.md
@@ -79,4 +79,10 @@ A context represents a specific connection to a particular provider. From the pe
Once you have created a context via the [ContextBuilder](http://javadocs.jclouds.cloudbees.net/org/jclouds/ContextBuilder.html) and are "connected" to a particular cloud service, you can either get any of the views that are supported by that provider, or go straight to the API or even to the provider level.
+Creating a context is an expensive operation, so in general it is a good idea to create one context per credential and target cloud when the application starts and close it when it terminates. Contexts are thread-safe, so can be shared across your application.
+
+It is important to [close a context](http://jclouds-javadocs.elasticbeanstalk.com/org/jclouds/Context.html) when you no longer need it, to free its associated resources.
+
You can also get a view back from the ContextBuilder and _later_ unwrap it to access the underlying API or provider.
+
+The context also provides access to some low level resources, such as the dependency injection framework or the executors used to perform concurrent operations, so it is important to close it once you are done, to free all its associated resources.