Index: src/main/java/org/apache/james/container/spring/lifecycle/SpringClasspathConfigurationRegistry.java
===================================================================
--- src/main/java/org/apache/james/container/spring/lifecycle/SpringClasspathConfigurationRegistry.java	(revision 0)
+++ src/main/java/org/apache/james/container/spring/lifecycle/SpringClasspathConfigurationRegistry.java	(revision 0)
@@ -0,0 +1,37 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+package org.apache.james.container.spring.lifecycle;
+
+import org.apache.commons.configuration.HierarchicalConfiguration;
+
+/**
+ * @author root
+ *
+ */
+public class SpringClasspathConfigurationRegistry extends SpringConfigurationRegistry {
+
+	/* (non-Javadoc)
+	 * @see org.apache.james.container.spring.Registry#getForComponent(java.lang.String)
+	 */
+	public HierarchicalConfiguration getForComponent(String componentname)
+			throws org.apache.james.container.spring.Registry.RegistryException {
+		return getForComponent(componentname, SpringConfigurationRegistry.SpringLoadType.CLASSPATH);
+	}
+
+}
Index: src/main/java/org/apache/james/container/spring/lifecycle/SpringFileConfigurationRegistry.java
===================================================================
--- src/main/java/org/apache/james/container/spring/lifecycle/SpringFileConfigurationRegistry.java	(revision 0)
+++ src/main/java/org/apache/james/container/spring/lifecycle/SpringFileConfigurationRegistry.java	(revision 0)
@@ -0,0 +1,37 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+package org.apache.james.container.spring.lifecycle;
+
+import org.apache.commons.configuration.HierarchicalConfiguration;
+
+/**
+ * @author root
+ *
+ */
+public class SpringFileConfigurationRegistry extends SpringConfigurationRegistry {
+
+	/* (non-Javadoc)
+	 * @see org.apache.james.container.spring.Registry#getForComponent(java.lang.String)
+	 */
+	public HierarchicalConfiguration getForComponent(String componentname)
+			throws org.apache.james.container.spring.Registry.RegistryException {
+		return getForComponent(componentname, SpringConfigurationRegistry.SpringLoadType.FILE);
+	}
+
+}
Index: src/main/java/org/apache/james/container/spring/lifecycle/SpringConfigurationRegistry.java
===================================================================
--- src/main/java/org/apache/james/container/spring/lifecycle/SpringConfigurationRegistry.java	(revision 942302)
+++ src/main/java/org/apache/james/container/spring/lifecycle/SpringConfigurationRegistry.java	(working copy)
@@ -33,27 +33,40 @@
 import org.springframework.core.io.ResourceLoader;
 
 /**
- * Load Configuration and act as provider
+ * Load Configuration and act as provider.
  * 
- *
+ * This abstract class must be extended to implement the 
+ * org.apache.james.container.spring.Registry#getForComponent method
  */
-public class SpringConfigurationRegistry implements Registry<HierarchicalConfiguration>, ResourceLoaderAware, InitializingBean {
+public abstract class SpringConfigurationRegistry implements Registry<HierarchicalConfiguration>, ResourceLoaderAware, InitializingBean {
 
 	private ResourceLoader loader;
 	private Map<String,HierarchicalConfiguration> confMap = new HashMap<String,HierarchicalConfiguration>();
     private Map<String,String> resources;
+    
+    /**
+     * Enumeration that contains the different load type.
+     */
+    protected enum SpringLoadType {
+    	CLASSPATH("classpath:"),
+    	FILE("file://conf/");
+    	private final String loadType;
+    	SpringLoadType(String loadType) {
+    		this.loadType = loadType;
+    	}
+    }
 
 	/*
 	 * (non-Javadoc)
 	 * @see org.apache.james.container.spring.Registry#getForComponent(java.lang.String)
 	 */
-	public HierarchicalConfiguration getForComponent(String name)
+	public HierarchicalConfiguration getForComponent(String name, SpringLoadType springLoadType)
 			throws RegistryException {
 	    HierarchicalConfiguration conf = confMap.get(name);
 	    if (conf != null) {
 	        return conf;
 	    } else {
-	        Resource r = loader.getResource("file://conf/" + name + ".xml");
+	        Resource r = loader.getResource(springLoadType.loadType + name + ".xml");
 	        if (r.exists()) {
 	            try {
                     return getConfig(r);
Index: src/main/config/james/spring-beans.xml
===================================================================
--- src/main/config/james/spring-beans.xml	(revision 942302)
+++ src/main/config/james/spring-beans.xml	(working copy)
@@ -71,8 +71,15 @@
         <property name="configurationRegistry" ref="configurationRegistry" />
         <property name="order" value="1" />
     </bean>
+    
+    <!-- To load configuration from file (in conf directory,
+         use org.apache.james.container.spring.lifecycle.SpringFileConfigurationRegistry 
+         To load configuration from classpath, change in all xml configuration files 
+         "file://conf/" with "classpath:" and
+         use org.apache.james.container.spring.lifecycle.SpringClasspathConfigurationRegistry 
+     -->
 
-    <bean id="configurationRegistry" class="org.apache.james.container.spring.lifecycle.SpringConfigurationRegistry">
+    <bean id="configurationRegistry" class="org.apache.james.container.spring.lifecycle.SpringFileConfigurationRegistry">
         <property name="configurationMappings">
             <map>
                 <entry key="mailboxmanager" value="imapserver" />
