You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2014/02/26 13:03:37 UTC

git commit: [CXF-5579] Adding getBus(boolean createIfNeeded) to AbstractEndpointFactory

Repository: cxf
Updated Branches:
  refs/heads/master 36ec4ee12 -> 3ccc90d58


[CXF-5579] Adding getBus(boolean createIfNeeded) to AbstractEndpointFactory


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

Branch: refs/heads/master
Commit: 3ccc90d58ed677e22aa724f7caeb54cac6b6ef97
Parents: 36ec4ee
Author: Sergey Beryozkin <sb...@talend.com>
Authored: Wed Feb 26 12:03:01 2014 +0000
Committer: Sergey Beryozkin <sb...@talend.com>
Committed: Wed Feb 26 12:03:01 2014 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/endpoint/AbstractEndpointFactory.java     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/3ccc90d5/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java b/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
index 3e6974b..27f89c7 100644
--- a/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
+++ b/core/src/main/java/org/apache/cxf/endpoint/AbstractEndpointFactory.java
@@ -78,12 +78,16 @@ public abstract class AbstractEndpointFactory extends AbstractBasicInterceptorPr
     }
 
     public Bus getBus() {
-        if (bus == null) {
+        return getBus(true);
+    }
+    
+    public Bus getBus(boolean createIfNeeded) {
+        if (bus == null && createIfNeeded) {
             bus = BusFactory.getThreadDefaultBus();
         }
         return bus;
     }
-
+    
     public void setBus(Bus bus) {
         this.bus = bus;
     }