Spring/Spring Mcq Set 15 Sample Test,Sample questions

Question:
 A message listener must implement the:-

1.javax.jms.MessageListener

2.javax.jms.Message

3. javax.jms

4.None of the mentioned


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

1.True

2.False

3.none

4.all the mentoined


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

1.@After

2. @Splitter

3.@Aggregator

4.None of the mentioned


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

1.message-driven bean

2. message-driven

3.message bean

4.None of the mentioned


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

1.convertAndSend()

2.receiveAndConvert()

3.all of the mentioned

4.None of the mentioned


Question:
 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.

1. org.springframework.jms.connection.SingleConnectionFactory

2.org.springframework.jms.connection.Single

3.org.springframework.jms.connection.SingleConnection

4.None of the mentioned


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

1.File transfer

2.Shared Database

3.Remote Procedure Invocation

4.Messaging


Question:
 MDB must implements interfaces:-

1. javax.ejb.MessageDrivenBean

2.javax.jms.MessageListener

3.all of the mentioned

4.None of the mentioned


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

1.True

2.False

3.none

4.all the mentoined


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

1.True

2.False

3.none

4.all the mentoined


Question:
 Spring provides several types of message listener containers:-

1.SimpleMessageListenerContainer

2.DefaultMessageListenerContainer

3.All of the mentioned

4.None of the mentioned


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

1.True

2. False

3.none

4.all the mentoined


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

1. SequenceSizeCompletionStrategy

2.SequenceSizeCompletion

3. SequenceSize

4.None of the mentioned


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

1.True

2.False

3.none

4.all the mentoined


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

1.True

2.False

3.none

4.all the mentoined


Question:
ActiveMQ, provides only one pooled connection factory class alternative.

1.True

2.False

3.none

4.all the mentoined


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

1. Messaging

2.MessagingException

3.Exception

4.None of the mentioned


Question:
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.

1.True

2.False

3.none

4.all the mentoined


Question:
Annotation to get access to header metadata:-

1.@Ref

2. @service

3. @Header

4.None of the mentioned


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

1. True

2.False

3.none

4.all the mentoined


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

1.org.springframework.integration.file.FileHeaders: FILENAME

2.org.springframework.integration.file.FileHeaders: PREFIX

3.all of the mentioned

4.None of the mentioned


Question:
Headers Found in Spring Integration Messages:-

1.ID

2.TIMESTAMP

3.CORRELATION_ID

4.All of the mentioned


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

1. SimpleMessageListenerContainer

2.DefaultMessageListenerContainer

3.All of the mentioned

4.None of the mentioned


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

1. @MessageDrive

2.@Message

3.all of the mentioned

4.@MessageDriven


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

1.File transfer

2.Shared Database

3.Remote Procedure Invocation

4.Messaging


Question:
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.

1.File transfer

2.Shared Database

3.Remote Procedure Invocation

4.Messaging


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

1. File transfer

2. Shared Database

3.Remote Procedure Invocation

4.Messaging


Question:
It caches consumers correctly, or use Spring ConnectionFactory implementations.

1.MessageListenerContainer

2.MessageListener

3. MessageContainer

4.None of the mentioned


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

1.JmsGatewaySupport

2. JmsGateway

3.All of the mentioned

4.None of the mentioned


Question:
Method to convert MapMessage Object into Spring runtime exception JmsException.

1. JmsUtils.convertJmsAccessException()

2. JmsUtils.convertJmsAccess()

3. JmsUtils.convertJms()

4. none of the mentioned


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

1.org.springframework.integration.router.ErrorMessageExceptionType

2.org.springframework.integration.router.ErrorMessageException

3.org.springframework.integration.router.ErrorMessageExceptionTypeRouter

4.none of the mentioned


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

1.java.util.Collection

2. java.util.Date

3.all of the mentioned

4. none of the mentioned


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

1.True

2.False

3.all of the mentioned

4.None of the mentioned


Question:
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 :-

1. error

2.exceptionChannel

3.exception

4.errorChannel


Question:
Spring Integration ships with useful splitters that require no customization.

1.Splitter

2.XPathMessageSplitter

3.All of the mentioned

4.None of the mentioned


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

1.True

2.False

3.none

4.all the mentoined


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

1. True

2.False

3.none

4.None of the mentioned


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

1.Message<java.io.File>

2.Message<java.io>

3.All of the mentioned

4.None of the mentioned


Question:
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:-

1.service-activator

2. service

3.all of the mentioned

4.None of the mentioned


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

1.ref

2.after

3.before

4.All of the mentioned


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

1.splitter

2.fork

3. all of the mentioned

4. none of the mentioned


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

1. adding extra headers or augmenting the payload

2.transformer

3.all of the mentioned

4.None of the mentioned


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

1.org.apache.activemq.ActiveMQConnectionFactory

2.org.apache.activemq.ActiveMQConnection

3.org.apache.activemq.ActiveMQ

4. none of the mentioned


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

1.True

2.False

3.none

4.all the mentoined


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

1. send

2. receive

3.All of the mentioned

4.None of the mentioned


Question:
When you need access to the JMS template.

1. setJmsTemplate

2.getJmsTemplate

3. getJms

4. none of the mentioned


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

1. True

2.False

3.none

4.all the mentoined


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

1.True

2. False

3.none

4.all the mentoined


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

1.True

2.False

3.none

4.all the mentoined


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

1.True

2.False

3.none

4.all the mentoined


More MCQS

  1. Spring Mcq Set 1
  2. Spring Mcq Set 2
  3. Spring Mcq Set 3
  4. Spring Mcq Set 4
  5. Spring Mcq Set 5
  6. Spring Mcq Set 6
  7. Spring Mcq Set 7
  8. Spring Mcq Set 8
  9. Spring Mcq Set 9
  10. Spring Mcq Set 10
  11. Spring Mcq Set 11
  12. Spring Mcq Set 12
  13. Spring Mcq Set 13
  14. Spring Mcq Set 14
  15. Spring Mcq Set 15
  16. Spring Mcq Set 16
  17. Spring Mcq Set 17
  18. Spring Mcq Set 18
  19. Spring Mcq Set 19
  20. Spring Mcq Questions
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!