01: /*
02: * Copyright 2002-2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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
38: FatalBeanException {
39:
40: /**
41: * Create a new FactoryBeanNotInitializedException with the default message.
42: */
43: public FactoryBeanNotInitializedException() {
44: super ("FactoryBean is not fully initialized yet");
45: }
46:
47: /**
48: * Create a new FactoryBeanNotInitializedException with the given message.
49: * @param msg the detail message
50: */
51: public FactoryBeanNotInitializedException(String msg) {
52: super(msg);
53: }
54:
55: }
|