Spring MCQ Quiz Hub

Spring Mcq Set 15

Choose a topic to test your knowledge and improve your Spring skills

JMS sender and receiver classes can also extend to retrieve a JMS template:-





✅ Correct Answer: 1

When you need access to the JMS template.





✅ Correct Answer: 2

Spring provides an implementation of SimpleMessageConvertor to handle the translation of a JMS message received.





✅ Correct Answer: 1

y default, the JMS template uses SimpleMessageConverter for converting TextMessage to or from a string.





✅ Correct Answer: 1

For your front desk and back office classes, you can send and receive a map using the:-





✅ Correct Answer: 3

When you call the receive() method on a JMS message consumer to receive a message.





✅ Correct Answer: 2

EJB component which was introduced for asynchronous reception of JMS messages.





✅ Correct Answer: 1

MDB must implements interfaces:-





✅ Correct Answer: 3

In EJB 3.0, an MDB can be a POJO that implements the MessageListener interface and is annotated with the:-





✅ Correct Answer: 4

You create a message listener to listen for JMS messages. This negates the need for the approach taken in BackOfficeImpl in previous recipes.





✅ Correct Answer: 1

A message listener must implement the:-





✅ Correct Answer: 1

When a JMS message arrives, the onMessage() method will be called with the message as the method argument.





✅ Correct Answer: 1

Method to convert MapMessage Object into Spring runtime exception JmsException.





✅ Correct Answer: 1

Spring provides several types of message listener containers:-





✅ Correct Answer: 3

If you have a transaction requirement in receiving messages, you have to use:-





✅ Correct Answer: 2

You have to set the delegate property of MessageListenerAdapter to your target bean.





✅ Correct Answer: 1

Using Spring JMS support with a very simple instance of:-





✅ Correct Answer: 1

ActiveMQ, provides only one pooled connection factory class alternative.





✅ Correct Answer: 1

It caches consumers correctly, or use Spring ConnectionFactory implementations.





✅ Correct Answer: 1

Implementation which returns the same underlying JMS connection each time (which is thread-safe according to the JMS API) and ignores calls to the close() method.





✅ Correct Answer: 1

Integration of Spring which has each application produce files of shared data for others to consume.





✅ Correct Answer: 1

Integration of Spring which has the applications store the data they want to share in a common database.





✅ Correct Answer: 2

Integration of Spring which has each application expose some of its procedures so that they can be invoked remotely and have applications invoke them to initiate behavior and exchange data.





✅ Correct Answer: 3

Integration of Spring which has each application connect to a common messaging system and exchange data and invoke behavior using messages.





✅ Correct Answer: 4

Using an ESB lets you hide the origin of the message from the code that’s handling it.





✅ Correct Answer: 1

As with a standard MDP, a configuration for the ConnectionFactory exists.





✅ Correct Answer: 1

The configuration starts with the inboundHelloJMSMessageChannel channel, which tells Spring Integration what to name the point-to-point connection from the message queue to the:-





✅ Correct Answer: 1

An adapter is a component that knows how to speak to a specific type of subsystem and translate messages on that subsystem into something that can be used in the Spring Integration bus only.





✅ Correct Answer: 1

A service-activator, however, only helps you invoke your application’s business logic on receipt of a message.





✅ Correct Answer: 1

The next component, a service-activator, listens for messages coming into that channel and invokes the bean referenced by the:-





✅ Correct Answer: 1

Headers Found in Spring Integration Messages:-





✅ Correct Answer: 4

Some header values are specific to the type of the source message payload.





✅ Correct Answer: 1

Component-specific headers are the constants defined for files on:-





✅ Correct Answer: 3

Annotation to get access to header metadata:-





✅ Correct Answer: 3

The code for the service-activator has changed to reflect the fact that you’re expecting a message containing a message of type:-





✅ Correct Answer: 1

To send a message into the bus and transform it before working with it further.





✅ Correct Answer: 3

Spring Integration provides a transformer message endpoint to permit the augmentation of the message headers.





✅ Correct Answer: 1

Spring Integration provides the ability to catch exceptions and send them to an error channel of your choosing. By default, it’s a global channel called :-





✅ Correct Answer: 4

The errorChannel doesn’t need to be a service-activator.





✅ Correct Answer: 1

All errors thrown from Spring Integration components will be a subclass of:-





✅ Correct Answer: 2

One way to discriminate by Exception type is to use:-





✅ Correct Answer: 3

Sending all the errors to the same channel can eventually lead to a large switch-laden class that’s too complex to maintain.





✅ Correct Answer: 1

You can explicitly specify on what channel errors for a given integration should go.





✅ Correct Answer: 1

Spring Integration will use that header and forward errors encountered in the processing of this message to that channel.





✅ Correct Answer: 1

To fork the process flow from one component to many, either all at once or to a single one based on a predicate condition.





✅ Correct Answer: 1

A splitter takes an input message and asks you, the user of the component, on what basis it should split the Message.





✅ Correct Answer: 1

Spring Integration ships with useful splitters that require no customization.





✅ Correct Answer: 2

Return type of the method annotated by the @Splitter annotation is of type:-





✅ Correct Answer: 1

Annotation which collects a series of messages (based on some correlation that you help Spring Integration make between the messages).





✅ Correct Answer: 3

To determine how many messages to read until it can stop:-





✅ Correct Answer: 1