Spring interview questions part 26

Spring interview questions part 26

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

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

Correct Answer is : TRUE

2. Method to convert MapMessage Object into Spring runtime exception JmsException.

Correct Answer is : JmsUtils.convertJmsAccessException()

3. Spring provides several types of message listener containers:-

Correct Answer is : All of the mentioned

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

Correct Answer is : DefaultMessageListenerContainer

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

Correct Answer is : TRUE

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

Correct Answer is : org.apache.activemq.ActiveMQConnectionFactory

7. ActiveMQ, provides only one pooled connection factory class alternative.

Correct Answer is : FALSE

8. It caches consumers correctly, or use Spring ConnectionFactory implementations.

Correct Answer is : MessageListenerContainer

9. 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 is : org.springframework.jms.connection.SingleConnectionFactory

10. Class which represents a real-world entity and its instances will be persisted to a database.

Correct Answer is : all of the mentioned

11. Each entity class to be persisted by an ORM framework, a default constructor with no argument is required.

Correct Answer is : TRUE

12. If the identifier value is null, this entity will be treated as a new and unsaved entity.

Correct Answer is : TRUE

13. To allow the identifier to be null, you should choose a primitive wrapper type:-

Correct Answer is : all of the mentioned

14. A set of persistent annotations for you to define mapping metadata.

Correct Answer is : JPA

15. For mapping and persisting your objects with Hibernate and JPA.

Correct Answer is : All of the mentioned

16. Core Programming Elements for Different Data Access Strategies.

Correct Answer is : All of the mentioned

17. Interface whose instances can be obtained from a SessionFactory instance.

Correct Answer is : Session

18. Interface whose instances can be obtained from an EntityManagerFactory instance.

Correct Answer is : EntityManager

19. The exceptions thrown by Hibernate are of type HibernateException, while those thrown by JPA may be of type PersistenceException.

Correct Answer is : TRUE

20. To accept a session factory via dependency injection.

Correct Answer is : HibernateCourseDao

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon