You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by js...@apache.org on 2007/06/27 14:06:03 UTC

svn commit: r551133 - /incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java

Author: jstrachan
Date: Wed Jun 27 05:06:02 2007
New Revision: 551133

URL: http://svn.apache.org/viewvc?view=rev&rev=551133
Log:
minor refactor to allow derived SpringLoader classes to be used

Modified:
    incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java

Modified: incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java?view=diff&rev=551133&r1=551132&r2=551133
==============================================================================
--- incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java (original)
+++ incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/xbean/AbstractXBeanDeployer.java Wed Jun 27 05:06:02 2007
@@ -73,7 +73,7 @@
             // Load configuration
             Thread.currentThread().setContextClassLoader(component.getClass().getClassLoader());
 
-            SpringLoader springLoader = new SpringLoader();
+            SpringLoader springLoader = createSpringLoader();
             springLoader.setKernel(kernel);
             springLoader.setBaseDir(new File(serviceUnitRootPath));
             springLoader.setXmlPreprocessors(getXmlPreProcessors(serviceUnitRootPath));
@@ -113,7 +113,14 @@
             Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
         }
     }
-    
+
+    /**
+     * A factory method to allow derived classes to create alternative spring loaders
+     */
+    protected SpringLoader createSpringLoader() {
+        return new SpringLoader();
+    }
+
     protected List getServices(Kernel kernel) throws DeploymentException {
         return kernel.getServices(Endpoint.class);
     }