I'm developing a project where I have this scenario:
1 - a client sends a message to the web service with a list of IP adresses
2 - the web service starts to probe those IP adresses from time to time (for example, every 3 minutes. And the probes are SNMP (simple network management protocol) )
3 - so, every 3 minutes, the web service sends a response to the client with the information gathered from the probes (this reponse should be another web service call, since the client is a web service too)
to solve this I would like to create a thread with the @webService annotation that receive the list of IP adresses and another thread that is always running to do the probes and then send the response ...
is it possible ???
I'm new to web service ....
Are your webservice running in some kind of container, like Tomcat, GlassFish or such?
If so, then the container will create threads that handles incoming requests.
Keep in mind the difference between servlet-based and EJB-based endpoints; the first can be executed by any number of threads at the same time while the second is only executed by one single thread at a time.