Full-stack dev quiz question #42

Full-stack dev quiz question #42

quiz

To fully use Spring, you have to understand how it works. Can you answer a question about services' scope? Fortieth second question of the quiz checks it.

 

 

 

You have the following service:

 @Service
public class LicensingService {

   
public License getLicense(Long appId) {
        ...
    }

}

How many instances will exist in the running web application? Choose the best answer.

  1. one for each request,
  2. one for each session,
  3. one for the Spring container,
  4. one for the whole application cluster

For the correct answer scroll down

.

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.

.

.

The correct answer is: d.

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.