.war
files), you do not need to do anything special in order to take advantage of WebLogic Server clusters. All you need to do is deploy your Spring application to the servers in a WebLogic Server cluster. For information on which Spring versions are supported with this and other WebLogic Server/Spring integration features, seeSupport for Spring Framework on WebLogic Server .WebLogic Server extends the Spring JndiRmiProxyFactoryBean
and its associated service exporter so that it supports proxying with any Java EE RMI implementation. To use the extension to the JndiRmiProxyFactoryBean
and its exporter:
Configure client support by implementing code such as the following:
<bean id="proProxy" class="org.springframework.remoting.rmi.JndiRmiProxyFactoryBean"> <property name="jndiName" value="t3://${serverName}:${rmiPort}/order"/> </property> <property name="jndiEnvironment"> <props> <prop key="java.naming.factory.url.pkgs">weblogic.jndi.factories</prop> </props> </property> <property name="serviceInterface" value="org.springframework.samples.jpetstore.domain.logic.OrderService"/> </bean>
Configure the service exporter by implementing code such as the following:
<bean id="order-pro" class="org.springframework.remoting.rmi.JndiRmiServiceExporter"> <property name="service" ref="petStore"/> <property name="serviceInterface" value="org.springframework.samples.jpetstore.domain.logic.OrderService"/> <property name="jndiName" value="order"/> </bean>