package it.mice.voila.runtime.util;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.access.BeanFactoryLocator;
import org.springframework.context.access.ContextSingletonBeanFactoryLocator;

/**
 * A GlobalContext that define a ContextSingletonBeanFactoryLocator for the
 * entire enterprise application context spring beans.
 */
public class GlobalContext {
    /**
     * Default logger
     */
    private static Log logger = LogFactory.getLog(GlobalContext.class);
    /**
     * Return the bean factory factory locator of the ContextSingletonBeanFactoryLocator.
     * @return singleton bean factory locator associated to the global context
     * @see org.springframework.context.access.ContextSingletonBeanFactoryLocator
     */
    public static BeanFactoryLocator getBeanFactoryLocator() {
        return ContextSingletonBeanFactoryLocator.getInstance();
    }
}
