类 ContextJndiBeanFactoryLocator

    • 字段详细资料

    • 方法详细资料

      • useBeanFactory

        public BeanFactoryReference useBeanFactory​(String factoryKey)
                                            throws BeansException
        Load/use a bean factory, as specified by a factory key which is a JNDI address, of the form java:comp/env/ejb/BeanFactoryPath. The contents of this JNDI location must be a string containing one or more classpath resource names (separated by any of the delimiters ',; \t\n' if there is more than one. The resulting BeanFactory (or ApplicationContext) will be created from the combined resources.
        指定者:
        useBeanFactory 在接口中 BeanFactoryLocator
        参数:
        factoryKey - a resource name specifying which BeanFactory the BeanFactoryLocator must return for usage. The actual meaning of the resource name is specific to the implementation of BeanFactoryLocator.
        返回:
        the BeanFactory instance, wrapped as a BeanFactoryReference object
        抛出:
        BeansException - if there is an error loading or accessing the BeanFactory
        另请参阅:
        createBeanFactory(java.lang.String[])
      • createBeanFactory

        protected BeanFactoryReference createBeanFactory​(String[] resources)
                                                  throws BeansException
        Create the BeanFactory instance, given an array of class path resource Strings which should be combined. This is split out as a separate method so that subclasses can override the actual BeanFactory implementation class.

        Delegates to createApplicationContext by default, wrapping the result in a ContextBeanFactoryReference.

        参数:
        resources - an array of Strings representing classpath resource names
        返回:
        the created BeanFactory, wrapped in a BeanFactoryReference (for example, a ContextBeanFactoryReference wrapping an ApplicationContext)
        抛出:
        BeansException - if factory creation failed
        另请参阅:
        createApplicationContext(java.lang.String[]), ContextBeanFactoryReference
      • createApplicationContext

        protected ApplicationContext createApplicationContext​(String[] resources)
                                                       throws BeansException
        Create the ApplicationContext instance, given an array of class path resource Strings which should be combined
        参数:
        resources - an array of Strings representing classpath resource names
        返回:
        the created ApplicationContext
        抛出:
        BeansException - if context creation failed