1

To some extent, I don't have a problem with JPA which inevitably needs an implementation such as Hibernate. However, it requires configuration and ORM.

I don't specifically like using Hibernate directly, based on the fact that it is a vendor specific approach.

Nonetheless, I've been preferring the usage of JDBC, and I would introduce a "personal" DAO implementation, where I open a connection as late as possible, and then I do close the connection as soon possible.

I was then confronted to a situation where going back and forth to the database on a remote machine would literally take around 60 seconds, that's when I started giving serious thoughts about using something similar to Apache Tomcat's DBCP, but then BoneCP was the one I adopted, eventually.

It has indeed solved many problems, as it does detect connection leaks, or the fact that a DB server is down and such.

I am not sure about the plethora of capabilities Hibernate may bring to the table, but is it sufficient to use JDBC + BoneCP for performances purposes?

  • 1
    weblogs.asp.net/fbouma/… – Robert Harvey Sep 3 '16 at 22:31
  • There's an abyss of requirements in between choosing only JDBC or Hibernate. Whether your choice is adequated to you or not, depends entirely on your needs and requirements. And many other things we don't know that are contextual to the project. The question boils down to "Do you need an ORM?". This is going to be hard (impossible) to say without a full understanding of the requirements and the context. – Laiv Dec 29 '17 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.