cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/2] cxf git commit: [CXF-6229] Cache result if schema was not able to be loaded
Date Mon, 09 Feb 2015 20:43:50 GMT
[CXF-6229] Cache result if schema was not able to be loaded


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d5ba290b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d5ba290b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d5ba290b

Branch: refs/heads/2.7.x-fixes
Commit: d5ba290b4bc1537595ed1a1224d13ffd7ffc8ec1
Parents: e467277
Author: Daniel Kulp <dkulp@apache.org>
Authored: Mon Feb 9 15:40:47 2015 -0500
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Mon Feb 9 15:43:43 2015 -0500

----------------------------------------------------------------------
 .../java/org/apache/cxf/wsdl/EndpointReferenceUtils.java  | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/d5ba290b/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java b/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
index 7057b67..c2fc67a 100644
--- a/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
+++ b/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
@@ -740,9 +740,13 @@ public final class EndpointReferenceUtils {
             return null;
         }
         Schema schema = serviceInfo.getProperty(Schema.class.getName(), Schema.class);
-        if (schema == null && !serviceInfo.hasProperty(Schema.class.getName())) {
-            synchronized (serviceInfo) {
-                return createSchema(serviceInfo, b);
+        if (schema == null && !serviceInfo.hasProperty(Schema.class.getName() + ".CHECKED"))
{
+            try {
+                synchronized (serviceInfo) {
+                    return createSchema(serviceInfo, b);
+                }
+            } finally {
+                serviceInfo.setProperty(Schema.class.getName() + ".CHECKED", Boolean.TRUE);
             }
         }
         return schema;


Mime
View raw message