concurrent « Operation « Java Database Q&A





1. How to write data to a file and update the database concurrently    coderanch.com

Is it possible to write my data to a file and a database at the same time. What I need to do is write the filr if the record is written, I then update the status field in my database. here is a sample of my code.. File f = new File(path + "test.dat"); PrintWriter out = new PrintWriter(new FileWriter(f)); while(rs.next()) ...

2. Concurrent Submission to update the database    coderanch.com

Hi, I am trying to update a database using servlets. Servlets must be allowed concurrent users to read and update the database. I have a few design choices in my mind but I am not sure which one is the best in performance and does not cause thread problems like deadlock and so on? Can someone give me a suggestion? Database ...

3. Concurrent updates    coderanch.com

4. Concurrent UPDATE...WHERE behaviour    coderanch.com

I'm curious about how the following scenario might behave. If any one has any ideas please post. Scenario: I have an application running in a clustered environment. The application uses a "listener" thread which polls a table in the DB to process records in a queue-like fashion (i.e. read a record, do something then delete the record). There will obviously be ...

5. Handling concurrent updates using JDBC    coderanch.com

Consider a scenario where two users are trying to update same data in the database.They first select the data from the database table and then update some of the records in the same table after checking the values. Suppose user A has selected record 1, 2 and 3. Then he updates record 2 and 3. Before user A updates the records, ...

6. Running multiple queries concurrently    coderanch.com

Forgive me if this question has been asked already, I searched but couldn't find anything. I have a Swing app that has to run about 15 queries and display the data, pretty simple. Some of the queries take mere milliseconds while some of them take several minutes to return the data. I have the queries set to run each time a ...