adplus-dvertising
frame-decoration

Question

How does the Spring JDBC framework know that state 23505 should be mapped to DuplicateKeyException?

a.

error code

b.

SQL state

c.

all of the mentioned

d.

none of the mentioned

Answer: (c).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. How does the Spring JDBC framework know that state 23505 should be mapped to DuplicateKeyException?

Similar Questions

Discover Related MCQs

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

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

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

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

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

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

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.