What are the disadvantages of placing resultset in session? if not which is the best possible way.I tried to place it in a List<Map<String,String>>
,does it not affect the performance?
What are the disadvantages of placing resultset in session? if not which is the best possible way.I tried to place it in a List<Map<String,String>>
,does it not affect the performance?
A ResultSet
represents an open connection to the database; generally you want to get your data out and return the connection to the pool as quickly as possible. Storing a ResultSet
in the session leaves open the possibility that the connection won't be closed for a long time, which could exhaust the pool, or unnecessarily tie up your database resources.