Examples of ScopedObject


Examples of org.springframework.aop.scope.ScopedObject

      Object scopedObject = executionEntity.getVariable(name);
      if (scopedObject == null) {
        scopedObject = objectFactory.getObject();
        if (scopedObject instanceof ScopedObject) {
          ScopedObject sc = (ScopedObject) scopedObject;
          scopedObject = sc.getTargetObject();
          logger.fine("de-referencing " + ScopedObject.class.getName() + "#targetObject before persisting variable");
        }
        persistVariable(name, scopedObject);
      }
      return createDirtyCheckingProxy(name, scopedObject);
View Full Code Here

Examples of org.springframework.aop.scope.ScopedObject

  public void testInterceptorWithPlainObject() throws Exception {
    ScopedBeanInterceptor interceptor = new ScopedBeanInterceptor();
    final Object realObject = new Object();

    ScopedObject scoped = new ScopedObject() {
      public Object getTargetObject() {
        return realObject;
      }
      public void removeFromScope() {
        // do nothing
View Full Code Here

Examples of org.springframework.aop.scope.ScopedObject

    ProxyFactory proxyFactory = new ProxyFactory();
    proxyFactory.setTarget(realObject);
    proxyFactory.setProxyTargetClass(true);
    final Object proxy = proxyFactory.getProxy();

    ScopedObject scoped = new ScopedObject() {
      public Object getTargetObject() {
        return proxy;
      }
      public void removeFromScope() {
        // do nothing
View Full Code Here

Examples of org.springframework.aop.scope.ScopedObject

                    "': Target type could not be determined at the time of proxy creation.");
        }

        // Add an introduction that implements only the methods on ScopedObject.
        // Not sure if this is useful...
        ScopedObject scopedObject = new DefaultScopedObject(cbf, scopedTargetSource.getTargetBeanName());
        pf.addAdvice(new DelegatingIntroductionInterceptor(scopedObject));

        // Add the AopInfrastructureBean marker to indicate that the scoped proxy
        // itself is not subject to auto-proxying! Only its target bean is.
        // Not sure if this is needed....
View Full Code Here

Examples of org.springframework.aop.scope.ScopedObject

                    "': Target type could not be determined at the time of proxy creation.");
        }

        // Add an introduction that implements only the methods on ScopedObject.
        // Not sure if this is useful...
        ScopedObject scopedObject = new DefaultScopedObject(cbf, scopedTargetSource.getTargetBeanName());
        pf.addAdvice(new DelegatingIntroductionInterceptor(scopedObject));

        // Add the AopInfrastructureBean marker to indicate that the scoped proxy
        // itself is not subject to auto-proxying! Only its target bean is.
        // Not sure if this is needed....
View Full Code Here

Examples of org.springframework.aop.scope.ScopedObject

                    "': Target type could not be determined at the time of proxy creation.");
        }

        // Add an introduction that implements only the methods on ScopedObject.
        // Not sure if this is useful...
        ScopedObject scopedObject = new DefaultScopedObject(cbf, scopedTargetSource.getTargetBeanName());
        pf.addAdvice(new DelegatingIntroductionInterceptor(scopedObject));

        // Add the AopInfrastructureBean marker to indicate that the scoped proxy
        // itself is not subject to auto-proxying! Only its target bean is.
        // Not sure if this is needed....
View Full Code Here

Examples of org.springframework.aop.scope.ScopedObject

                    "': Target type could not be determined at the time of proxy creation.");
        }

        // Add an introduction that implements only the methods on ScopedObject.
        // Not sure if this is useful...
        ScopedObject scopedObject = new DefaultScopedObject(cbf, scopedTargetSource.getTargetBeanName());
        pf.addAdvice(new DelegatingIntroductionInterceptor(scopedObject));

        // Add the AopInfrastructureBean marker to indicate that the scoped proxy
        // itself is not subject to auto-proxying! Only its target bean is.
        // Not sure if this is needed....
View Full Code Here

Examples of org.springframework.aop.scope.ScopedObject

  public void testInterceptorWithPlainObject() throws Exception {
    ScopedBeanInterceptor interceptor = new ScopedBeanInterceptor();
    final Object realObject = new Object();

    ScopedObject scoped = new ScopedObject() {
      @Override
      public Object getTargetObject() {
        return realObject;
      }
      @Override
View Full Code Here

Examples of org.springframework.aop.scope.ScopedObject

    ProxyFactory proxyFactory = new ProxyFactory();
    proxyFactory.setTarget(realObject);
    proxyFactory.setProxyTargetClass(true);
    final Object proxy = proxyFactory.getProxy();

    ScopedObject scoped = new ScopedObject() {
      @Override
      public Object getTargetObject() {
        return proxy;
      }
      @Override
View Full Code Here

Examples of org.springframework.aop.scope.ScopedObject

      Object scopedObject = executionEntity.getVariable(name);
      if (scopedObject == null) {
        scopedObject = objectFactory.getObject();
        if (scopedObject instanceof ScopedObject) {
          ScopedObject sc = (ScopedObject) scopedObject;
          scopedObject = sc.getTargetObject();
          logger.fine("de-referencing " + ScopedObject.class.getName() + "#targetObject before persisting variable");
        }
        persistVariable(name, scopedObject);
      }
      return createDirtyCheckingProxy(name, scopedObject);
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.