yeah i had the same problem so i thought we can't
inculde sync and async method together in one
Interface. so i created two interfaces and two service
one sync and other async.
--- Lou Amodeo <[EMAIL PROTECTED]> wrote:
> I am seeing a hang when using the Web Services
> bindings to access a service
> that has a callback reference. In this particular
> case the service expose
> several methods on the interface. Only one of the
> methods invokes a method
> on the callback reference. The method that invokes
> the callback functions
> fine. The issue is with the other methods on the
> interface. It appears
> that the binding is expecting every request to the
> service to perfrom a
> callback. What I have found is the latch associated
> with doneSignal.await()
> is never freed up. Also since this method did not
> use invoke a callback
> not sure why it would be using an Async message
> receiver rather than the
> Sync version? Its almost as if the binding is
> anticipating a mandatory
> callback rather than waiting for one to actually be
> called. After about 5
> minutes the request will timeout. Thanks for your
> help.
>
>
> *public* Axis2ServiceInOutAsyncMessageReceiver() {
>
> }
>
> *public* *final* *void* receive(*final*
> MessageContext messageCtx) {
>
> *try* {
>
> Object messageId = messageCtx.getMessageID();
>
> *if* (messageId == *null*) {
>
> messageId = *new* MessageId();
>
> }
>
> // Now use message id as index to context to be used
> by callback
>
> // target invoker
>
> CountDownLatch doneSignal = *new* CountDownLatch(1);
>
> InvocationContext invCtx =
>
> service.*new* InvocationContext(messageCtx,
> operation,
> getSOAPFactory(messageCtx), doneSignal);
>
> service.addMapping(messageId, invCtx);
>
> invokeBusinessLogic(messageCtx, messageId);
>
> *try* {
>
> doneSignal.await();
>
> } *catch*(InterruptedException e) {
>
> e.printStackTrace();
>
>
>
>
>
> Timeout occurs after 5 minutes:
>
> [4/12/07 21:49:43:529 EDT] 0000002b SystemErr R
> Exception in thread "Axis2
> Task"
>
*org.apache.tuscany.spi.wire.InvocationRuntimeException*:
> org.apache.axis2.AxisFault: Async operation timed
> out; nested exception is:
>
> *java.net.SocketTimeoutException*: Async operation
> timed out
>
> [4/12/07 21:49:43:529 EDT] 0000002b SystemErr R at
>
org.apache.tuscany.binding.axis2.Axis2ReferenceCallback.onError(*
> Axis2ReferenceCallback.java:54*)
>
> [4/12/07 21:49:43:539 EDT] 0000002b SystemErr R at
>
org.apache.axis2.description.OutInAxisOperationClient$NonBlockingInvocationWorker.run
> (*OutInAxisOperation.java:417*)
>
> [4/12/07 21:49:43:539 EDT] 0000002b SystemErr R at
>
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask
> (*ThreadPoolExecutor.java:665*)
>
> [4/12/07 21:49:43:539 EDT] 0000002b SystemErr R at
>
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run
> (*ThreadPoolExecutor.java:690*)
>
> [4/12/07 21:49:43:539 EDT] 0000002b SystemErr R at
> java.lang.Thread.run(*
> Thread.java:803*)
>
> [4/12/07 21:49:43:539 EDT] 0000002b SystemErr R
> Caused by:
> org.apache.axis2.AxisFault: Async operation timed
> out; nested exception is:
>
> *java.net.SocketTimeoutException*: Async operation
> timed out
>
> at
>
com.ibm.ws.websvcs.transport.http.HTTPTransportSender.invoke(*
> HTTPTransportSender.java:271*)
>
> at
>
org.apache.axis2.engine.AxisEngine.send(*AxisEngine.java:464*)
>
> at
>
org.apache.axis2.description.OutInAxisOperationClient.send(*
> OutInAxisOperation.java:325*)
>
> at
>
org.apache.axis2.description.OutInAxisOperationClient$NonBlockingInvocationWorker.run
> (*OutInAxisOperation.java:400*)
>
> at
>
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask
> (*ThreadPoolExecutor.java:665*)
>
> at
>
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run
> (*ThreadPoolExecutor.java:690*)
>
> at java.lang.Thread.run(*Thread.java:803*)
>
> Caused by: *java.net.SocketTimeoutException*: Async
> operation timed out
>
> }
>
> } *catch* (AxisFault e) {
>
> // log.error(e);
>
> }
>
> }
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]