---------------------------------------------------------------- BEFORE YOU POST, search the faq at <http://java.apache.org/faq/> WHEN YOU POST, include all relevant version numbers, log files, and configuration files. Don't make us guess your problem!!! ---------------------------------------------------------------- Hello, I'm having major deadlocks when there's a heavy load on servlet requests. So I'm trying to minimize the number of synchronized blocks in the code. when browsing through the JServ code I found this /** * Returns the session bound to the specified session ID. * * @param sessionID the ID of a particular session object. * @return the session name. Returns null if the session ID does not refer * to a valid session. */ public synchronized HttpSession getSession(String sessionId) { return (HttpSession) sessions.get(sessionId); } I know that sesssions is a Hashtable and that in Hashtables get and remove methods are all ready synchronized so I guess it would be safe to remove the synchronized modifier on the getSession unless the type casting is at risk ?!!? Thanks for your input. -- Jean-Baptiste Laplace Software Engineer WarpSpeed Communications 6683 Owens Drive, Pleasanton, CA 94588 Tel: (925)-398-1079 -- -------------------------------------------------------------- Please read the FAQ! <http://java.apache.org/faq/> To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Archives and Other: <http://java.apache.org/main/mail.html> Problems?: [EMAIL PROTECTED]