Package org.springframework.tests.sample.beans

Examples of org.springframework.tests.sample.beans.INestedTestBean


    Assume.notLogging(factoryLog);
    ClassPathXmlApplicationContext ac = newContext("aspectsPlusAdvisor.xml");
    StopWatch sw = new StopWatch();
    sw.start("Prototype Creation");
    for (int i = 0; i < 100000; i++) {
      INestedTestBean shouldNotBeWeaved = (INestedTestBean) ac.getBean("i21");
      if (i < 10) {
        assertFalse(AopUtils.isAopProxy(shouldNotBeWeaved));
      }
    }
    sw.stop();
View Full Code Here


    props.setProperty("tb", "testBean4");
    ppc.setProperties(props);
    ppc.postProcessBeanFactory(bf);

    ExtendedResourceInjectionBean bean = (ExtendedResourceInjectionBean) bf.getBean("annotatedBean");
    INestedTestBean tb = bean.getTestBean6();
    assertNotNull(tb);

    ExtendedResourceInjectionBean anotherBean = (ExtendedResourceInjectionBean) bf.getBean("annotatedBean");
    assertNotSame(anotherBean, bean);
    assertNotSame(anotherBean.getTestBean6(), tb);
View Full Code Here

        return this;
      }
    };
    ProxyFactory pf = new ProxyFactory(target);
    pf.addAdvice(new DelegatingIntroductionInterceptor(delegate));
    INestedTestBean proxy = (INestedTestBean) pf.getProxy();

    assertEquals(company, proxy.getCompany());
    ITestBean introduction = (ITestBean) proxy;
    assertSame("Introduced method returning delegate returns proxy", introduction, introduction.getSpouse());
    assertTrue("Introduced method returning delegate returns proxy", AopUtils.isAopProxy(introduction.getSpouse()));
  }
View Full Code Here

TOP

Related Classes of org.springframework.tests.sample.beans.INestedTestBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.