I'm wondering what people are considering best practices for
JDBC calls?
I have been writing beans that wrap a database table, and
include functions "select", "insert", "delete". These functions either load the
bean, insert the bean values in the database, or delete the record from the
database. In all of these functions, I pass in a database connection from the
action. (Or whatever else is calling the bean.)
ie- public boolean select(Connection cn1, String
primaryKey)
How are others doing it? I think this is a good approach, but
want to see if someone has come up with something better.
Thanks,
Ryan
|
- Re: Where do YOU put JDBC calls? Ryan Cornia
- Re: Where do YOU put JDBC calls? Oleg V Alexeev
- RE: Where do YOU put JDBC calls? Pathangi, Rao H.
- RE: Where do YOU put JDBC calls? Pathangi, Rao H.
- RE: Where do YOU put JDBC calls? Geddes, Mark (ANTS)
- RE: Where do YOU put JDBC calls? Pathangi, Rao H.
- RE: Where do YOU put JDBC calls? Geddes, Mark (ANTS)
- RE: Where do YOU put JDBC calls? Ryan Cornia
- RE: Where do YOU put JDBC calls? Pathangi, Rao H.
- RE: Where do YOU put JDBC calls? Ritter, Steve
- RE: Where do YOU put JDBC calls? nicolas bonvin