You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by "Alexis Midon (JIRA)" <ji...@apache.org> on 2008/10/08 20:21:44 UTC

[jira] Created: (ODE-382) Lethal ThreadLocal in SoapExternalService

Lethal ThreadLocal in SoapExternalService
-----------------------------------------

                 Key: ODE-382
                 URL: https://issues.apache.org/jira/browse/ODE-382
             Project: ODE
          Issue Type: Bug
          Components: Axis2 Integration
    Affects Versions: 1.2, 1.1.1, 1.1, 1.0-incubating
            Reporter: Alexis Midon
            Assignee: Alexis Midon
            Priority: Blocker
             Fix For: 1.3


## Context:
An ExternalService is the internal representation of a third-party service. As such ODE invokes this third-party service through the ExternalService implementation. The implementation hides all the plumbing to actually invoke the third-party service.
An ExternalService may be invoked concurrently by several threads. These threads are pooled by an ExecutorService.

## The bug:
The SoapExternalService (SEP) implementation uses a ThreadLocal to avoid using axis2 ServiceClient concurrently.
But this is flawed because the ServiceClient depends on the SoapExternalService for configuration. Basically the "*.axis2" file that could be dropped in the deployment unit directory.

Let's say SEP#1 is invoked first and the invocatin is processed by thread#1, the ThreadLocal gets initialized with a ServiceClient instance -ServiceClient#1- using SEP#1.axis2 file. So now thread#1 is bound to SEP#1.
Then SEP#2 is invoked and thread#1 is retrieved from the thread pool to process this invocation. ServiceClient#1 is accessed through the ThreadLocal.
As a result SEP#2 is invoked with ServiceClient#1 => BUG

Same thing for axis Options ThreadLocal.

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


[jira] Resolved: (ODE-382) Lethal ThreadLocal in SoapExternalService

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexis Midon resolved ODE-382.
------------------------------

    Resolution: Fixed

see 1.x r705807

> Lethal ThreadLocal in SoapExternalService
> -----------------------------------------
>
>                 Key: ODE-382
>                 URL: https://issues.apache.org/jira/browse/ODE-382
>             Project: ODE
>          Issue Type: Bug
>          Components: Axis2 Integration
>    Affects Versions: 1.0-incubating, 1.1, 1.1.1, 1.2
>            Reporter: Alexis Midon
>            Assignee: Alexis Midon
>            Priority: Blocker
>             Fix For: 1.3
>
>
> ## Context:
> An ExternalService is the internal representation of a third-party service. As such ODE invokes this third-party service through the ExternalService implementation. The implementation hides all the plumbing to actually invoke the third-party service.
> An ExternalService may be invoked concurrently by several threads. These threads are pooled by an ExecutorService.
> ## The bug:
> The SoapExternalService (SEP) implementation uses a ThreadLocal to avoid using axis2 ServiceClient concurrently.
> But this is flawed because the ServiceClient depends on the SoapExternalService for configuration. Basically the "*.axis2" file that could be dropped in the deployment unit directory.
> Let's say SEP#1 is invoked first and the invocatin is processed by thread#1, the ThreadLocal gets initialized with a ServiceClient instance -ServiceClient#1- using SEP#1.axis2 file. So now thread#1 is bound to SEP#1.
> Then SEP#2 is invoked and thread#1 is retrieved from the thread pool to process this invocation. ServiceClient#1 is accessed through the ThreadLocal.
> As a result SEP#2 is invoked with ServiceClient#1 => BUG
> Same thing for axis Options ThreadLocal.

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


[jira] Closed: (ODE-382) Lethal ThreadLocal in SoapExternalService

Posted by "Alexis Midon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexis Midon closed ODE-382.
----------------------------


on the road to 1.3.1

> Lethal ThreadLocal in SoapExternalService
> -----------------------------------------
>
>                 Key: ODE-382
>                 URL: https://issues.apache.org/jira/browse/ODE-382
>             Project: ODE
>          Issue Type: Bug
>          Components: Axis2 Integration
>    Affects Versions: 1.0-incubating, 1.1, 1.1.1, 1.2
>            Reporter: Alexis Midon
>            Assignee: Alexis Midon
>            Priority: Blocker
>             Fix For: 1.3.1
>
>
> ## Context:
> An ExternalService is the internal representation of a third-party service. As such ODE invokes this third-party service through the ExternalService implementation. The implementation hides all the plumbing to actually invoke the third-party service.
> An ExternalService may be invoked concurrently by several threads. These threads are pooled by an ExecutorService.
> ## The bug:
> The SoapExternalService (SEP) implementation uses a ThreadLocal to avoid using axis2 ServiceClient concurrently.
> But this is flawed because the ServiceClient depends on the SoapExternalService for configuration. Basically the "*.axis2" file that could be dropped in the deployment unit directory.
> Let's say SEP#1 is invoked first and the invocatin is processed by thread#1, the ThreadLocal gets initialized with a ServiceClient instance -ServiceClient#1- using SEP#1.axis2 file. So now thread#1 is bound to SEP#1.
> Then SEP#2 is invoked and thread#1 is retrieved from the thread pool to process this invocation. ServiceClient#1 is accessed through the ThreadLocal.
> As a result SEP#2 is invoked with ServiceClient#1 => BUG
> Same thing for axis Options ThreadLocal.

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