camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject git commit: CAMEL-7370: Polish
Date Wed, 16 Apr 2014 10:45:32 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.13.x 3e0c62930 -> fcf0261cc


CAMEL-7370: Polish


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

Branch: refs/heads/camel-2.13.x
Commit: fcf0261cc4c8538dd9f0ddea15c91bf87e9127f4
Parents: 3e0c629
Author: Babak Vahdat <bvahdat@apache.org>
Authored: Wed Apr 16 12:41:23 2014 +0200
Committer: Babak Vahdat <bvahdat@apache.org>
Committed: Wed Apr 16 12:44:56 2014 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/mongodb/MongoDbComponent.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fcf0261c/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbComponent.java
b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbComponent.java
index 3718aba..513cc6d 100644
--- a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbComponent.java
+++ b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbComponent.java
@@ -39,7 +39,7 @@ public class MongoDbComponent extends DefaultComponent {
             new HashSet<MongoDbOperation>(Arrays.asList(MongoDbOperation.insert, MongoDbOperation.save,

                     MongoDbOperation.update, MongoDbOperation.remove));
     private static final Logger LOG = LoggerFactory.getLogger(MongoDbComponent.class);
-    private Mongo db;
+    private volatile Mongo db;
 
     /**
      * Should access a singleton of type Mongo
@@ -47,6 +47,7 @@ public class MongoDbComponent extends DefaultComponent {
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object>
parameters) throws Exception {
         if (db == null) {
             db = CamelContextHelper.mandatoryLookup(getCamelContext(), remaining, Mongo.class);
+            LOG.debug("Resolved the connection with the name {} as {}", remaining, db);
         }
 
         Endpoint endpoint = new MongoDbEndpoint(uri, this);
@@ -60,7 +61,7 @@ public class MongoDbComponent extends DefaultComponent {
     protected void doShutdown() throws Exception {
         if (db != null) {
             // properly close the underlying physical connection to MongoDB
-            LOG.debug("closing the connection {} on {}", db, this);
+            LOG.debug("Closing the connection {} on {}", db, this);
             db.close();
         }
 


Mime
View raw message