View Single Post
  #5 (permalink)  
Old 05-22-2008, 12:06 PM
jackchen jackchen is offline
Member
 
Join Date: May 2008
Posts: 1
jackchen is on a distinguished road
there is a method called currentSession(String key) inside the class which need s method closeSession(String key). I try to add it.I don't know if it is right.please feel free to propose your suggestions.
-----codes as below

public static void closeSession(String key) {
HashMap<String, Session> sessionMaps = (HashMap<String, Session>) sessionMapsThreadLocal.get();
if (sessionMaps != null) {
Session session = sessionMaps.get(key);
if (session != null && session.isOpen())
session.close();
}
}
Reply With Quote