Package org.springframework.transaction.interceptor

Examples of org.springframework.transaction.interceptor.TransactionProxyFactoryBean


      if(attrs==null)
        return target;
      else
        throw new IllegalArgumentException("transaction manager is missing to perform declarative transaction");
    }
    final TransactionProxyFactoryBean tpfb = new TransactionProxyFactoryBean();
    //tpfb.setBeanFactory(ctxt.getApplicationContext());
    tpfb.setTarget(target);
    tpfb.setTransactionManager(tx);
    if(itfs!=null)
      tpfb.setProxyInterfaces(itfs);
    tpfb.setTransactionAttributes(attrs);
    //injectBasicBean(tpfb, ctxt);
    tpfb.setTarget(target);
    tpfb.setTransactionManager(tx);
    tpfb.setTransactionAttributes(attrs);
   
    if(itfs!=null){
      tpfb.setProxyInterfaces(itfs);
    }
    injectBasicBean(tpfb, ctxt);
    return tpfb.getObject();
  }
View Full Code Here


        Class[] ifaces = new Class[interfacesToProxyAs.length];
        for(int i = 0; i < interfacesToProxyAs.length; i++) {
                ifaces[i] = Class.forName(interfacesToProxyAs[i]);
        }

        TransactionProxyFactoryBean txfb = new TransactionProxyFactoryBean();
        txfb.setTransactionManager(new PersistenceBrokerTransactionManager());
        Properties txProps = new Properties();
        txProps.setProperty("*", "PROPAGATION_REQUIRED");
        txfb.setTransactionAttributes(txProps);
        txfb.setTarget(object);
        txfb.setProxyInterfaces(ifaces);
        txfb.afterPropertiesSet();
        return txfb.getObject();
    }
View Full Code Here

        Class[] ifaces = new Class[interfacesToProxyAs.length];
        for(int i = 0; i < interfacesToProxyAs.length; i++) {
                ifaces[i] = Class.forName(interfacesToProxyAs[i]);
        }

        TransactionProxyFactoryBean txfb = new TransactionProxyFactoryBean();
        txfb.setTransactionManager(new PersistenceBrokerTransactionManager());
        Properties txProps = new Properties();
        txProps.setProperty("*", "PROPAGATION_REQUIRED");
        txfb.setTransactionAttributes(txProps);
        txfb.setTarget(object);
        txfb.setProxyInterfaces(ifaces);
        txfb.afterPropertiesSet();
        return txfb.getObject();
    }
View Full Code Here

     * @return Tx Wrapped version of the priginal object
     * @throws Exception
     */
    public Object getTxProxiedObject(Object object, String[] interfacesToProxyAs) throws Exception
    {
        TransactionProxyFactoryBean txfb = new TransactionProxyFactoryBean();
        txfb.setTransactionManager(new PersistenceBrokerTransactionManager());
        Properties txProps = new Properties();
        txProps.setProperty("*", "PROPAGATION_REQUIRED");
        txfb.setTransactionAttributes(txProps);
        txfb.setTarget(object);
        txfb.setProxyInterfaces(interfacesToProxyAs);
        txfb.afterPropertiesSet();
        return txfb.getObject();
    }
View Full Code Here

TOP

Related Classes of org.springframework.transaction.interceptor.TransactionProxyFactoryBean

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.