Alex Rivera | Logout

Spring JDBCTemplate VS Hibernate in terms of performance

Asked 2012-08-03T07:24:13.163
48

In our project we have to decide between Spring JDBCTemplate and Hibernate.

I want to know which is better in terms of performance and implementation and design. and how?

Edit
Report

1 Answer

17

In our project, we are using both, JdbcTemplate and Hibernate. What you need to do is share DataSource between hibernate and jdbcTemplate. We can check performance for both according to operations, whichever is better, we use better one. Mostly we are using hibernate for normal operations, if there are big queries or heavy operations, we check performance for jdbc and hibernate whichever better we use it.

The good point is HibernateTransactionManager works for both (JdbcTemplate, plain jdbc) and hibernate.

answered 2012-08-03T07:55:34.460

Your Answer