Posts

Showing posts with the label transactions

What is the difference between Non-Repeatable Read and Phantom Read?

Image
What is the difference between Non-Repeatable Read and Phantom Read? What is the difference between non-repeatable read and phantom read? I have read the Isolation (database systems) article from Wikipedia, but I have a few doubts. In the below example, what will happen: the non-repeatable read and phantom read ? SELECT ID, USERNAME, accountno, amount FROM USERS WHERE ID=1 1----MIKE------29019892---------5000 UPDATE USERS SET amount=amount+5000 where ID=1 AND accountno=29019892; COMMIT; SELECT ID, USERNAME, accountno, amount FROM USERS WHERE ID=1 Another doubt is, in the above example, which isolation level should be used? And why? en.wikipedia.org/wiki/Isolation_(database_systems) – Pavel Veller Jun 15 '12 at 1:59 8 Answers 8 From Wikipedia (which ...

EHCache Local TransactionManager timeout on removal

EHCache Local TransactionManager timeout on removal I am working on a project to incorporate ehCache. Currently I am writing JUnit tests to test the various behaviours. When adding a transaction manager I started seeing timeout issues on certain calls. @Test public void testEHCacheIssue(){ try{ Ehcache ehCache_1 = ehCacheManager.getCache("ehCache_1"); transactionManager = ehCacheManager.getTransactionController(); transactionManager.setDefaultTransactionTimeout(15); transactionManager.begin(); ehCache_1.put(new Element("1", new TestElementPerson(1, "firstName1", "lastName1","email1@test.com",1234))); transactionManager.commit(); transactionManager.begin(); ehCache_1.put(new Element("2", new TestElementPerson(2, "firstName3", "lastName3","email3@test.com",1234))); transactionManager.commit(); transactionManager.begi...