Spring Interview Questions - 8 | Snaprecruit.com

Spring Interview Questions - 8 | Snaprecruit.com

Spring interview questions part 8

Spring interview questions part 8

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. There’s nothing to prevent you from having many steps within the flow elements.

Correct Answer is : TRUE

2. Spring Batch provides a mechanism to offload processing to another process.

Correct Answer is : remote chunking

3. Pattern which refers to the arrangement of multiple JMS clients all consuming the same queue messages.

Correct Answer is : aggressive-consumer

4. Spring Batch ships with only handler, which executes steps in multiple threads using a TaskExecutor strategy.

Correct Answer is : TaskExecutorPartitionHandler

5. To determine the next step is the simplest example of a conditional flow.

Correct Answer is : ExitStatus

6. If you want to vary the execution flow based on some logic more complex than a job’s ExitStatuses:-

Correct Answer is : Decision

7. Spring Batch work with a system scheduler:-

Correct Answer is : all of the mentioned

8. JobLauncher reference you configured previously is obtained and used to then launch an instance of a Job.

Correct Answer is : TRUE

9. TaskExecutor that will spawn a thread of execution and manage that thread without blocking.

Correct Answer is : SimpleAsyncTaskExecutor

10. The CommandLineJobRunner for success will return system error codes:-

Correct Answer is : 0

11. More complicated return codes can be returned by creating and declaring a top-level bean that implements the interface:-

Correct Answer is : ExitCodeMapper

12. The bean is recognized and becomes part of the application context because of the:-

Correct Answer is : @Component

13. To parameterize a job, which is then available to your steps through Spring Batch expression language.

Correct Answer is : JobParameters

14. Beans can be created by which of the following properties?

Correct Answer is : It’s own constructor

15. Which attribute is used to specify class name of the bean?

Correct Answer is : class

16. Which of the following method can be used to used to instantiate a method?

Correct Answer is : static factory method

17. Which attribute is used to specify static factory-method?

Correct Answer is : factory-method

18. Purpose of Static Factory Method?

Correct Answer is : Static method to create an object

19. Exception thrown by factory method?

Correct Answer is : BeanCreationException

20. What will be the output? Snippet of Code: public class CreatePro { String ProductId; public CreatePro(String ProductId) { this.ProductId = ProductId; }   public static Product creation_Product(String productId) { System.out.println("Bean Created"); if ("aaa".equals(productId)) { return new Battery("AAA", 2.5); } else if ("cdrw".equals(productId)) { return new Disc("CD-RW", 1.5); } } }

Correct Answer is : BeanCreationException

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon