Java Frameworks
LATEST FINAL ASSESSMENT
REVIEW
Q&S
©2024/2025
,1. Multiple Choice: Which of the following is not a feature of the
Spring Framework?
a) Dependency Injection
b) Aspect-oriented programming
c) Inheritance-based form validation
d) Portable Service Abstractions
Answer: c) Inheritance-based form validation. Rationale:
Spring Framework provides support for custom validation
through the Validator interface but does not have a feature called
'inheritance-based form validation'.
2. Fill-in-the-Blank: The annotation used to handle exceptions in
Spring MVC is ____________.
Answer: @ExceptionHandler. Rationale: The
@ExceptionHandler annotation is used within a controller to
handle exceptions specifically for handler methods.
3. True/False: In Hibernate, the SessionFactory is thread-safe.
Answer: True. Rationale: The SessionFactory is a thread-safe
object that is typically created once during application
initialization and used for creating Session instances.
©2024/2025
, 4. Multiple Response: Select all that apply. Which of the
following are valid module layers in the Spring Framework?
a) Data Access/Integration
b) Web
c) Messaging
d) Instrumentation
e) AOP
Answers: a), b), c), e). Rationale: All are valid module layers
except for 'Instrumentation', which is not recognized as a separate
layer in the Spring Framework.
5. Multiple Choice: What does the @Transactional annotation do
in Spring?
a) Defines a cache policy
b) Marks a method to execute within a database transaction
c) Sets the isolation level of a database connection
d) Configures the transaction management type
Answer: b) Marks a method to execute within a database
transaction. Rationale: The @Transactional annotation is used to
declare that a method should be executed within a transactional
context.
©2024/2025