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:44:22 GMT
Repository: camel
Updated Branches:
  refs/heads/master 975d40c1d -> 44a800390


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/44a80039
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/44a80039
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/44a80039

Branch: refs/heads/master
Commit: 44a800390fcfbf1f3e8c25b2a8b748a841e57755
Parents: 975d40c
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:41:23 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/44a80039/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