类 SimpleJndiBeanFactory

  • 所有已实现的接口:
    BeanFactory

    public class SimpleJndiBeanFactory
    extends JndiLocatorSupport
    implements BeanFactory
    Simple JNDI-based implementation of Spring's BeanFactory interface. Does not support enumerating bean definitions, hence doesn't implement the ListableBeanFactory interface.

    This factory resolves given bean names as JNDI names within the Java EE application's "java:comp/env/" namespace. It caches the resolved types for all obtained objects, and optionally also caches shareable objects (if they are explicitly marked as shareable resource.

    The main intent of this factory is usage in combination with Spring's CommonAnnotationBeanPostProcessor, configured as "resourceFactory" for resolving @Resource annotations as JNDI objects without intermediate bean definitions. It may be used for similar lookup scenarios as well, of course, in particular if BeanFactory-style type checking is required.

    从以下版本开始:
    2.5
    作者:
    Juergen Hoeller
    另请参阅:
    DefaultListableBeanFactory, CommonAnnotationBeanPostProcessor