diff --git a/start/concepts.md b/start/concepts.md index 30599b9d..aaf0a16a 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.