Examples of INestedTestBean


Examples of org.springframework.beans.INestedTestBean

                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

Examples of org.springframework.beans.INestedTestBean

    ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext(
        "/org/springframework/aop/aspectj/autoproxy/aspectsPlusAdvisor.xml");
    StopWatch sw = new StopWatch();
    sw.start("prototype");
    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

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

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

    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

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

        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
Copyright © 2018 www.massapi.com. 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.