aspose file tools*
The moose likes Web Services and the fly likes Jax-Ws RI: simultaneous hit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Jax-Ws RI: simultaneous hit" Watch "Jax-Ws RI: simultaneous hit" New topic
Author

Jax-Ws RI: simultaneous hit

John Landon
Ranch Hand

Joined: Sep 25, 2008
Posts: 227
Hi,
I have a running jax-ws ri web service. When 2 clients are trying to hit it it doesn't work simultaneously. What I mean it waits until the first request returned result and only then executes the second one.
Any ideas?

Thanks,
John,
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12788
    
    5
What is the container? Tomcat? Grizzly? - it is up to the container to manage separate requests.

Bill
John Landon
Ranch Hand

Joined: Sep 25, 2008
Posts: 227
William Brogden wrote:What is the container? Tomcat? Grizzly? - it is up to the container to manage separate requests.

Bill

Tomcat 5.26
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
There are many factors involved in how requests are processed, some are:
  • If the service endpoint implementation class is an EJB, then only one single thread at a time will be allowed to execute in the EJB. Since an EJB acting as a web service endpoint is a stateless session bean, there may be many instances of the EJB concurrently executing.
  • If the service endpoint implementation class is a POJO, then the web service is considered to be a servlet-based endpoint. Such an endpoint share characteristics with a servlet in the way that mutliple threads are allowed to execute within the same instance of the class.
  • Thread management of the container. For Tomcat you may want to consider to examine the attributes of the connector which serves the web service requests - see the server.xml in the conf directory in the Tomcat installation. Documentation at http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

  • Best wishes!
    John Landon
    Ranch Hand

    Joined: Sep 25, 2008
    Posts: 227
    Ivan Krizsan wrote:Hi!
    There are many factors involved in how requests are processed, some are:
  • If the service endpoint implementation class is an EJB, then only one single thread at a time will be allowed to execute in the EJB. Since an EJB acting as a web service endpoint is a stateless session bean, there may be many instances of the EJB concurrently executing.
  • If the service endpoint implementation class is a POJO, then the web service is considered to be a servlet-based endpoint. Such an endpoint share characteristics with a servlet in the way that mutliple threads are allowed to execute within the same instance of the class.
  • Thread management of the container. For Tomcat you may want to consider to examine the attributes of the connector which serves the web service requests - see the server.xml in the conf directory in the Tomcat installation. Documentation at http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

  • Best wishes!

    I do not think I am using ajbs.
    I have the jaxws servlet listener in the web.xml
    And a simple implementation class that is defined in sun-jaxws.xml
    John Landon
    Ranch Hand

    Joined: Sep 25, 2008
    Posts: 227
    I looked at this page. It didn't help me really. Can anyone point me into the right direction?
    Thanks.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Jax-Ws RI: simultaneous hit