You implement webservice endpoints as a JAX-RPC service endpoint (which executes in the context of a
servlet in the web container) and as a
EJB stateless session bean endpoint. The implication of using a static variable for a webservice will thus depend on what type of service endpoint you develop your webservice as and that implication will be same as when you use the static variable in a servlet or a stateless session bean.
For a servlet using a single/multithread model, the static variables will still need to be synchronized on if they are not final. In EJBs, its okay to use a final static variable but a non-final static variable will not behave correctly as statless session bean states are not persisted across invocations.
So in short, its okay to use a final static variable but not a non-final static variable if you have an EJB endpoint. In case of servlets- based JSEs if you have non-final static variables then you will need to synchronize the access to the static vars.
SCJP 5.0 (90%), SCDJWS 1.4 (88%), SCWCD 1.4 (82%), SCBCD 1.3 (85%)