瀏覽代碼

Remove remoting from contacts sample

Closes gh-90
Rob Winch 3 年之前
父節點
當前提交
83e593b71c

+ 0 - 8
servlet/xml/java/contacts/client/client.properties

@@ -1,8 +0,0 @@
-# Properties file with server URL settings for remote access.
-# Applied by PropertyPlaceholderConfigurer from "clientContext.xml".
-#
-
-serverName=localhost
-httpPort=8080
-contextPath=/spring-security-sample-contacts-filter
-rmiPort=1099

+ 0 - 73
servlet/xml/java/contacts/client/clientContext.xml

@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "https://www.springframework.org/dtd/spring-beans.dtd">
-
-<!--
-  - Contacts web application
-  - Client application context
-  -->
-
-<beans>
-
-	<!-- Resolves ${...} placeholders from client.properties -->
-	<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-		<property name="location"><value>client.properties</value></property>
-	</bean>
-
-	<!-- Proxy for the RMI-exported ContactManager -->
-	<!-- COMMENTED OUT BY DEFAULT TO AVOID CONFLICTS WITH APPLICATION SERVERS
-	<bean id="rmiProxy" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
-		<property name="serviceInterface">
-			<value>sample.contact.ContactManager</value>
-		</property>
-		<property name="serviceUrl">
-			<value>rmi://${serverName}:${rmiPort}/contactManager</value>
-		</property>
-		<property name="remoteInvocationFactory">
-			<ref bean="remoteInvocationFactory"/>
-		</property>
-	</bean>
-
-	<bean id="remoteInvocationFactory" class="org.springframework.security.ui.rmi.ContextPropagatingRemoteInvocationFactory"/>
-	-->
-
-	<!-- Proxy for the HTTP-invoker-exported ContactManager -->
-	<!-- Spring's HTTP invoker uses Java serialization via HTTP	 -->
-	<bean id="httpInvokerProxy" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
-		<property name="serviceInterface">
-			<value>sample.contact.ContactManager</value>
-		</property>
-		<property name="serviceUrl">
-			<value>http://${serverName}:${httpPort}${contextPath}/remoting/ContactManager-httpinvoker</value>
-		</property>
-		<property name="httpInvokerRequestExecutor">
-			<ref bean="httpInvokerRequestExecutor"/>
-		</property>
-	</bean>
-
-	<!-- Automatically propagates ContextHolder-managed Authentication principal
-		 and credentials to a HTTP invoker BASIC authentication header -->
-	<bean id="httpInvokerRequestExecutor" class="org.springframework.security.core.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor"/>
-
-	<!-- Proxy for the Hessian-exported ContactManager
-	<bean id="hessianProxy" class="org.springframework.remoting.caucho.HessianProxyFactoryBean">
-		<property name="serviceInterface">
-			<value>sample.contact.ContactManager</value>
-		</property>
-		<property name="serviceUrl">
-			<value>http://${serverName}:${httpPort}${contextPath}/remoting/ContactManager-hessian</value>
-		</property>
-	</bean>
-	-->
-
-	<!-- Proxy for the Burlap-exported ContactManager
-	<bean id="burlapProxy" class="org.springframework.remoting.caucho.BurlapProxyFactoryBean">
-		<property name="serviceInterface">
-			<value>sample.contact.ContactManager</value>
-		</property>
-		<property name="serviceUrl">
-			<value>http://${serverName}:${httpPort}${contextPath}/remoting/ContactManager-burlap</value>
-		</property>
-	</bean>
-	-->
-
-</beans>

+ 0 - 49
servlet/xml/java/contacts/src/main/webapp/WEB-INF/remoting-servlet.xml

@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "https://www.springframework.org/dtd/spring-beans.dtd">
-
-<!--
-  - Contacts web application
-  -->
-<beans>
-
-	<!-- RMI exporter for the ContactManager -->
-	<!-- This could just as easily have been in
-		 applicationContext-common-business.xml, because it doesn't rely on
-		 DispatcherServlet or indeed any other HTTP services. It's in this
-		 application context simply for logical placement with other
-		 remoting exporters. -->
-	<!-- COMMENTED OUT BY DEFAULT TO AVOID CONFLICTS WITH APPLICATION SERVERS
-	<bean id="contactManager-rmi" class="org.springframework.remoting.rmi.RmiServiceExporter">
-		<property name="service"><ref bean="contactManager"/></property>
-		<property name="serviceInterface">
-			<value>sample.contact.ContactManager</value>
-		</property>
-		<property name="serviceName"><value>contactManager</value></property>
-		<property name="registryPort"><value>1099</value></property>
-	</bean>
-	-->
-
-	<!-- HTTP invoker exporter for the ContactManager -->
-	<!-- Spring's HTTP invoker uses Java serialization via HTTP  -->
-	<bean name="/ContactManager-httpinvoker" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
-		<property name="service" ref="contactManager"/>
-		<property name="serviceInterface" value="sample.contact.ContactManager"/>
-	</bean>
-
-	<!-- Hessian exporter for the ContactManager -->
-	<!-- Hessian is a slim binary HTTP remoting protocol -->
-<!--
-	<bean name="/ContactManager-hessian" class="org.springframework.remoting.caucho.HessianServiceExporter">
-		<property name="service" ref="contactManager"/>
-		<property name="serviceInterface" value="sample.contact.ContactManager"/>
-	</bean>
--->
-	<!-- Burlap exporter for the ContactManager -->
-	<!-- Burlap is a slim XML-based HTTP remoting protocol -->
-<!--
-	<bean name="/ContactManager-burlap" class="org.springframework.remoting.caucho.BurlapServiceExporter">
-		<property name="service" ref="contactManager"/>
-		<property name="serviceInterface" value="sample.contact.ContactManager"/>
-	</bean>
--->
-</beans>

+ 0 - 10
servlet/xml/java/contacts/src/main/webapp/WEB-INF/web.xml

@@ -71,22 +71,12 @@
   <!--
 	- Provides web services endpoint. See remoting-servlet.xml.
 	-->
-	<servlet>
-		<servlet-name>remoting</servlet-name>
-		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
-		<load-on-startup>2</load-on-startup>
-	</servlet>
 
 	<servlet-mapping>
 		<servlet-name>contacts</servlet-name>
 		<url-pattern>*.htm</url-pattern>
 	 </servlet-mapping>
 
-	<servlet-mapping>
-		<servlet-name>remoting</servlet-name>
-		<url-pattern>/remoting/*</url-pattern>
-	</servlet-mapping>
-
 	 <welcome-file-list>
 		<welcome-file>index.jsp</welcome-file>
 	</welcome-file-list>