Hi all,
I am trying to utilize axis2 asynchronous processing via callback mechanism
and 2-way HTTP transport channels. The question I have is if client stub
implementation is thread safe. Even though Inderi have seen some reports
that it is not, I was wong if anything changed in version 1.4.1. Assuming
it is not thread safe and I cannot share client stubs between multiple
threads, is there way to reuse same separate response listener for all of
the transactions?
I have tried creating client stubs for each thread separately, but ran into
following exception:
Sep 23, 2008 6:27:14 PM
org.apache.axis2.transport.http.server.DefaultConnectionListenerFailureHandler
failed
WARNING: Attempt number 1 of 10 to reestalish connection listener
[EMAIL PROTECTED]
to failure
java.net.BindException: Address already in use: NET_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:398)
at java.net.ServerSocket.bind(ServerSocket.java:331)
at java.net.ServerSocket.<init>(ServerSocket.java:197)
at java.net.ServerSocket.<init>(ServerSocket.java:109)
at
org.apache.axis2.transport.http.server.DefaultConnectionListener.run(DefaultConnectionListener.java:72)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
Also if there is no way to use one listener for all of the responses, are
there any optimization techniques that can be utilized like a pool of
listeners for high volume system (~400tps)? Creating a listener every time
could be rather expensive.
Thanks,
Dmitriy