<?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">

<!--
	Shows common interceptor along with advisor.
-->
<beans>

	<description>
		Matches all Advisors in the factory: we don't use a prefix
	</description>

	<bean id="aapc"
		class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator">
		
		<!-- This common interceptor will be applied always,
		before custom lockable advisor -->
		<property name="interceptorNames">
			<value>nopInterceptor</value>
		</property>
	</bean>

	<bean id="nopInterceptor" class="org.springframework.aop.interceptor.NopInterceptor" />

	<!--
		Stateful mixin. Will apply to all objects
		Note that singleton property is false.
	-->
	<bean id="lockableAdvisor"
		class="org.springframework.aop.framework.LockMixinAdvisor"
		scope="prototype"
	/>
	
	<bean id="test1"
		class="org.springframework.beans.TestBean">
		<property name="age"><value>4</value></property>
	</bean>
	
	<bean id="test2"
		class="org.springframework.beans.TestBean">
		<property name="age"><value>4</value></property>
	</bean>
	

</beans>		
	
	