Home » Spring-Framework-090522 » org.springframework » beans » factory » [javadoc | source]

    1   /*
    2    * Copyright 2002-2007 the original author or authors.
    3    *
    4    * Licensed under the Apache License, Version 2.0 (the "License");
    5    * you may not use this file except in compliance with the License.
    6    * You may obtain a copy of the License at
    7    *
    8    *      http://www.apache.org/licenses/LICENSE-2.0
    9    *
   10    * Unless required by applicable law or agreed to in writing, software
   11    * distributed under the License is distributed on an "AS IS" BASIS,
   12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   13    * See the License for the specific language governing permissions and
   14    * limitations under the License.
   15    */
   16   
   17   package org.springframework.beans.factory;
   18   
   19   import org.springframework.beans.FatalBeanException;
   20   
   21   /**
   22    * Exception to be thrown from a FactoryBean's <code>getObject()</code> method
   23    * if the bean is not fully initialized yet, for example because it is involved
   24    * in a circular reference.
   25    *
   26    * <p>Note: A circular reference with a FactoryBean cannot be solved by eagerly
   27    * caching singleton instances like with normal beans. The reason is that
   28    * <i>every</i> FactoryBean needs to be fully initialized before it can
   29    * return the created bean, while only <i>specific</i> normal beans need
   30    * to be initialized - that is, if a collaborating bean actually invokes
   31    * them on initialization instead of just storing the reference.
   32    *
   33    * @author Juergen Hoeller
   34    * @since 30.10.2003
   35    * @see FactoryBean#getObject()
   36    */
   37   public class FactoryBeanNotInitializedException extends FatalBeanException {
   38   
   39   	/**
   40   	 * Create a new FactoryBeanNotInitializedException with the default message.
   41   	 */
   42   	public FactoryBeanNotInitializedException() {
   43   		super("FactoryBean is not fully initialized yet");
   44   	}
   45   
   46   	/**
   47   	 * Create a new FactoryBeanNotInitializedException with the given message.
   48   	 * @param msg the detail message
   49   	 */
   50   	public FactoryBeanNotInitializedException(String msg) {
   51   		super(msg);
   52   	}
   53   
   54   }

Home » Spring-Framework-090522 » org.springframework » beans » factory » [javadoc | source]