axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <khat...@axiomsystems.com>
Subject RE: axis, connection refused ?
Date Wed, 27 Aug 2003 08:29:03 GMT
Hi Darek,

This is a problem with your web server, not Axis.
You will need to check the server documentation on how to make more threads available to the
listener. For example, on Weblogic you can set up a separate queue, and I know there is something
similar (not sure of the details) on JBoss.

Hope this helps
Keith


-----Original Message-----
From: Dariusz Czyrnek [mailto:dariusz.czyrnek@praktykant.comarch.pl]
Sent: 26 August 2003 12:44
To: axis-user@ws.apache.org
Subject: axis, connection refused ?


Hi,
I deployed simple web serice (Calculator) using wsdd.

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 <service name="C" provider="java:RPC">
      <parameter name="className" value="com.my.Calculator"/>
      <parameter name="allowedMethods" value="*"/>
      <parameter name="scope" value="session"/>
 </service>
</deployment>


Then i have a client in java which is trying to invoke add method of this
service 30 times like that:
(..i am trying to pretend 30 users clicking add button ..)


 ...
 for ( int i = 0 ; i < 30 ; i++)
  {
   Zad z = new Zad(i1.intValue(), i2.intValue());
   z.start();
  }
  ...
class Zad extends Thread
{
 int a, b;
 public Zad(int a, int b)   { this.a = a; this.b = b; }

 public void run()
 {  try
      {
            String endpoint = "http://localhost:8080/axis/services/C";
            Integer i1 = new Integer(a);
            Integer i2 = new Integer(b);

        Service  service = new Service();
        Call     call    = (Call) service.createCall();

        call.setTargetEndpointAddress( new java.net.URL(endpoint) );
        call.setOperationName( "add" );
        call.addParameter( "op1", XMLType.XSD_INT, ParameterMode.IN );
        call.addParameter( "op2", XMLType.XSD_INT, ParameterMode.IN );
        call.setReturnType( XMLType.XSD_INT );

          Integer ret = (Integer)call.invoke( new Object [] { i1, i2 });
           System.out.println("Got result : " + ret);
  }catch(Exception e)   {   e.printStackTrace();   }
 }
}

but i've got an Exception after some well done  adds

Got result: 2
Got result: 2
...
Got result: 2
Got result: 2
AxisFault
....
stackTrace: java.net.ConnectionException: Connection refuse: connect
.....


If anyone know, am i able to invoke 100 add methods (of my calculator
service) at one time?
soppose it is a public service and 100 users at one time would like to add
some integers.

darek




Mime
View raw message