I've got an IncomingTrackHandlerFactory
(ith
) which hands out instances of IncomingTrackHandler
. These instances implements AutoCloseable
. The IncomingTrackHandler
deals with the database, and is short lived. Every instance is just used for a couple of queries and then discarded.
I don't get why the first block of code does not work. Why does Java tell me that it "cannot find symbol" for ith
? I'm simply just declaring ith before the try block to be able to also have the ith
variable at hand if an exception is caugth and the database transaction must be rolled back.
What am I missing?