Categories

My learnings about Java as I explore it

Author: Saharsh

Isolation Issues

Lost Update
A lost update can be interpreted in one of two ways. In the first scenario, a lost update is considered to have taken place when data that has been updated by one transaction is overwritten by another transaction, before the first transaction is either committed or rolled back. This type of lost update cannot occur in SQL Server 2005 because it is not allowed under any transaction isolation level. Continue reading →

A: Vector and ArrayList both uses Array internally as data structure. They are dynamically resizable. Difference is in the way they are internally resized. By default, Vector doubles the size of its array when its size is increased. But, ArrayList increases by half of its size when its size is increased.

Getting head dump
2 ways:
1. Use jmap (which is also part of the Sun JDK 6) to dump the heap of a running application to a file using a command line like
jmap -dump:format=b,file=myheap.hprof <pid> Continue reading →