Skip to content

Latest commit

 

History

History
98 lines (94 loc) · 2.84 KB

spring-multiple-choice-questions.md

File metadata and controls

98 lines (94 loc) · 2.84 KB

Spring Multiple Choice Questions Answers

Q. In Spring, which of the following methods is used to shut down the IoC container?

  • shutdownHook()
  • shutdownHandler()
  • registerHook()
  • registerShutdownHook()
registerShutdownHook()

Q. Which of the following is the classification of different autowire in Spring?

  • byName, byType, destructor, and autodetect
  • byName, byMethod, constructor, and autodetect
  • byName, byType, constructor, and autocorrect
  • byName, byType, constructor, and autodetect
byName, byType, constructor, and autodetect 

Q. The java 5 feature has been introduced in Spring __________ version.

  • 2.5
  • 3.0
  • 2.0
  • 4.0
3.0

Q. In Spring, which of the following is the correct way for using idref attribute?

  • Setter method
  • Constructor argument
  • Setter method and Constructor argument
  • Arguments
Setter method and Constructor argument

Q. In Spring, which of the following about the scope of a stateful bean is correct?

  • Singleton scope
  • Prototype scope
  • Singleton and prototype scope
  • None of these
Singleton scope

Q. The concept of an endpoint in web services is much like that of a controller in web applications.

  • True
  • False
True

Q. Spring-WS provides various abstract endpoint classes for you to process the request.

  • org.springframework.ws.server.endpoint
  • org.springframework.ws.server
  • org.springframework.*
  • none of the mentioned
org.springframework.ws.server.endpoint

Explanation: Spring-WS provides various abstract endpoint classes for you to process the request and response 
XML messages using different XML processing technologies and APIs. These classes are all located in the
org.springframework.ws.server.endpoint package.

Q. Endpoint Classes for DOM:-

  • AbstractDomPayloadEndpoint
  • AbstractJDomPayloadEndpoint
  • AbstractDom4jPayloadEndpoint
  • AbstractXomPayloadEndpoint
AbstractDomPayloadEndpoint

Explanation: Endpoint Classes for Different XML Processing Technologies/APIs

Q. If you need to get access to the entire SOAP message, you should write an endpoint class by implementing:-

  • org.springframework.ws.server.endpoint.MessageEndpoint
  • org.springframework.ws
  • org.springframework.ws.server.endpoint
  • all of the mentioned
org.springframework.ws.server.endpoint.MessageEndpoint

Q. Web services can be invoked through the core template class:-

  • org.springframework.ws.client.core.WebServiceTemplate
  • JDBC Template
  • All of the mentioned
  • None of the mentioned
org.springframework.ws.client.core.WebServiceTemplate

Q. WebServiceTemplate provides a sendSourceAndReceiveToResult() method that accepts arguments:-

  • java.xml.transform.Source
  • java.xml.transform.Result
  • all of the mentioned
  • none of the mentioned
all of the mentioned