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:52 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 7889d0389 -> 6c6acecbc


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

Branch: refs/heads/3.0.x-fixes
Commit: 6c6acecbcf198e39b6925c01318ab005ca3cf0df
Parents: 7889d03
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:41:43 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/6c6acecb/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