axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From barre...@apache.org
Subject svn commit: r642633 - /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
Date Sat, 29 Mar 2008 22:42:04 GMT
Author: barrettj
Date: Sat Mar 29 15:41:59 2008
New Revision: 642633

URL: http://svn.apache.org/viewvc?rev=642633&view=rev
Log:
Add sychronized block

Modified:
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java?rev=642633&r1=642632&r2=642633&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
Sat Mar 29 15:41:59 2008
@@ -512,10 +512,14 @@
     public OperationDescription[] getDispatchableOperations() {
         OperationDescription[] returnOperations = null;
 
-        if (dispatchableOperations == null) {
-            initializeDispatchableOperationsList();
+        // REVIEW: Can this be synced at a more granular level?  Can't sync on dispatchableOperations
because
+        //         it may be null, but also the initialization must finish before next thread
sees 
+        //         dispatachableOperations != null
+        synchronized(this) {
+            if (dispatchableOperations == null) {
+                initializeDispatchableOperationsList();
+            }
         }
-        
         Collection<List<OperationDescription>> dispatchableValues = dispatchableOperations.values();
         Iterator<List<OperationDescription>> iteratorValues = dispatchableValues.iterator();
         ArrayList<OperationDescription> allDispatchableOperations = new ArrayList<OperationDescription>();



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


Mime
View raw message