0

My understanding about SOAP services(JAX-RPC), is this that they are not instantiated for each service client request and consequently are not thread-safe.

Based on that understanding, I have following scenario based question:

I have a JAX-RPC SOAP service, which is invoked concurrently.

Each invocation passes a plain vanilla XML document, as an input.

for each request, XML document is unmarshalled (i.e. into Java Object), using JAXB.

So, question is, will unmarshalled, Java Object (belonging to a unique request), shall be overwritten by the subsequent requests ?

G.S.Tomar
  • 290
  • 2
  • 14
  • Where did you get this information? It would limit RPC very badly if this was the case. Could you provide the documentation or link that clearly specifies this. – Namphibian Oct 04 '17 at 00:04
  • Any reason to not using JAX-WS instead ? According to [this answer](https://stackoverflow.com/a/3314458/7054574), you should. Then you can expose your [service as EJB as well web service](https://stackoverflow.com/a/11475218/7054574) and handle concurrency. – Anddo Oct 04 '17 at 17:37
  • @Namphibian: If service is implemented based on servlet/EJB, then, instance pool of them, takes care this, that, each *thread(representing user request)*, should be processed by exclusive instance of the service, out of aforesaid instance pool. But, are you sure, about the technical feasibility of maintaining *instance pool* , for, JAX-RPC based, SOAP service ? Does Jax-RPC, supports, assigning *exclusive instance* of the service to each thread(request) OR, signle instance is shared across threads(requests) ? please note service is hostedin Weblogic. – G.S.Tomar Oct 06 '17 at 14:43
  • @Anddo: Reason is legacy code of a product. But we are going towards JAX-WS. Actually, recently, I observed developers are storing *state(personal data of user, in the form of instance variables)*, relevant for that specific session, of RPC call. So, I am concerned, about this issue, that, if another user request triggers, RPC call, then *state* of first user shall be overwritten. – G.S.Tomar Oct 06 '17 at 14:50

0 Answers0