When a JSE servlet is deployed as multple threading, what are the impacts on the service endpoint class? I understand that it is the servlet that unmarshals the soap messages and interprets it into the appropriate ws calls. But the instance of the endpoint class, which I mean the class implementing the ws method, could be created every time a client send a request. In this case, single threading or not, there will be no difference on the service endpoint class as far as the thread safe is concerned. Am I right?
This is the way that vendors will implement JSEs (ok, the most likely way). They will generate a JAX-RPC Servlet that maintains a *single* reference to an instance of the endpoint class for its entire lifecycle. That instance will be accessed, if the Servlet is multi-threaded (seems likely), by any number of threads at the same time. Please do not treat the endpoint as a single threaded object - it will most certainly be accessed by multiple threads concurrently. Just as with Servlets you must mind this fact when using instance variables. I hope this helps, Richard