This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a problem with my Java connections to a mySQL database. In my scenario I have a connection pool, and the behavior is different depending on the size of this pool. Scenario 1: I have 2 connections in the pool (c1 and c2). The table I'm about to read has 2 records. I use c1 to read and get two records. I then use c2 to add another record (this works, if I look in the database, the new record is there). I commit the changes. I then use c1 to read the same table but still gets only to records (the same two as before). Scenario 2: I have 3 connections (c1, c2 and c3). The table again has two records. I use c1 to read and get this two records. I then use c2 o add a new record and commit the changes. Then I use c3 to read the same table and now I get 3 records (the to "old" and the newly added). My question is if there can be some kind of chache in the connections? Have someone come across this behavior before? The connections TransactionIsolation is set to TRANSACTION_READ_COMITTED. Thanks in advance, Andreas