camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r1067385 - /camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
Date Sat, 05 Feb 2011 03:49:02 GMT
Author: hadrian
Date: Sat Feb  5 03:49:02 2011
New Revision: 1067385

URL: http://svn.apache.org/viewvc?rev=1067385&view=rev
Log:
CAMEL-3438. Fix for injected context

Modified:
    camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java

Modified: camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java?rev=1067385&r1=1067384&r2=1067385&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
(original)
+++ camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
Sat Feb  5 03:49:02 2011
@@ -246,8 +246,10 @@ public class JaxbDataFormat extends Serv
     protected void doStart() throws Exception {
         ObjectHelper.notNull(camelContext, "CamelContext");
 
-        // create context and resolve partial class up front so they are ready to be used
-        context = createContext();
+        if (context == null) {
+            // if context not injected, create one and resolve partial class up front so
they are ready to be used
+            context = createContext();
+        }
         if (partClass != null) {
             partialClass = camelContext.getClassResolver().resolveMandatoryClass(partClass);
         }



Mime
View raw message