Spring Framework BeanCurrentlyInCreationException - 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 BeanCurrentlyInCreationException class.

This code example shows how to use the following methods:
	 * @see #isSingletonCurrentlyInCreation 
	 */ 
	protected void beforeSingletonCreation(String beanName) {
		if (!this.inCreationCheckExclusions.contains(beanName) && !this.singletonsCurrentlyInCreation.add(beanName)) {
			throw new BeanCurrentlyInCreationException(beanName);
		} 
	} 
 
	/** 
	 * Callback after singleton creation. 
	 * <p>The default implementation marks the singleton as not in creation anymore. 
	 * @param beanName the name of the singleton that has been created 
	 * @see #isSingletonCurrentlyInCreation 
	 */ 
	protected void afterSingletonCreation(String beanName) {
		if (!this.inCreationCheckExclusions.contains(beanName) && !this.singletonsCurrentlyInCreation.remove(beanName)) {
			throw new IllegalStateException("Singleton '" + beanName + "' isn't currently in creation");
		} 
	} 
 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java