• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jax-Ws RI: simultaneous hit

 
John Landon
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the container? Tomcat? Grizzly? - it is up to the container to manage separate requests.

Bill
 
John Landon
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
    Posts: 228
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 228
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I looked at this page. It didn't help me really. Can anyone point me into the right direction?
    Thanks.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic