1. From the time the method is entered, not the first time it hits the db.
2. It depends. Timeouts are not always processed immediately, partly due to configuration and partly due to threading issues in some db drivers. When they are processed it's by a background thread, so your business logic does not get an interrupt, just a rollback exception when it eventually tries to commit. Thus you may not actually notice the timeout if you are only reading the db, unless the read encompasses uncommitted data. As if that was not complicated enough, a bug in the current version of the app server can cause a connection to remain valid across a transaction boundary, undetectably to the application code. Tread carefully.