I'm reading section
http://www.springframework.org/docs/...p.html#d0e3285
that gives an example on how to configure ProxyFactoryBean
My question is what if class PersonImpl of the above example implements more than one interface?Code:<bean id="person" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="proxyInterfaces"><value>com.mycompany.Person</value></property> <property name="target"><ref local="personTarget"/></property> <property name="interceptorNames"> <list> <value>myAdvisor</value> <value>debugInterceptor</value> </list> </property> </bean>
I`m asking because of the following situation:
Let's assume a "PersonImpl" extends AbstractPerson
and AbstractPerson implements 2 interfaces, let's say interfaceA and interfaceB.
Now I have to decide which interface is the "right" interface for the property "proxyInterfaces" A or B? But If I stayed with A I loose the business functionality of B and vice versa.
Is this a real problem or am I just doing things the wrong way?
Maybe I have to pass all implemented interfaces in a list?
Thank you!Code:<property name="proxyInterfaces"> <list> <value>interfaceA</value> <value>interfaceB</value> </list> </property>
Mo


Reply With Quote