Spring Framework AbstractBeanFactoryBasedTargetSource - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework AbstractBeanFactoryBasedTargetSource class.

This code example shows how to use the following methods:setTargetBeanName
	/** 
	 * Set the name of the bean that is to be scoped. 
	 */ 
	public void setTargetBeanName(String targetBeanName) { 
		this.targetBeanName = targetBeanName; 
		this.scopedTargetSource.setTargetBeanName(targetBeanName); 
	} 
 
	@Override 
	public void setBeanFactory(BeanFactory beanFactory) { 
		if (!(beanFactory instanceof ConfigurableBeanFactory)) { 
			throw new IllegalStateException("Not running in a ConfigurableBeanFactory: " + beanFactory); 
		} 
		ConfigurableBeanFactory cbf = (ConfigurableBeanFactory) beanFactory; 
 
		this.scopedTargetSource.setBeanFactory(beanFactory); 
 
		ProxyFactory pf = new ProxyFactory(); 
		pf.copyFrom(this); 
		pf.setTargetSource(this.scopedTargetSource); 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getBeanFactory, getTargetBeanName
        this.lock.writeLock().lock();
        try 
        { 
            if (this.target == null)
            { 
                this.target = getBeanFactory().getBean(getTargetBeanName());
            } 
            return this.target;
        } 
        finally 
        { 
            this.lock.writeLock().unlock();
        } 
    } 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Spring Framework AbstractBeanFactoryBasedTargetSource Methods: