Package org.apache.wicket.spring

Examples of org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget()


      {
        target = LazyInitProxyFactory.createProxy(field.getType(), locator);
      }
      else
      {
        target = locator.locateProxyTarget();
      }

      // only put the proxy into the cache if the bean is a singleton
      if (locator.isSingletonBean())
      {
View Full Code Here


      {
        target = LazyInitProxyFactory.createProxy(field.getType(), locator);
      }
      else
      {
        target = locator.locateProxyTarget();
      }

      // only put the proxy into the cache if the bean is a singleton
      if (locator.isSingletonBean())
      {
View Full Code Here

      {
        target = LazyInitProxyFactory.createProxy(field.getType(), locator);
      }
      else
      {
        target = locator.locateProxyTarget();
      }

      // only put the proxy into the cache if the bean is a singleton
      if (locator.isSingletonBean())
      {
View Full Code Here

      {
        target = LazyInitProxyFactory.createProxy(field.getType(), locator);
      }
      else
      {
        target = locator.locateProxyTarget();
      }

      // only put the proxy into the cache if the bean is a singleton
      if (locator.isSingletonBean())
      {
View Full Code Here

      {
        target = LazyInitProxyFactory.createProxy(field.getType(), locator);
      }
      else
      {
        target = locator.locateProxyTarget();
      }

      // only put the proxy into the cache if the bean is a singleton
      if (locator.isSingletonBean())
      {
View Full Code Here

      {
        target = LazyInitProxyFactory.createProxy(field.getType(), locator);
      }
      else
      {
        target = locator.locateProxyTarget();
      }

      // only put the proxy into the cache if the bean is a singleton
      if (locator.isSingletonBean())
      {
View Full Code Here

    Bean bean = new Bean();

    ctx.putBean("bean", bean);

    SpringBeanLocator locator = new SpringBeanLocator(Bean.class, ctxLocator);
    assertTrue(locator.locateProxyTarget() == bean);
  }

  /**
   * tests if lookup by class is still working after deserialization
   */
 
View Full Code Here

    ctx.putBean("bean", bean);

    SpringBeanLocator locator = (SpringBeanLocator) Objects
        .cloneObject(new SpringBeanLocator(Bean.class, ctxLocator));

    assertNotNull(locator.locateProxyTarget());
  }

  /**
   * tests error if bean with class is not in the context
   */
 
View Full Code Here

  public void testLookupByClassNotFound()
  {
    SpringBeanLocator locator = new SpringBeanLocator(Bean.class, ctxLocator);
    try
    {
      locator.locateProxyTarget();
      fail();
    }
    catch (IllegalStateException e)
    {
      // noop
View Full Code Here

    ctx.putBean("somebean2", bean);

    SpringBeanLocator locator = new SpringBeanLocator(Bean.class, ctxLocator);
    try
    {
      locator.locateProxyTarget();
      fail();
    }
    catch (IllegalStateException e)
    {
      // noop
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.