You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Raymond Feng (JIRA)" <tu...@ws.apache.org> on 2008/04/11 19:52:04 UTC

[jira] Resolved: (TUSCANY-2085) ConcurentModExc in DefaultDataBindingExtensionPoint

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

Raymond Feng resolved TUSCANY-2085.
-----------------------------------

    Resolution: Fixed

Fixed under rr647242. Thanks for the patch. 

> ConcurentModExc in DefaultDataBindingExtensionPoint 
> ----------------------------------------------------
>
>                 Key: TUSCANY-2085
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2085
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Data Binding Runtime
>    Affects Versions: Java-SCA-1.1
>            Reporter: Scott Kurz
>            Assignee: Raymond Feng
>            Priority: Minor
>             Fix For: Java-SCA-Next
>
>         Attachments: 2085.patch
>
>
> Get an exception like the following, 
> java.util.ConcurrentModificationException
> at java.util.AbstractList$SimpleListIterator.next(Unknown Source)at org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint.introspectType(DefaultDataBindingExtensionPoint.java:223)
> at org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSFaultExceptionMapper.introspectFaultDataType(JAXWSFaultExceptionMapper.java:214)
> at org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSJavaInterfaceProcessor.introspectFaultTypes(JAXWSJavaInterfaceProcessor.java:178)
> at org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSJavaInterfaceProcessor.visitInterface(JAXWSJavaInterfaceProcessor.java:90)
> at org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceIntrospectorImpl.introspectInterface(JavaInterfaceIntrospectorImpl.java:91)
> as this thread, A, is in a for-loop looping through 'databindings'
>  public boolean introspectType(DataType dataType, Annotation[] annotations, boolean isException) {
>         loadDataBindings();
>         for (DataBinding binding : databindings) {
> while another thread, B, is still in loadDataBindings() and is still adding to the databindings ArrayList.
> I'm working around this by putting a lock around the whole body  of loadDataBindings()
>     private final byte[] loadingLock = new byte[0];
>     ...
>     private void loadDataBindings() {
>         synchronized (loadingLock) {
>             if (loadedDataBindings)
>                 return;
>            ...
>        }
>    }
> Another option might be to change addDataBinding() to look at the 'bindings' Map before adding to 'databindings'.   
> I'll attach a patch and leave it for a second opinion.  

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org