Re: Thread-safety of javax.servlet.Servlet#getServletConfig()

2016-12-05 Thread Terence M. Bandoian
On 12/5/2016 7:40 AM, Péter Gergely Horváth wrote: Hi Chris, Thanks your four input: this question is somewhere in-between... :) We have *definitely* seen cases, where a piece of code like the one below sometimes (a couple of times from tens of thousands of successfully serviced requests) found

Re: Thread-safety of javax.servlet.Servlet#getServletConfig()

2016-12-05 Thread Mark Thomas
On 05/12/2016 13:40, Péter Gergely Horváth wrote: > Hi Chris, > > Thanks your four input: this question is somewhere in-between... :) > > We have *definitely* seen cases, where a piece of code like the one below > sometimes (a couple of times from tens of thousands of successfully > serviced requ

Re: Thread-safety of javax.servlet.Servlet#getServletConfig()

2016-12-05 Thread Péter Gergely Horváth
Hi Chris, Thanks your four input: this question is somewhere in-between... :) We have *definitely* seen cases, where a piece of code like the one below sometimes (a couple of times from tens of thousands of successfully serviced requests) found the stored field to be null - with a NullPointerExce

Re: Thread-safety of javax.servlet.Servlet#getServletConfig()

2016-11-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Péter, On 11/28/16 11:01 AM, Péter Gergely Horváth wrote: > Thank you very much for your feedback, but I think there is a > slight misunderstanding here: I know the order in which a servlet > is initialized and put into service, and this question is

Re: Thread-safety of javax.servlet.Servlet#getServletConfig()

2016-11-28 Thread Péter Gergely Horváth
Hi Andy, Thank you very much for your feedback, but I think there is a slight misunderstanding here: I know the order in which a servlet is initialized and put into service, and this question is not related to that. It's related to the _visibility_ of the field. The question is about the thread s

Re: Thread-safety of javax.servlet.Servlet#getServletConfig()

2016-11-27 Thread andreas
On Fri, 25 Nov 2016 23:02:00 +0930 Péter Gergely Horváth wrote >Hi All, > >I am wondering why calling javax.servlet.Servlet#getServletConfig() is >thread safe: if you check the implementation in > javax.servlet.GenericServlet from servlet API 3.0.1, you see the following: > >packa

Thread-safety of javax.servlet.Servlet#getServletConfig()

2016-11-25 Thread Péter Gergely Horváth
Hi All, I am wondering why calling javax.servlet.Servlet#getServletConfig() is thread safe: if you check the implementation in javax.servlet.GenericServlet from servlet API 3.0.1, you see the following: package javax.servlet; // lines omitted public abstract class GenericServlet implements