Package org.springframework.aop.target

Examples of org.springframework.aop.target.SingletonTargetSource


  protected TargetSource createTargetSource(Object target) {
    if (target instanceof TargetSource) {
      return (TargetSource) target;
    }
    else {
      return new SingletonTargetSource(target);
    }
  }
View Full Code Here


    // Create proxy if we have advice.
    Object[] specificInterceptors = getAdvicesAndAdvisorsForBean(bean.getClass(), beanName, null);
    if (specificInterceptors != DO_NOT_PROXY) {
      this.advisedBeans.add(cacheKey);
      Object proxy = createProxy(bean.getClass(), beanName, specificInterceptors, new SingletonTargetSource(bean));
      this.proxyTypes.put(cacheKey, proxy.getClass());
      return proxy;
    }

    this.nonAdvisedBeans.add(cacheKey);
View Full Code Here

    }

    @Override
    public void writeObjectData( final ByteBuffer buffer, final Object object ) {
        try {
            _kryo.writeObjectData( buffer, new SingletonTargetSource(((AbstractBeanFactoryBasedTargetSource)object).getTarget()) );
        } catch ( final RuntimeException e ) {
            // Don't eat and wrap RuntimeExceptions because the ObjectBuffer.write...
            // handles SerializationException specifically (resizing the buffer)...
            throw e;
        } catch ( final Exception e ) {
View Full Code Here

  @Before
  public void setUp() throws Exception {
    interceptor = new RetryOperationsInterceptor();
    target = new ServiceImpl();
    service = (Service) ProxyFactory.getProxy(Service.class, new SingletonTargetSource(target));
    count = 0;
    transactionCount = 0;
  }
View Full Code Here

  private static int count;

  @Before
  public void setUp() throws Exception {
    interceptor = new StatefulRetryOperationsInterceptor();
    service = (Service) ProxyFactory.getProxy(Service.class, new SingletonTargetSource(new ServiceImpl()));
    transformer = (Transformer) ProxyFactory.getProxy(Transformer.class, new SingletonTargetSource(
        new TransformerImpl()));
    count = 0;
  }
View Full Code Here

TOP

Related Classes of org.springframework.aop.target.SingletonTargetSource

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.