Quote:
we have to save millions of elements in our database
It really depends on the source and lifecycle of this "millions of elements", if you get them from another DB you should use some stored procedure, but if you have to modify or just look at them with Java then hibernate is really good, using batching you can get as fast as with your own JDBC code; all hints you could think of are applicable, and additionally you get him to do the mapping work; also it is well tested and probably Hibernate knows some more tricks to improve performance.
I don't want to start a flame, just express my personal experience: very high throughput
when well configured, and the bottleneck is my DBMS... you just have to enable some settings.
regards,