You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Hendy Irawan (JIRA)" <de...@tuscany.apache.org> on 2011/07/12 19:30:59 UTC

[jira] [Commented] (TUSCANY-1208) Service using callback and methods that don't perform callback over WS binding hangs

    [ https://issues.apache.org/jira/browse/TUSCANY-1208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064023#comment-13064023 ] 

Hendy Irawan commented on TUSCANY-1208:
---------------------------------------

Thank you for fixing this bug, Jean-Sebastien ! :)

> Service using callback and methods that don't perform callback over WS binding hangs
> ------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1208
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1208
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Axis Binding Extension
>    Affects Versions: Java-SCA-0.90
>            Reporter: Lou Amodeo
>            Assignee: Simon Nash
>             Fix For: Java-SCA-1.0
>
>
> I have a service exposed over the WS binding.   The service interface has multiple methods.  Some methods perform callbacks and others do not.  The methods that performs the callback functions while the others hang and eventually timeout.  It appears that the binding is expecting all methods to perform a 
> callback.  It appears that other have observed the same behavior.  I have not seen this same behavior with the default binding.
> From muhwas:
>  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.
> From post to list: 
> Service using WS Binding with Calback and multiple methods on interface hangs
> Lou Amodeo
> Thu, 12 Apr 2007 18:55:05 -0700
> 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);
> }
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira