camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1394668 - /camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaComponent.java
Date Fri, 05 Oct 2012 17:25:04 GMT
Author: bvahdat
Date: Fri Oct  5 17:25:04 2012
New Revision: 1394668

URL: http://svn.apache.org/viewvc?rev=1394668&view=rev
Log:
The call for "super.doStart();" should be the first step and not the last one, so that there's
a proper notNull-check for the context before we start using it.  

Modified:
    camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaComponent.java

Modified: camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaComponent.java?rev=1394668&r1=1394667&r2=1394668&view=diff
==============================================================================
--- camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaComponent.java
(original)
+++ camel/trunk/components/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaComponent.java
Fri Oct  5 17:25:04 2012
@@ -77,6 +77,8 @@ public class JpaComponent extends Defaul
 
     @Override
     protected void doStart() throws Exception {
+        super.doStart();
+
         // lookup entity manager factory and use it if only one provided
         if (entityManagerFactory == null) {
             Map<String, EntityManagerFactory> map = getCamelContext().getRegistry().lookupByType(EntityManagerFactory.class);
@@ -130,7 +132,5 @@ public class JpaComponent extends Defaul
         if (transactionManager == null) {
             LOG.warn("No TransactionManager has been configured on this JpaComponent. Each
JpaEndpoint will auto create their own JpaTransactionManager.");
         }
-
-        super.doStart();
     }
 }



Mime
View raw message