camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject git commit: Polished.
Date Fri, 08 Nov 2013 18:09:14 GMT
Updated Branches:
  refs/heads/master 5c459fdc9 -> f74ff2cf6


Polished.

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

Branch: refs/heads/master
Commit: f74ff2cf6f1e6939f4da75091307395870b3b0a8
Parents: 5c459fd
Author: Babak Vahdat <bvahdat@apache.org>
Authored: Fri Nov 8 19:09:06 2013 +0100
Committer: Babak Vahdat <bvahdat@apache.org>
Committed: Fri Nov 8 19:09:06 2013 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/support/ServiceSupport.java   |  2 ++
 .../main/java/org/apache/camel/util/ServiceHelper.java  |  4 ++--
 .../org/apache/camel/component/jpa/JpaConsumer.java     | 12 +++++-------
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f74ff2cf/camel-core/src/main/java/org/apache/camel/support/ServiceSupport.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/support/ServiceSupport.java b/camel-core/src/main/java/org/apache/camel/support/ServiceSupport.java
index e098620..afba302 100644
--- a/camel-core/src/main/java/org/apache/camel/support/ServiceSupport.java
+++ b/camel-core/src/main/java/org/apache/camel/support/ServiceSupport.java
@@ -268,12 +268,14 @@ public abstract class ServiceSupport implements StatefulService {
      * Implementations override this method to support customized suspend/resume.
      */
     protected void doSuspend() throws Exception {
+        // noop
     }
 
     /**
      * Implementations override this method to support customized suspend/resume.
      */
     protected void doResume() throws Exception {
+        // noop
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/camel/blob/f74ff2cf/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java b/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java
index d9d88cb..b613d13 100644
--- a/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java
@@ -102,7 +102,7 @@ public final class ServiceHelper {
     }
 
     /**
-     * Stops all of the given services, throwing the first exception caught
+     * Stops the given service, throwing the first exception caught
      */
     public static void stopService(Object value) throws Exception {
         if (isStopped(value)) {
@@ -156,7 +156,7 @@ public final class ServiceHelper {
     }
 
     /**
-     * Stops and shutdowns all of the given services, throwing the first exception caught
+     * Stops and shutdowns the given service, throwing the first exception caught
      */
     public static void stopAndShutdownService(Object value) throws Exception {
         stopService(value);

http://git-wip-us.apache.org/repos/asf/camel/blob/f74ff2cf/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
index 91ffd29..c239410 100644
--- a/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
+++ b/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaConsumer.java
@@ -45,7 +45,6 @@ import org.springframework.transaction.support.TransactionTemplate;
  */
 public class JpaConsumer extends ScheduledBatchPollingConsumer {
     private static final Logger LOG = LoggerFactory.getLogger(JpaConsumer.class);
-    private final JpaEndpoint endpoint;
     private final EntityManager entityManager;
     private final TransactionTemplate transactionTemplate;
     private QueryFactory queryFactory;
@@ -69,7 +68,6 @@ public class JpaConsumer extends ScheduledBatchPollingConsumer {
 
     public JpaConsumer(JpaEndpoint endpoint, Processor processor) {
         super(endpoint, processor);
-        this.endpoint = endpoint;
         this.entityManager = endpoint.createEntityManager();
         this.transactionTemplate = endpoint.createTransactionTemplate();
     }
@@ -129,7 +127,7 @@ public class JpaConsumer extends ScheduledBatchPollingConsumer {
             }
         });
 
-        return endpoint.getCamelContext().getTypeConverter().convertTo(int.class, messagePolled);
+        return getEndpoint().getCamelContext().getTypeConverter().convertTo(int.class, messagePolled);
     }
 
 
@@ -181,7 +179,7 @@ public class JpaConsumer extends ScheduledBatchPollingConsumer {
     // -------------------------------------------------------------------------
     @Override
     public JpaEndpoint getEndpoint() {
-        return endpoint;
+        return (JpaEndpoint) super.getEndpoint();
     }
 
     public QueryFactory getQueryFactory() {
@@ -327,7 +325,7 @@ public class JpaConsumer extends ScheduledBatchPollingConsumer {
                 return QueryBuilder.nativeQuery(nativeQuery);                
             }
         } else {
-            Class<?> entityType = endpoint.getEntityType();
+            Class<?> entityType = getEndpoint().getEntityType();
             
             if (entityType == null) {
                 return null;
@@ -422,7 +420,7 @@ public class JpaConsumer extends ScheduledBatchPollingConsumer {
     }
 
     protected void configureParameters(Query query) {
-        int maxResults = endpoint.getMaximumResults();
+        int maxResults = getEndpoint().getMaximumResults();
         if (maxResults > 0) {
             query.setMaxResults(maxResults);
         }
@@ -435,7 +433,7 @@ public class JpaConsumer extends ScheduledBatchPollingConsumer {
     }
 
     protected Exchange createExchange(Object result) {
-        Exchange exchange = endpoint.createExchange();
+        Exchange exchange = getEndpoint().createExchange();
         exchange.getIn().setBody(result);
         exchange.getIn().setHeader(JpaConstants.ENTITYMANAGER, entityManager);
         return exchange;


Mime
View raw message