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?
ib idris
Greenhorn
Joined: Aug 02, 2003
Posts: 29
posted
0
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/
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.