You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2014/06/24 17:22:24 UTC

[1/3] git commit: CAMEL-7351: camel-cache - Should create default cache manager factory if no specific config file configured

Repository: camel
Updated Branches:
  refs/heads/camel-2.12.x 76784069f -> 3d31e1ee3
  refs/heads/camel-2.13.x b0cbe4f93 -> 58f5d853e
  refs/heads/master ebbce3afc -> 35236a10c


CAMEL-7351: camel-cache - Should create default cache manager factory if no specific config file configured


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

Branch: refs/heads/master
Commit: 35236a10c43aed596a639d8eee3c100f8be81737
Parents: ebbce3a
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jun 24 17:21:19 2014 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jun 24 17:21:19 2014 +0200

----------------------------------------------------------------------
 .../java/org/apache/camel/component/cache/CacheComponent.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/35236a10/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java b/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
index 21f1bf1..82ce9f8 100755
--- a/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
+++ b/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
@@ -95,11 +95,12 @@ public class CacheComponent extends DefaultComponent {
     protected void doStart() throws Exception {
         super.doStart();
         if (cacheManagerFactory == null) {
-            InputStream is = null;
             if (configurationFile != null) {
-                is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(), configurationFile);
+                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(), configurationFile);
+                cacheManagerFactory = new DefaultCacheManagerFactory(is, configurationFile);
+            } else {
+                cacheManagerFactory = new DefaultCacheManagerFactory();
             }
-            cacheManagerFactory = new DefaultCacheManagerFactory(is, configurationFile);
         }
         ServiceHelper.startService(cacheManagerFactory);
     }


[3/3] git commit: CAMEL-7351: camel-cache - Should create default cache manager factory if no specific config file configured

Posted by da...@apache.org.
CAMEL-7351: camel-cache - Should create default cache manager factory if no specific config file configured


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

Branch: refs/heads/camel-2.13.x
Commit: 58f5d853e2179d024b959416577a0da677d57343
Parents: b0cbe4f
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jun 24 17:21:19 2014 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jun 24 17:22:08 2014 +0200

----------------------------------------------------------------------
 .../java/org/apache/camel/component/cache/CacheComponent.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/58f5d853/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java b/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
index 21f1bf1..82ce9f8 100755
--- a/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
+++ b/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
@@ -95,11 +95,12 @@ public class CacheComponent extends DefaultComponent {
     protected void doStart() throws Exception {
         super.doStart();
         if (cacheManagerFactory == null) {
-            InputStream is = null;
             if (configurationFile != null) {
-                is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(), configurationFile);
+                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(), configurationFile);
+                cacheManagerFactory = new DefaultCacheManagerFactory(is, configurationFile);
+            } else {
+                cacheManagerFactory = new DefaultCacheManagerFactory();
             }
-            cacheManagerFactory = new DefaultCacheManagerFactory(is, configurationFile);
         }
         ServiceHelper.startService(cacheManagerFactory);
     }


[2/3] git commit: CAMEL-7351: camel-cache - Should create default cache manager factory if no specific config file configured

Posted by da...@apache.org.
CAMEL-7351: camel-cache - Should create default cache manager factory if no specific config file configured


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

Branch: refs/heads/camel-2.12.x
Commit: 3d31e1ee387ff13b8ee4af7c6c121185d9e34352
Parents: 7678406
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jun 24 17:21:19 2014 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jun 24 17:21:54 2014 +0200

----------------------------------------------------------------------
 .../java/org/apache/camel/component/cache/CacheComponent.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3d31e1ee/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java b/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
index 21f1bf1..82ce9f8 100755
--- a/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
+++ b/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
@@ -95,11 +95,12 @@ public class CacheComponent extends DefaultComponent {
     protected void doStart() throws Exception {
         super.doStart();
         if (cacheManagerFactory == null) {
-            InputStream is = null;
             if (configurationFile != null) {
-                is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(), configurationFile);
+                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(), configurationFile);
+                cacheManagerFactory = new DefaultCacheManagerFactory(is, configurationFile);
+            } else {
+                cacheManagerFactory = new DefaultCacheManagerFactory();
             }
-            cacheManagerFactory = new DefaultCacheManagerFactory(is, configurationFile);
         }
         ServiceHelper.startService(cacheManagerFactory);
     }