use of java.beans.beancontext.BeanContextChild in project jdk8u_jdk by JetBrains.
the class MyBean method main.
public static void main(String[] args) {
for (int i = 0; i < 10; i++) {
BeanContextServices container = new BeanContextServicesSupport();
BeanContextChild ms1 = new MyService1();
BeanContextServices ms2 = new MyService2();
BeanContextChild mb = new MyBean();
container.add(ms1);
container.add(ms2);
ms2.add(mb);
// exception thrown here
container.remove(ms2);
}
}
Aggregations