axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Srinath Perera (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2-4196) AxisEngine meddles with concerns of the transports, and creates a thread when sending out a message
Date Wed, 05 Jan 2011 07:51:50 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Srinath Perera resolved AXIS2-4196.
-----------------------------------

    Resolution: Fixed

See http://osdir.com/ml/java-dev/2011-01/msg00124.html

> AxisEngine meddles with concerns of the transports, and creates a thread when sending
out a message
> ---------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4196
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4196
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: nightly
>            Reporter: Asankha C. Perera
>            Assignee: Srianth Perera
>            Priority: Critical
>
> One of the most used widely methods of Axis2, the AxisEngine.send() method contains the
following code, which causes the send operation to execute within another thread.
>                 // This boolean property only used in client side fireAndForget invocation
>                 //It will set a property into message context and if some one has set
the
>                 //property then transport sender will invoke in a diffrent thread
>                 Object isTransportNonBlocking = msgContext.getProperty(MessageContext.TRANSPORT_NON_BLOCKING);
>                 if (isTransportNonBlocking != null && ((Boolean) isTransportNonBlocking).booleanValue())
{
>                     msgContext.getConfigurationContext().getThreadPool().execute(
>                             new TransportNonBlockingInvocationWorker(msgContext, sender));
>                 } else {
>                     sender.invoke(msgContext);
>                 }
>                 //REVIEW: In the case of the TransportNonBlockingInvocationWorker, does
this need to wait until that finishes?
> In addition, the OutOnlyAxisOperation, in its executeImpl() method does:
>         // ship it out
>         if (!block) {
>             mc.setProperty(MessageContext.TRANSPORT_NON_BLOCKING, Boolean.TRUE);
>         }
> The MessageContext defines this property as:
>     /**
>      * To invoke fireAndforget method we have to hand over transport sending logic to
a thread
>      * other wise user has to wait till it get transport response (in the case of HTTP
its HTTP
>      * 202)
>      */
>     public static final String TRANSPORT_NON_BLOCKING = "transportNonBlocking";
> The AxisEngine code creates a new thread "if the transport is non-blocking" which seems
weired. AFAIK, the Kernel code should not be creating any threads like this, nor an AxisOperation
set a property on the message about the transport. A transport blocking or non-blocking is
outside of the purview of the Axis2 kernel, as even the Axis2 HTTP transports has already
been implemented in both blocking and non-blocking manner.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message