axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nandana Mihindukulasooriya (JIRA)" <>
Subject [jira] Updated: (AXIS2-4179) Make PolicySubject of AxisDescription thread-safe
Date Tue, 16 Dec 2008 14:58:45 GMT


Nandana Mihindukulasooriya updated AXIS2-4179:

    Attachment: AXIS2-4179.patch

Proposed Solution :
Use a ConcurrentHashMap instead of a HashMap in the PolicySubject class. 

> Make PolicySubject of AxisDescription thread-safe 
> --------------------------------------------------
>                 Key: AXIS2-4179
>                 URL:
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>            Reporter: Nandana Mihindukulasooriya
>            Assignee: Nandana Mihindukulasooriya
>         Attachments: AXIS2-4179.patch
> Each AxisDescription instance (AxisService, AxisOperation, etc.) has a "PolicySubject"
field containing the policy components (policy, policy reference) attached at that subject.
The problem is that this PolicySubject class is not thread safe - it maintains a HashMap with
all policy components (mapped by their id). So when users are somehow modifying the policy
of a subject (attaching new components or removing some) if meanwhile a service execution
calls MessageContext.getEffectivePolicy(), which iterates over the policy components, a ConcurrentModificationException
is thrown. In that case the service invocation will fail and a fault will be send to the client.

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

View raw message