Closing the resultset and the statement do not commit the transaction. The postgresql server will continue to hold reader locks on all affected tables until that connection is closed, times out, etc. (Postgresql will begin a transaction for any SELECT statement; other drivers may or may not wrap reads in a transaction – JDBC doesn't mandate what happens here. Thus far this is an issue for me only with Postgresql; mysql and oracle don't seem to produce this same behavior.)
This is about cleaning up server-side resources, at least insofar as Postgresql implements the spec. I think that it's good hygiene to assume that any driver may open a transaction that should be committed when we're done reading.