Reputation: 726
session.close();
session.flush();
Which gave an exception Session is closed.
Or Should we flush the session before closing the session only.
Upvotes: 0
Views: 188
Reputation: 879
No..session should be flushed before closing connection. Session flush basically synchronize cache data with database without committing data and flush should be called inside transaction
Upvotes: 2