R4RIN
MCQS
Spring MCQ Quiz Hub
Spring Mcq Set 16
Choose a topic to test your knowledge and improve your Spring skills
1. The only custom logic is a POJO with an @Aggregator annotation on a method expecting a collection of Message objects.
True
False
none
all the mentoined
2. You want to conditionally move a message through different processes based on some criteria.
router component
EAI
all of the mentioned
None of the mentioned
3. There are some convenient default routers available to fill common needs:-
PayloadTypeRouter
PayloadType
Payload
none of the mentioned
4. To receive messages from an external system and process them using Spring Integration.
channel
channel adapter
EJP
None of the mentioned
5. Adapters are opaque in nature.
True
False
none
all the mentoined
6. Sometimes, functionality is made available from within the application via:-
Stable API
Cohesive API
All of the mentioned
None of the mentioned
7. You use Spring Integration’s inbound-channel-adapter element to wire the TwitterMessageSource and a poller element.
True
False
none
all the mentoined
8. The API surfaces a Paging object, which works something like Criteria in Hibernate.
True
False
none
all the mentoined
9. To take an input file or a payload and reliably, and systematically, decompose it into events that an ESB can work with:-
Splitter
Spring Batch
All of the mentioned
None of the mentioned
10. Spring Integration does support reading files into the bus.
True
False
none
all the mentoined
11. No processing system (such as an ESB) can deal with a million records at once efficiently.
True
False
all of the mentioned
None of the mentioned
12. Spring Batch reads the file, transforms the records into:-
objects
outputs
all of the mentioned
None of the mentioned
13. The BPM engine would thread together the different actors and work lists,
True
False
none
all the mentoined
14. You want to expose an interface to clients of your service, without betraying the fact that your service is implemented in terms of messaging middleware.
Enterprise Integration Patterns
Gateway
All of the mentioned
None of the mentioned
15. Serving to abstract away the functionality of other components in an abbreviated interface to provide courser functionality.
facade
façade
gateway
None of the mentioned
16. The capability to hide messaging behind a POJO interface.
Lingo
JCA
JMS
All of the mentioned
17. The most fundamental support for gateways comes from the Spring Integration class:-
SimpleMessagingGateway
SimpleMessaging
SimpleGateway
None of the mentioned
18. The SimpleMessagingGateway needs a request and a response channel, and it coordinates the rest.
True
False
none
all the mentoined
19. The first thing that the client configuration does is import a shared application context (to save typing if nothing else) that declares a JMS connection factor.
True
False
none
all the mentoined
20. Messages sent on the requests channel are forwarded to the:-
jms:outbound-gateway
jms:outbound
jms-gateway
all of the mentioned
21. The gateway element simply exists to identify the component and the interface.
True
False
none
all the mentoined
22. There is no coupling between the client facing interface exposed via the gateway component and the interface of the service that ultimately handles the messages.
True
False
none
all the mentoined
23. The service-activator is what handles actual processing and there’s no mention of a response channel, for either the service-activator, or for the inbound JMS gateway.
True
False
none
all the mentoined
24. Spring Batch provides a lot of flexibility and guarantees to your application, but it cannot work in a vacuum. To do its work:-
Job
JobRepo
JobRepository
All of the mentioned
25. There’s only one really useful implementation of the JobRepository interface, which stores information about the state of the batch processes in a database.
SimpleJobRepository
SimpleJob
SimpleRepo
All of the mentioned
26. To load the contents of a properties file (batch.properties) whose values you use to configure the data source.
PropertyPlaceholder
PropertyPlaceholderConfigurer
Property
PropertyConfigurer
27. MapJobRegistry instance. This is critical—it is the central store for information regarding a given Job.
True
False
none
all the mentoined
28. SimpleJobLauncher, whose sole purpose is to give you a mechanism to launch batch jobs, where a “job” in this case is our batch solution.
True
False
none
all the mentoined
29. Spring Batch models solutions using XML schema.
True
False
none
all the mentoined
30. However, it’s important to wear another hat, that of a DBA, when writing applications.
True
False
none
all the mentoined
31. Indeed, a step could be considered the smallest unit of work for a job. Input (what’s read) is passed to the Step and potentially processed; then output (what’s written) is created from the step.
Steplet
Tasklet
All of the mentioned
None of the mentioned
32. Attribute to configure how many items will be processed before the transaction is committed all the input is sent to the writer.
interval
commit
commit-interval
None of the mentioned
33. Class which delegates the task of delimiting fields and records within a file to a LineMapper, which in turn delegates the task of identifying the fields within that record, to LineTokenizer.
org.springframework.batch.item.file.FlatFileItemReader
org.springframework.batch.item.file.FlatFile
org.springframework.batch.item.file.FlatFileItem
org.springframework.batch.item.file.FileItemReader
34. The names and values for the named parameters are being created by the bean configured for the itemSqlParameterSourceProvider property, an instance of the interface
BeanPropertyItemSqlParameterSourceProvider
BeanPropertyItemSqlParameterSource
BeanPropertyItemSqlParameter
All of the mentioned
35. There’s support for writing JMS:-
JmsItemWriter
JpaItemWriter
JdbcBatchItemWriter
All of the mentioned
36. The processor attribute on the chunk element expects a reference to a bean of the interface:-
org.springframework.batch.item.Item
org.springframework.batch.item
org.springframework.batch.item.ItemProcessor
none of the mentioned
37. Spring Batch provides a convenience class, CompositeItemProcessor, which forwards the output of the filter to the input of the successive filter.
True
False
none
all the mentoined
38. If the preceding job was run on a batch with a 100 rows, each item was read and passed through the processor, and it found 10 items invalid (it returned null 10 times), the value for the filter_count column would be:-
100
1
10
1000
39. Transaction capabilities are built on top of the first class support already provided by the core Spring framework.
True
False
none
None of the mentioned
40. Spring core framework provides first-class support for transactions.
Transaction
TransactionManager
All of the mentioned
none of the mentioned
41. The batch.xml file establishes a:-
BasicDataSource
DataSourceTransactionManager
All of the mentioned
None of the mentioned
42. Spring Batch will, by default, try to pluck the:-
PlatformTransactionManager
transactionManager
All of the mentioned
None of the mentioned
43. Spring Batch excels in the robustness it surfaces as simple configuration options for the edge and failure cases.
True
False
none
all the mentoined
44. Element to configure this for the step:-
no-rollback-exception-classes
no-rollback-exception
no-rollback
None of the mentioned
45. You want to work with a resource that may fail when you try to read from or write to it.
TransactionManager
Transaction
Spring batch retry
all of the mentioned
46. Some invocations will fail but may be retried with some likelihood of success in a transactional scenario.
True
False
none
all the mentoined
47. You can specify exception classes on which to retry the operation. <step id = "step23"> <tasklet transaction-manager="transactionManager"> <chunk reader="csvFileReader" writer="jdbcItemWriter" commit-interval="10" retry-limit="3" cache-capacity="10"> <retryable-exception-classes> <include class="org.springframework.dao.DeadlockLoserDataAccessException"/> </retryable-exception-classes> </chunk> </tasklet> </step>
True
False
none
all the mentoined
48. You can leverage Spring Batch support for retries and recovery in your own code.
True
False
none
all the mentoined
49. The template that (much like its various other Template cousins) isolates your logic from the nuances of retries and instead enables you to write the code as though you were only going to attempt it once.
Retry
RetryTemplate
All of the mentioned
None of the mentioned
50. The RetryTemplate supports many use cases, with convenient APIs to wrap.
True
False
none
all the mentoined
Submit