Alef,
Thanks for the reply!
No, I don't think I did that, unless I'm misunderstanding the question. Here's my config.xml:
Code:
<bean id="serviceContextTarget" class="com.myco.ServiceContext" singleton="false">
</bean>
<bean id="serviceContext" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>com.myco.IServiceContext</value>
</property>
<property name="singleton">
<value>false</value>
</property>
<property name="targetSource">
<bean class="org.springframework.aop.target.ThreadLocalTargetSource">
<property name="targetBeanName"><value>serviceContextTarget</value></property>
</bean>
</property>
</bean>
<bean id="baseService" abstract="true" class="com.myco.BaseService">
<property name="serviceContext"><ref bean="serviceContext"/></property>
</bean>
<bean id="serviceATarget" class="com.myco.ServiceA" parent="baseService">
<property name="serviceB"><ref bean="com.myco.IServiceB"/></property>
</bean>
<bean id="com.myco.IServiceA" parent="springProxy">
<property name="target"><ref bean="serviceATarget"/></property>
</bean>
<bean id="serviceBTarget" class="com.myco.ServiceB" parent="baseService">
</bean>
<bean id="com.myco.IServiceB" parent="springProxy">
<property name="target"><ref bean="serviceBTarget"/></property>
</bean>
BaseService is the base service class from which all others inherit. I'm trying to keep the detail down to a reasonable level here so I left out the springProxy parent, which is just a TransactionProxyFactoryBean.
Users of serviceA request the interface com.myco.IServiceA from the Spring application context.
Any suggestions?