Using Beans Scopes

Felipe Gutierrez · Apress eBooks · 2014

So far you have an application called My Documents that for now is exposing a service that returns either all the documents available or it can return a list of documents by specific type. We were talking about the SearchEngine class implementation and the way you had configured it. Based on your XML configuration, you have set its scope to be a . Singleton class, meaning that every time you require it by invoking the context.getBean method, you always get the same instance. But what happens if you require different instances, such as another service that is required to handle a fresh instance of your SearchEngine implementation to use its search methods. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Read the paper · More papers on PaperTik