Meaningless Drivel is fun!
The moose likes JDBC and Relational Databases and the fly likes jdbc template vs hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "jdbc template vs hibernate" Watch "jdbc template vs hibernate" New topic

jdbc template vs hibernate

David Thompon

Joined: May 24, 2014
Posts: 2
What is the best way to securely pass SQL in a Java application? Today I heard that jdbc template was the best.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33124

Welcome to CodeRanch!

The key is to make sure the SQL is secure by itself. This is true regardless of what persistence technology you use. The most important rule is to make sure you always use bind variables (? in JDBC) for any data that could be supplied by the user.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: jdbc template vs hibernate
It's not a secret anymore!