adplus-dvertising
frame-decoration

Question

For mapping and persisting your objects with Hibernate and JPA.

a.

Using the Hibernate API to persist objects with Hibernate XML mappings

b.

Using the Hibernate API to persist objects with JPA annotations

c.

Using JPA to persist objects with JPA annotations

d.

All of the mentioned

Answer: (d).All of the mentioned

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

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

Similar Questions

Discover Related MCQs

Q. Core Programming Elements for Different Data Access Strategies.

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

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

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

Q. To accept a session factory via dependency injection.

Q. Property for factory bean to load the Hibernate configuration file.

Q. If you want to use this data source for your session factory, you can inject it into the dataSource property of LocalSessionFactoryBean.

Q. FactoryBean to create an entity manager factory in the IoC container.

Q. It allows you to override some of the configurations in the JPA configuration file.

Q. Spring HibernateTemplate can simplify your DAO implementation by managing sessions and transactions for you.

Q. An alternative to Spring HibernateTemplate is:-

Q. Sessionfactory can manage contextual sessions for you and allows you to retrieve them by the:-

Q. DAO methods require access to the session factory, which can be injected:-

Q. DAO methods must be made transactional.

Q. Annotation to find a transaction and then fail, complaining that no Hibernate session been bound to the thread.

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

Q. HibernateTemplate will translate the native Hibernate exceptions into exceptions in Spring DataAccessException hierarchy.

Q. Annotation for Hibernate exceptions to be translated into Spring DataAccessException for consistent exception handling:-

Q. Instance to translate the native Hibernate exceptions into data access exceptions in Spring DataAccessException hierarchy.

Q. You can assign a component name in this annotation and have the session factory autowired by the Spring IoC container with @Autowired.