If I mark my web service method as "synchronized", will app server put all the web service requests in serial.
Means only one execution of the method takes place at a given time.
For normal threads or java application , that is the behaviour.
Theory is when you know something, but it doesn't work.<br />Practice is when something works, but you don't know why.<br />Programmers combine theory and practice: Nothing works and they don't know why.
May be or many not. App server may create many instances of service implementation class to serve the class. All depends on how web service is exposed and using which framework. By default JAX-WS RI creates a singleton instance of the implementation class in that scenario everything may go in serial.
you may still get into trouble later, when you put your application into more server nodes.. the application will not be serialized anyway.
IMHO maybe you should not serialize request on the level of WS (vinod is right, a server may use as many service instances as it wishes), but maybe on the backend (as a sigleton service class, database level, ..)..
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one: