[Logo]
Forums Register Login
sql helper class
I've got a class that only contains static methods in the form

that all the servelts use to execute SQL statements.
I use a connection pool that is thread safe to get DB connections but do these methods need to be synchronized also. The rule I've always followed is, if multilple threads are mutating a variable then make the code synchronized. Is this correct?
Hi,
any decent DB has safeguards against data corruption. The JDBC an Servlets desingers have also thought about this kind of problems. But to be safe you sould make backups and turn autocommit off.
http://galileo.spaceports.com/~ibidris/
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Nov 20, 2017 06:52:59.