Question
a.
True
b.
False
c.
May be
d.
Can't say
Posted under Java Spring Framework
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. The exceptions thrown by Hibernate are of type HibernateException, while those thrown by JPA may be of type PersistenceException.
Similar Questions
Discover Related MCQs
Q. To accept a session factory via dependency injection.
View solution
Q. Property for factory bean to load the Hibernate configuration file.
View solution
Q. If you want to use this data source for your session factory, you can inject it into the dataSource property of LocalSessionFactoryBean.
View solution
Q. FactoryBean to create an entity manager factory in the IoC container.
View solution
Q. It allows you to override some of the configurations in the JPA configuration file.
View solution
Q. Spring HibernateTemplate can simplify your DAO implementation by managing sessions and transactions for you.
View solution
Q. An alternative to Spring HibernateTemplate is:-
View solution
Q. Sessionfactory can manage contextual sessions for you and allows you to retrieve them by the:-
View solution
Q. DAO methods require access to the session factory, which can be injected:-
View solution
Q. DAO methods must be made transactional.
View solution
Q. Annotation to find a transaction and then fail, complaining that no Hibernate session been bound to the thread.
View solution
Q. In the bean configuration file for Hibernate (i.e., beans-hibernate.xml), you have to declare a HibernateTransactionManager instance for this application and enable declarative transaction via:-
View solution
Q. HibernateTemplate will translate the native Hibernate exceptions into exceptions in Spring DataAccessException hierarchy.
View solution
Q. Annotation for Hibernate exceptions to be translated into Spring DataAccessException for consistent exception handling:-
View solution
Q. Instance to translate the native Hibernate exceptions into data access exceptions in Spring DataAccessException hierarchy.
View solution
Q. You can assign a component name in this annotation and have the session factory autowired by the Spring IoC container with @Autowired.
View solution
Q. Spring provides to simplify your DAO implementation by managing entitymanagers and transactions for you:-
View solution
Q. Annotation used for entity manager injection in EJB components.
View solution
Q. To use the context injection approach, you can declare an entity manager field in your DAO and annotate it with the @PersistenceContext annotation.
View solution
Q. JpaTemplate will translate the native JPA exceptions into exceptions in Spring DataAccessException hierarchy.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Java Spring Framework? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!