Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
135 views
in Technique[技术] by (71.8m points)

java - Resultset in session

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...