|
From: Mark P. <Mar...@co...> - 2005-05-02 00:39:23
|
Hi, I get a StackOverflowError when using the following context definition=20 <?xml version=3D"1.0" encoding=3D"UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id=3D"myClassA" class=3D"com.foo.ClassA" singleton=3D"false"> <property name=3D"classB"><ref local=3D"myClassB"/></property> </bean> =09 <bean id=3D"myClassB" class=3D"com.foo.ClassB" singleton=3D"false"> <property name=3D"classA"><ref local=3D"myClassA"/></property> </bean> </beans> And the code ApplicationContext ctx =3D new FileSystemXmlApplicationContext("appContext.xml"); ClassA ca =3D (ClassA) ctx.getBean("myClassA"); Note that they are both prototypes. The classes are very plain - ClassA has a property ClassB and vice versa and that is all. I'm using the code from CVS. What is the opinion on trying to detect this situation? Cheers, Mark |