<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">

<beans>

	<!-- Simple target -->
	<bean id="test" class="test.beans.SideEffectBean">	
		<property name="count"><value>10</value></property>
	</bean>
	
	<bean id="prototypeTest" class="test.beans.SideEffectBean" scope="prototype">
		<property name="count"><value>10</value></property>
	</bean>

	<bean id="prototypeTargetSource" class="org.springframework.aop.target.PrototypeTargetSource">	
		<property name="targetBeanName"><value>prototypeTest</value></property>
	</bean>
	
	<bean id="debugInterceptor" class="test.aop.NopInterceptor" />
	
	<bean id="singleton" class="org.springframework.aop.framework.ProxyFactoryBean">
		<property name="interceptorNames"><value>debugInterceptor,test</value></property>		
	</bean>

	<!--
		This will create a bean that creates a new target on each invocation.
	-->
	<bean id="prototype" class="org.springframework.aop.framework.ProxyFactoryBean">
		<property name="targetSource"><ref local="prototypeTargetSource"/></property>
		<property name="interceptorNames"><value>debugInterceptor</value></property>
	</bean>

</beans>
