Author: hadrian
Date: Tue Apr  3 04:13:21 2012
New Revision: 1308674

URL: http://svn.apache.org/viewvc?rev=1308674&view=rev
Log:
CS and minor fixes

Modified:
    
camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
    camel/branches/camel-2.9.x/components/camel-jsch/pom.xml
    
camel/branches/camel-2.9.x/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/JschComponent.java
    
camel/branches/camel-2.9.x/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java
    
camel/branches/camel-2.9.x/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
    camel/branches/camel-2.9.x/parent/pom.xml
    
camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jsch/ScpTest.java

Modified: 
camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java?rev=1308674&r1=1308673&r2=1308674&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
 Tue Apr  3 04:13:21 2012
@@ -150,46 +150,7 @@ public abstract class AbstractCamelConte
         // and enable lazy loading of type converters if applicable
         initLazyLoadTypeConverteres();
 
-        ClassResolver classResolver = getBeanForType(ClassResolver.class);
-        if (classResolver != null) {
-            LOG.info("Using custom ClassResolver: " + classResolver);
-            getContext().setClassResolver(classResolver);
-        }
-        FactoryFinderResolver factoryFinderResolver = 
getBeanForType(FactoryFinderResolver.class);
-        if (factoryFinderResolver != null) {
-            LOG.info("Using custom FactoryFinderResolver: " + 
factoryFinderResolver);
-            getContext().setFactoryFinderResolver(factoryFinderResolver);
-        }
-        ExecutorServiceManager executorServiceStrategy = 
getBeanForType(ExecutorServiceManager.class);
-        if (executorServiceStrategy != null) {
-            LOG.info("Using custom ExecutorServiceStrategy: " + 
executorServiceStrategy);
-            getContext().setExecutorServiceManager(executorServiceStrategy);
-        }
-        ThreadPoolFactory threadPoolFactory = 
getBeanForType(ThreadPoolFactory.class);
-        if (threadPoolFactory != null) {
-            LOG.info("Using custom ThreadPoolFactory: " + threadPoolFactory);
-            
getContext().getExecutorServiceManager().setThreadPoolFactory(threadPoolFactory);
-        }
-        ProcessorFactory processorFactory = 
getBeanForType(ProcessorFactory.class);
-        if (processorFactory != null) {
-            LOG.info("Using custom ProcessorFactory: " + processorFactory);
-            getContext().setProcessorFactory(processorFactory);
-        }
-        Debugger debugger = getBeanForType(Debugger.class);
-        if (debugger != null) {
-            LOG.info("Using custom Debugger: " + debugger);
-            getContext().setDebugger(debugger);
-        }
-        UuidGenerator uuidGenerator = getBeanForType(UuidGenerator.class);
-        if (uuidGenerator != null) {
-            LOG.info("Using custom UuidGenerator: " + uuidGenerator);
-            getContext().setUuidGenerator(uuidGenerator);
-        }
-        NodeIdFactory nodeIdFactory = getBeanForType(NodeIdFactory.class);
-        if (nodeIdFactory != null) {
-            LOG.info("Using custom NodeIdFactory: " + nodeIdFactory);
-            getContext().setNodeIdFactory(nodeIdFactory);
-        }
+        setupCustomServices();
 
         // set the custom registry if defined
         initCustomRegistry(getContext());
@@ -746,4 +707,46 @@ public abstract class AbstractCamelConte
         return packages.toArray(new String[packages.size()]);
     }
 
+    private void setupCustomServices() {
+        ClassResolver classResolver = getBeanForType(ClassResolver.class);
+        if (classResolver != null) {
+            LOG.info("Using custom ClassResolver: " + classResolver);
+            getContext().setClassResolver(classResolver);
+        }
+        FactoryFinderResolver factoryFinderResolver = 
getBeanForType(FactoryFinderResolver.class);
+        if (factoryFinderResolver != null) {
+            LOG.info("Using custom FactoryFinderResolver: " + 
factoryFinderResolver);
+            getContext().setFactoryFinderResolver(factoryFinderResolver);
+        }
+        ExecutorServiceManager executorServiceStrategy = 
getBeanForType(ExecutorServiceManager.class);
+        if (executorServiceStrategy != null) {
+            LOG.info("Using custom ExecutorServiceStrategy: " + 
executorServiceStrategy);
+            getContext().setExecutorServiceManager(executorServiceStrategy);
+        }
+        ThreadPoolFactory threadPoolFactory = 
getBeanForType(ThreadPoolFactory.class);
+        if (threadPoolFactory != null) {
+            LOG.info("Using custom ThreadPoolFactory: " + threadPoolFactory);
+            
getContext().getExecutorServiceManager().setThreadPoolFactory(threadPoolFactory);
+        }
+        ProcessorFactory processorFactory = 
getBeanForType(ProcessorFactory.class);
+        if (processorFactory != null) {
+            LOG.info("Using custom ProcessorFactory: " + processorFactory);
+            getContext().setProcessorFactory(processorFactory);
+        }
+        Debugger debugger = getBeanForType(Debugger.class);
+        if (debugger != null) {
+            LOG.info("Using custom Debugger: " + debugger);
+            getContext().setDebugger(debugger);
+        }
+        UuidGenerator uuidGenerator = getBeanForType(UuidGenerator.class);
+        if (uuidGenerator != null) {
+            LOG.info("Using custom UuidGenerator: " + uuidGenerator);
+            getContext().setUuidGenerator(uuidGenerator);
+        }
+        NodeIdFactory nodeIdFactory = getBeanForType(NodeIdFactory.class);
+        if (nodeIdFactory != null) {
+            LOG.info("Using custom NodeIdFactory: " + nodeIdFactory);
+            getContext().setNodeIdFactory(nodeIdFactory);
+        }
+    }
 }

Modified: camel/branches/camel-2.9.x/components/camel-jsch/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-jsch/pom.xml?rev=1308674&r1=1308673&r2=1308674&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-jsch/pom.xml (original)
+++ camel/branches/camel-2.9.x/components/camel-jsch/pom.xml Tue Apr  3 
04:13:21 2012
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.camel</groupId>
     <artifactId>camel-parent</artifactId>
-    <version>2.10-SNAPSHOT</version>
+    <version>2.9.2-SNAPSHOT</version>
     <relativePath>../../parent</relativePath>
   </parent>
 

Modified: 
camel/branches/camel-2.9.x/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/JschComponent.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/JschComponent.java?rev=1308674&r1=1308673&r2=1308674&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/JschComponent.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/JschComponent.java
 Tue Apr  3 04:13:21 2012
@@ -16,11 +16,11 @@
  */
 package org.apache.camel.component.jsch;
 
-import com.jcraft.jsch.JSch;
-
 import java.net.URI;
 import java.util.Map;
 
+import com.jcraft.jsch.JSch;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.file.GenericFileEndpoint;
 import org.apache.camel.component.file.remote.RemoteFileComponent;

Modified: 
camel/branches/camel-2.9.x/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java?rev=1308674&r1=1308673&r2=1308674&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java
 Tue Apr  3 04:13:21 2012
@@ -31,12 +31,6 @@ import com.jcraft.jsch.Session;
 import com.jcraft.jsch.UIKeyboardInteractive;
 import com.jcraft.jsch.UserInfo;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Hashtable;
-import java.util.List;
-
 import org.apache.camel.Exchange;
 import org.apache.camel.InvalidPayloadException;
 import org.apache.camel.component.file.GenericFileEndpoint;

Modified: 
camel/branches/camel-2.9.x/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java?rev=1308674&r1=1308673&r2=1308674&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
 Tue Apr  3 04:13:21 2012
@@ -16,17 +16,17 @@
  */
 package org.apache.camel.component.jsch;
 
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
-import com.jcraft.jsch.UserInfo;
-
 import java.io.File;
 import java.io.IOException;
 import java.security.Provider;
 import java.security.Provider.Service;
 import java.security.Security;
 
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import com.jcraft.jsch.UserInfo;
+
 import org.apache.camel.test.AvailablePortFinder;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.camel.util.FileUtil;

Modified: camel/branches/camel-2.9.x/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/parent/pom.xml?rev=1308674&r1=1308673&r2=1308674&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/parent/pom.xml (original)
+++ camel/branches/camel-2.9.x/parent/pom.xml Tue Apr  3 04:13:21 2012
@@ -151,6 +151,7 @@
     <spring-security-version>3.0.7.RELEASE</spring-security-version>
     <spring-ws-version>2.0.3.RELEASE</spring-ws-version>
     <spymemcached-version>2.8.0</spymemcached-version>
+    <sshd-version>0.6.0</sshd-version>
     <stax-api-version>1.0.1</stax-api-version>
     <stringtemplate-version>3.0</stringtemplate-version>
     <tagsoup-version>1.2.1</tagsoup-version>

Modified: 
camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jsch/ScpTest.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jsch/ScpTest.java?rev=1308674&r1=1308673&r2=1308674&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jsch/ScpTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jsch/ScpTest.java
 Tue Apr  3 04:13:21 2012
@@ -16,9 +16,6 @@
  */
 package org.apache.camel.itest.osgi.jsch;
 
-import static org.ops4j.pax.exam.CoreOptions.equinox;
-import static org.ops4j.pax.exam.OptionUtils.combine;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
 import org.apache.camel.Exchange;
 import org.apache.camel.itest.osgi.OSGiIntegrationSpringTestSupport;
 
@@ -30,6 +27,10 @@ import org.ops4j.pax.exam.junit.Configur
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import 
org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
 
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.ops4j.pax.exam.OptionUtils.combine;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
+
 @RunWith(JUnit4TestRunner.class)
 @Ignore("Not fully implemented, see TODO")
 public class ScpTest extends OSGiIntegrationSpringTestSupport {


Reply via email to