Index: client/src/main/java/org/hippoecm/hst/component/support/beanloader/ClasspathScanningCandidateHippoBeanProvider.java
===================================================================
--- client/src/main/java/org/hippoecm/hst/component/support/beanloader/ClasspathScanningCandidateHippoBeanProvider.java	(revision 0)
+++ client/src/main/java/org/hippoecm/hst/component/support/beanloader/ClasspathScanningCandidateHippoBeanProvider.java	(revision 0)
@@ -0,0 +1,100 @@
+/*
+ *  Copyright 2008 Hippo.
+ * 
+ *  Licensed 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.hippoecm.hst.component.support.beanloader;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.hippoecm.hst.content.beans.Node;
+import org.hippoecm.hst.content.beans.standard.HippoBean;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.ResourceLoaderAware;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.ResourceLoader;
+import org.springframework.core.io.support.ResourcePatternResolver;
+import org.springframework.core.io.support.ResourcePatternUtils;
+import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
+import org.springframework.core.type.classreading.MetadataReader;
+import org.springframework.core.type.classreading.MetadataReaderFactory;
+import org.springframework.core.type.filter.TypeFilter;
+import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
+
+
+public class ClasspathScanningCandidateHippoBeanProvider implements ResourceLoaderAware {
+    private static final Logger logger = LoggerFactory.getLogger(ClasspathScanningCandidateHippoBeanProvider.class);
+    private ResourcePatternResolver resourcePatternResolver;
+
+    public List<Class<? extends HippoBean>> findCandidateHippoBeans() {
+        Set<String> annotatedClassNames = scanClasspathForClasses();
+
+        return loadProvidedClasses(annotatedClassNames);
+    }
+
+    private List<Class<? extends HippoBean>> loadProvidedClasses(Set<String> annotatedClassNames) {
+        List<Class<? extends HippoBean>> annotatedClasses = new ArrayList<Class<? extends HippoBean>>();
+        for (String className : annotatedClassNames) {
+            Class clazz = null;
+            try {
+                clazz = Thread.currentThread().getContextClassLoader().loadClass(className);
+                if (HippoBean.class.isAssignableFrom(clazz)) {
+                    //noinspection unchecked
+                    annotatedClasses.add(clazz);
+                } else {
+                    logger.error("The class {} has the @Node annotation but does not extend HippoBean.", clazz.getName());
+                }
+            } catch (ClassNotFoundException e) {
+                logger.warn("Skipped class registration into the mapper. Cannot load class: {}", className);
+            }
+        }
+        return annotatedClasses;
+    }
+
+    private Set<String> scanClasspathForClasses() {
+        Set<String> annotatedClassNames = new LinkedHashSet<String>();
+        try {
+            MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resourcePatternResolver);
+            
+            String packageName = "org/hippoecm/hst";
+            
+            String packageSearchPath = "classpath*:"+packageName+"/**/*.class";
+           
+            Resource[] resources = this.resourcePatternResolver.getResources(packageSearchPath);
+            TypeFilter tf = new FlatAnnotationTypeFilter(Node.class);
+
+            for (Resource resource : resources) {
+                logger.debug("Scanning {}", resource);
+                MetadataReader metadataReader = metadataReaderFactory.getMetadataReader(resource);
+                if (tf.match(metadataReader, metadataReaderFactory)) {
+                    logger.debug("Found an @Node annotated class {}", metadataReader.getAnnotationMetadata().getClassName());
+                    annotatedClassNames.add(metadataReader.getAnnotationMetadata().getClassName());
+                }
+            }
+        } catch (IOException e) {
+            logger.error("Cannot load the hippo beans from the classpath", e);
+            throw new HippobeansLoaderException("Problem found during the retrieval of class names from the classpath.", e);
+        }
+        return annotatedClassNames;
+    }
+
+    public void setResourceLoader(ResourceLoader resourceLoader) {
+      this.resourcePatternResolver = ResourcePatternUtils.getResourcePatternResolver(resourceLoader);
+    }
+}
Index: client/src/main/java/org/hippoecm/hst/component/support/beanloader/FlatAnnotationTypeFilter.java
===================================================================
--- client/src/main/java/org/hippoecm/hst/component/support/beanloader/FlatAnnotationTypeFilter.java	(revision 0)
+++ client/src/main/java/org/hippoecm/hst/component/support/beanloader/FlatAnnotationTypeFilter.java	(revision 0)
@@ -0,0 +1,40 @@
+/*
+ *  Copyright 2008 Hippo.
+ * 
+ *  Licensed 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.hippoecm.hst.component.support.beanloader;
+
+import org.springframework.core.type.filter.AnnotationTypeFilter;
+
+import java.lang.annotation.Annotation;
+
+
+public class FlatAnnotationTypeFilter extends AnnotationTypeFilter {
+    public FlatAnnotationTypeFilter(Class<? extends Annotation> annotationType) {
+        super(annotationType);
+    }
+
+    public FlatAnnotationTypeFilter(Class<? extends Annotation> annotationType, boolean considerMetaAnnotations) {
+        super(annotationType, considerMetaAnnotations);
+    }
+
+    /**
+     * We are only interested in annotations directly on the found bean, hence, {@link AnnotationTypeFilter#matchSuperClass(String)} must 
+     * return false.
+     */
+    @Override
+    protected Boolean matchSuperClass(String superClassName) {
+        return false;
+    }
+}
Index: client/src/main/java/org/hippoecm/hst/component/support/beanloader/HippobeansLoaderException.java
===================================================================
--- client/src/main/java/org/hippoecm/hst/component/support/beanloader/HippobeansLoaderException.java	(revision 0)
+++ client/src/main/java/org/hippoecm/hst/component/support/beanloader/HippobeansLoaderException.java	(revision 0)
@@ -0,0 +1,44 @@
+/*
+ *  Copyright 2008 Hippo.
+ * 
+ *  Licensed 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.hippoecm.hst.component.support.beanloader;
+
+/**
+ * <p>Exception used to indicate a problem during the retrieval of hippo beans</p>
+ *
+ */
+public class HippobeansLoaderException extends RuntimeException {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Constructor accepting a message describing the exception
+     *
+     * @param message String containing the error message
+     */
+    public HippobeansLoaderException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructor accepting the message and the original exception
+     *
+     * @param message String describing the exception
+     * @param cause   Throwable the original cause
+     */
+    public HippobeansLoaderException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}
Index: client/src/main/java/org/hippoecm/hst/component/support/beanloader/ObjectConverterFactory.java
===================================================================
--- client/src/main/java/org/hippoecm/hst/component/support/beanloader/ObjectConverterFactory.java	(revision 0)
+++ client/src/main/java/org/hippoecm/hst/component/support/beanloader/ObjectConverterFactory.java	(revision 0)
@@ -0,0 +1,145 @@
+/*
+ *  Copyright 2008 Hippo.
+ * 
+ *  Licensed 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.hippoecm.hst.component.support.beanloader;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.hippoecm.hst.content.beans.Node;
+import org.hippoecm.hst.content.beans.manager.ObjectConverter;
+import org.hippoecm.hst.content.beans.manager.ObjectConverterImpl;
+import org.hippoecm.hst.content.beans.standard.HippoAsset;
+import org.hippoecm.hst.content.beans.standard.HippoBean;
+import org.hippoecm.hst.content.beans.standard.HippoDirectory;
+import org.hippoecm.hst.content.beans.standard.HippoDocument;
+import org.hippoecm.hst.content.beans.standard.HippoFacetSelect;
+import org.hippoecm.hst.content.beans.standard.HippoFixedDirectory;
+import org.hippoecm.hst.content.beans.standard.HippoFolder;
+import org.hippoecm.hst.content.beans.standard.HippoHtml;
+import org.hippoecm.hst.content.beans.standard.HippoImage;
+import org.hippoecm.hst.content.beans.standard.HippoMirror;
+import org.hippoecm.hst.content.beans.standard.HippoResource;
+import org.hippoecm.hst.content.beans.standard.facetnavigation.HippoFacetNavigation;
+import org.hippoecm.hst.content.beans.standard.facetnavigation.HippoFacetResult;
+import org.hippoecm.hst.content.beans.standard.facetnavigation.HippoFacetSearch;
+import org.hippoecm.hst.content.beans.standard.facetnavigation.HippoFacetSubNavigation;
+import org.hippoecm.hst.content.beans.standard.facetnavigation.HippoFacetsAvailableNavigation;
+import org.hippoecm.hst.core.component.HstComponentException;
+import org.hippoecm.hst.core.component.HstComponentFatalException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.FactoryBean;
+
+
+public class ObjectConverterFactory implements FactoryBean<ObjectConverter> {
+    private static final Logger logger = LoggerFactory.getLogger(ObjectConverterFactory.class);
+
+    private ClasspathScanningCandidateHippoBeanProvider classpathScanningCandidateHippoBeanProvider;
+
+    /**
+     * Constructor that needs the {@link ClasspathScanningCandidateHippoBeanProvider implementation} to import the
+     * classes from the classpath
+     *
+     * @param classpathScanningCandidateHippoBeanProvider ClasspathScanningCandidateHippoBeanProvider needed
+     */
+    public ObjectConverterFactory(ClasspathScanningCandidateHippoBeanProvider classpathScanningCandidateHippoBeanProvider) {
+        this.classpathScanningCandidateHippoBeanProvider = classpathScanningCandidateHippoBeanProvider;
+    }
+
+    public final ObjectConverter getObject() {
+        return getObjectConverter();
+    }
+
+    public final Class<ObjectConverter> getObjectType() {
+        return ObjectConverter.class;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public final boolean isSingleton() {
+        return true;
+    }
+
+    private ObjectConverter getObjectConverter() {
+
+        // builds ordered mapping from jcrPrimaryNodeType to class or interface(s).
+        Map<String, Class<? extends HippoBean>> jcrPrimaryNodeTypeClassPairs = new HashMap<String, Class<? extends HippoBean>>();
+        List<Class<? extends HippoBean>> annotatedClasses = classpathScanningCandidateHippoBeanProvider.findCandidateHippoBeans();
+        for (Class<? extends HippoBean> c : annotatedClasses) {
+            addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, c, false);
+        }
+        // below the default present mapped mappings
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoDocument.class, true);
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoFolder.class, true);
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoMirror.class, true);
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoFacetSelect.class, true);
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoDirectory.class, true);
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoFixedDirectory.class, true);
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoHtml.class, true);
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoResource.class, true);
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoAsset.class, true);
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoImage.class, true);
+
+        // facet navigation parts:
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoFacetSearch.class, true);
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoFacetNavigation.class, true);
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoFacetsAvailableNavigation.class, true);
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoFacetSubNavigation.class, true);
+        addJcrPrimaryNodeTypeClassPair(jcrPrimaryNodeTypeClassPairs, HippoFacetResult.class, true);
+
+        // builds a fallback jcrPrimaryNodeType array.
+        String[] fallBackJcrNodeTypes = getFallBackJcrNodeTypes();
+        return new ObjectConverterImpl(jcrPrimaryNodeTypeClassPairs, fallBackJcrNodeTypes);
+    }
+
+
+    /**
+     * If you want other fallbacktypes, override this method. Note, that the fallback types are tried in order that the
+     * array is. A fallback type is suited for creating a bean for the node if: node.isNodeType(fallBackJcrNodeType)
+     * returns true.
+     *
+     * @return String array containing the fallback types
+     */
+    protected String[] getFallBackJcrNodeTypes() {
+        return new String[]{"hippo:facetselect", "hippo:mirror", "hippostd:directory", "hippostd:folder", "hippo:resource", "hippo:request", "hippostd:html", "hippo:document"};
+    }
+
+    private static void addJcrPrimaryNodeTypeClassPair(Map<String, Class<? extends HippoBean>> jcrPrimaryNodeTypeClassPairs,
+                                                       Class clazz, boolean builtinType) throws HstComponentException {
+        String jcrPrimaryNodeType = null;
+
+        if (clazz.isAnnotationPresent(Node.class)) {
+            Node anno = (Node) clazz.getAnnotation(Node.class);
+            jcrPrimaryNodeType = anno.jcrType();
+        }
+
+        if (jcrPrimaryNodeTypeClassPairs.get(jcrPrimaryNodeType) != null) {
+            if (builtinType) {
+                logger.debug("Builtin annotated class for primary type '{}' is overridden. Builtin version is ignored", jcrPrimaryNodeType);
+            } else {
+                throw new HstComponentFatalException("Annotated class for primarytype '" + jcrPrimaryNodeType + "' is duplicate. " +
+                        "You might have configured a bean in 'beans-annotated-classes.xml' that does not have a annotation for the jcrType and" +
+                        "inherits the jcrType from the bean it extends, resulting in 2 beans with the same jcrType. Correct your beans.");
+            }
+            return;
+        }
+
+        if (jcrPrimaryNodeType == null) {
+            throw new IllegalArgumentException("There's no annotation for jcrType in the class: " + clazz);
+        }
+
+        jcrPrimaryNodeTypeClassPairs.put(jcrPrimaryNodeType, clazz);
+    }
+}

