camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1102383 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/management/DefaultManagementAgent.java components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
Date Thu, 12 May 2011 17:10:33 GMT
Author: davsclaus
Date: Thu May 12 17:10:32 2011
New Revision: 1102383

URL: http://svn.apache.org/viewvc?rev=1102383&view=rev
Log:
CAMEL-3967: Ensure custom classpath resolver is set asap on CamelContest so it can be used
immediately. Fixes issues using Camel 2.7 on JBoss.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementAgent.java
    camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementAgent.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementAgent.java?rev=1102383&r1=1102382&r2=1102383&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementAgent.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementAgent.java
Thu May 12 17:10:32 2011
@@ -240,7 +240,7 @@ public class DefaultManagementAgent exte
     public void unregister(ObjectName name) throws JMException {
         if (server.isRegistered(name)) {
             server.unregisterMBean(name);
-            LOG.debug("Unregistered MBean with objectname: {}" + name);
+            LOG.debug("Unregistered MBean with objectname: {}", name);
         }
         mbeansRegistered.remove(name);
     }

Modified: camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java?rev=1102383&r1=1102382&r2=1102383&view=diff
==============================================================================
--- camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
(original)
+++ camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
Thu May 12 17:10:32 2011
@@ -132,18 +132,21 @@ public abstract class AbstractCamelConte
         if (ObjectHelper.isEmpty(getId())) {
             throw new IllegalArgumentException("Id must be set");
         }
-        if (getProperties() != null) {
-            getContext().setProperties(getProperties().asMap());
-        }
-
-        // set the type converter mode first
-        initLazyLoadTypeConverteres();
 
+        // set the package scan resolver as soon as possible
         PackageScanClassResolver packageResolver = getBeanForType(PackageScanClassResolver.class);
         if (packageResolver != null) {
             LOG.info("Using custom PackageScanClassResolver: " + packageResolver);
             getContext().setPackageScanClassResolver(packageResolver);
         }
+
+        // then set custom properties
+        if (getProperties() != null) {
+            getContext().setProperties(getProperties().asMap());
+        }
+        // and enable lazy loading of type converters if applicable
+        initLazyLoadTypeConverteres();
+
         ClassResolver classResolver = getBeanForType(ClassResolver.class);
         if (classResolver != null) {
             LOG.info("Using custom ClassResolver: " + classResolver);



Mime
View raw message