Hello,
We are building a complex J2EE application with multiple layers, each layer having its own IoC container definition. Beside, we have multiple sibling web application which use beans from others layers. Everything is packaged in an EAR file.
I've used the ContextSingletonBeanFactory ContextSingletonBeanFactoryLocator example to define a context hierarchy and to resolve beans from the lower layers and avoid duplication among the various WEB modules. http://http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.html
It works perfectly except for one of my web module.
This module is referencing bean from the lower layer directly in the context-file, (the others are using the SingletonContextFactoryLocator programmatically)
My question is how to reference a bean loaded in the EAR classloader from a WebApplicationContext.HTML Code:<bean class="org.springframework.remoting.rmi.RmiServiceExporter"> <property name="service"> <ref parent="autocompleterServiceDelegate"/> </property> <property name="serviceName" value="rmiAutocompleterService"/> <property name="serviceInterface" value="com.sgam.tanis.svc.client.delegate.IAutocompleterDelegate"/> <property name="registryPort" value="${rmiPort}"/> </bean>
The reference documumentation states you should use the SingletonContext instancesBut I could not figured out how to do this.as the parents of the web-application Spring IoC container instances
Can please someone help me, I'm stuck here.
Patrick


Reply With Quote