
Originally Posted by
mdeinum
It should have just one instance, can we see the configuration?
Sure.... here is the relevant portions
Code:
<bean id="sampleInterceptor" class="com.test.SampleInterceptor"/>
<bean id="nameMatchPointCut" class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
<property name="mappedName">
<value>get</value>
</property>
<property name="advice">
<ref bean="sampleInterceptor"/>
</property>
</bean>
<bean id="sampleObjectTarget" class="com.test.SampleObjectImpl" scope="singleton" />
< bean id="sampeObect" class="org.springframework.aop.framework.ProxyFactoryBean" scope="singleton">
<property name="proxyInterfaces">
<value>com.test.SampleObject</value>
</property>
<property name="target" ref="sampleObjectTarget"/>
<property name="interceptorNames">
<list>
<value>nameMatchPointCut</value>
</list>
</property>
</bean>
The one thing I thought of was to try with
Code:
<bean id="sampleInterceptor" class="com.test.SampleInterceptor" scope="singleton"/>
but did not think this would make a difference.