Hello.
I hope everyone is having a great day! I hope you have a moment for a
quick question.
I am fighting a memory leak problem and I want to try and rule in or out
concurrency issues. So given:
Servlet Code:
-----
public enum XMSContextAttributes { applicationContext };
public void doGet (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
HXMSApplicationContext applicationContext;
applicationContext = getServletContext ().getAttribute
(XMSContextAttributes.applicationContext.name ());
...do something useful here...
}
-----
Notes:
The applicationContext object is being created by a
ServletContextListener, and it contains two important ConcurrentHashMap
objects.
But the applicationContext object itself has no concurrency
protection... I access it inside of the doGet of certain servlets...
Question:
Do I need to put the getServletContext().getAttribute() inside of a
synchronized (this) block? I am thinking I do.
Thank you.
-Dennis Klotz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]