The question can almost be generalized to "when should you use a framework, and when shouldn't you?"
Simple and straight forward apps probably don't need a framework. As things get more complicated, and management of the application over time and change becomes more important, a framework, like JDO or hibernate, becomes more and more helpful.
i will give diffent answer in diffent situatiion,for example,maybe some small and simple project i will choose ibatis or jdbc,big but not enough i think jpa will work well,and big project i think hibernate is a good choice
Besides performance, I would take into account the database model. Mainly in legacy databases, you may find unnormalized tables, poor referential integrity and other aberrations that JPA does not fit. If you choose JPA in these cases, you will probably solve problems coding SQL queries instead of taking advantage of the framework.