/** * Creates an advisor for this FactoryBean's TransactionInterceptor. */ @Override protected Object createMainInterceptor() { this.transactionInterceptor.afterPropertiesSet(); if (this.pointcut != null) { return new DefaultPointcutAdvisor(this.pointcut, this.transactionInterceptor); } else { // Rely on default pointcut. return new TransactionAttributeSourceAdvisor(this.transactionInterceptor); } }
/** * Create a new TransactionAttributeSourceAdvisor. * @param interceptor the transaction interceptor to use for this advisor */ public TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor) { setTransactionInterceptor(interceptor); }
/** * Set the transaction interceptor to use for this advisor. */ public void setTransactionInterceptor(TransactionInterceptor interceptor) { setAdvice(interceptor); if (interceptor.getTransactionAttributeSource() == null) { throw new AopConfigException( "Cannot construct a TransactionAttributeSourceAdvisor using a " + "TransactionInterceptor that has no TransactionAttributeSource configured"); } this.transactionAttributeSource = interceptor.getTransactionAttributeSource(); }
/** * Creates an advisor for this FactoryBean's TransactionInterceptor. */ @Override protected Object createMainInterceptor() { this.transactionInterceptor.afterPropertiesSet(); if (this.pointcut != null) { return new DefaultPointcutAdvisor(this.pointcut, this.transactionInterceptor); } else { // Rely on default pointcut. return new TransactionAttributeSourceAdvisor(this.transactionInterceptor); } }
/** * Create a new TransactionAttributeSourceAdvisor. * @param interceptor the transaction interceptor to use for this advisor */ public TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor) { setTransactionInterceptor(interceptor); }
@Test public void serializability() throws Exception { TransactionInterceptor ti = new TransactionInterceptor(); ti.setTransactionAttributes(new Properties()); TransactionAttributeSourceAdvisor tas = new TransactionAttributeSourceAdvisor(ti); SerializationTestUtils.serializeAndDeserialize(tas); }
/** * Create a new TransactionAttributeSourceAdvisor. * @param interceptor the transaction interceptor to use for this advisor */ public TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor) { setTransactionInterceptor(interceptor); }
/** * Creates an advisor for this FactoryBean's TransactionInterceptor. */ @Override protected Object createMainInterceptor() { this.transactionInterceptor.afterPropertiesSet(); if (this.pointcut != null) { return new DefaultPointcutAdvisor(this.pointcut, this.transactionInterceptor); } else { // Rely on default pointcut. return new TransactionAttributeSourceAdvisor(this.transactionInterceptor); } }
/** * Create a new TransactionAttributeSourceAdvisor. * @param interceptor the transaction interceptor to use for this advisor */ public TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor) { setTransactionInterceptor(interceptor); }
/** * Creates an advisor for this FactoryBean's TransactionInterceptor. */ @Override protected Object createMainInterceptor() { this.transactionInterceptor.afterPropertiesSet(); if (this.pointcut != null) { return new DefaultPointcutAdvisor(this.pointcut, this.transactionInterceptor); } else { // Rely on default pointcut. return new TransactionAttributeSourceAdvisor(this.transactionInterceptor); } }
/** * Create a new TransactionAttributeSourceAdvisor. * @param interceptor the transaction interceptor to use for this advisor */ public TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor) { setTransactionInterceptor(interceptor); }
proxyFactory.addAdvisor(new TransactionAttributeSourceAdvisor(this.transactionInterceptor));