Calling a service from a service breaking!
Hello,
I currently have two server services that I am exposing through HttpInvoker, FooManager and BarManager and are accessed via Swing client. These work fine when independent, but now Foo.doSomethingFoo() needs to call BarManager.doSomethingBar() as part of it's logic.
My problem is that when I execute Foo.doSomething() on my client, the dynamic proxy for Foo on my client is trying to load my BarManager *implementation* which, rightly so, the client app context knows nothing about. What is the best practice when a service implementation needs to access another service on the client? Which app context loader should I be using to do this?
This is what my client app context looks like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- Configure remote Foo Manager access-->
<bean id="fooManager" class="org.springframework.remoting.httpinvoker.Ht tpInvokerProxyFactoryBean">
<property name="serviceUrl">
<value>http://localhost:8080/myapp/remoting/PersistenceService</value>
</property>
<property name="serviceInterface">
<value>com.zilliant.bar.IFoo</value>
</property>
</bean>
<!-- Configure remote Bar Manager access-->
<bean id="barManager" class="org.springframework.remoting.httpinvoker.Ht tpInvokerProxyFactoryBean">
<property name="serviceUrl">
<value>http://localhost:8080/myapp/remoting/BarService</value>
</property>
<property name="serviceInterface">
<value>com.zilliant.bar.IBar</value>
</property>
</bean>
</beans>
Any assistance is greatly appreciated.
Edward