cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf git commit: [CXF-6229] Cache result if schema was not able to be loaded
Date Mon, 09 Feb 2015 20:41:11 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 428f2ef31 -> ef34e4ec5


[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/ef34e4ec
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ef34e4ec
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ef34e4ec

Branch: refs/heads/master
Commit: ef34e4ec537528a9cee082d93264d9f8989e360f
Parents: 428f2ef
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:40:47 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/ef34e4ec/core/src/main/java/org/apache/cxf/ws/addressing/EndpointReferenceUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/ws/addressing/EndpointReferenceUtils.java b/core/src/main/java/org/apache/cxf/ws/addressing/EndpointReferenceUtils.java
index 6710ee4..4ab5910 100644
--- a/core/src/main/java/org/apache/cxf/ws/addressing/EndpointReferenceUtils.java
+++ b/core/src/main/java/org/apache/cxf/ws/addressing/EndpointReferenceUtils.java
@@ -669,9 +669,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