This week's book giveaway is in the Java in General forum. We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line! See this thread for details.
Wrushu, 1) In Java's memory from the driver. Note there is also a database execution plan which is stored on the database. 2) Usually it will throw an exception forcing you to handle it. Most people handle it by starting over, but you could write some code for the re-query to start where you left off.