clientContext.xml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "https://www.springframework.org/dtd/spring-beans.dtd">
  3. <!--
  4. - Contacts web application
  5. - Client application context
  6. -->
  7. <beans>
  8. <!-- Resolves ${...} placeholders from client.properties -->
  9. <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  10. <property name="location"><value>client.properties</value></property>
  11. </bean>
  12. <!-- Proxy for the RMI-exported ContactManager -->
  13. <!-- COMMENTED OUT BY DEFAULT TO AVOID CONFLICTS WITH APPLICATION SERVERS
  14. <bean id="rmiProxy" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
  15. <property name="serviceInterface">
  16. <value>sample.contact.ContactManager</value>
  17. </property>
  18. <property name="serviceUrl">
  19. <value>rmi://${serverName}:${rmiPort}/contactManager</value>
  20. </property>
  21. <property name="remoteInvocationFactory">
  22. <ref bean="remoteInvocationFactory"/>
  23. </property>
  24. </bean>
  25. <bean id="remoteInvocationFactory" class="org.springframework.security.ui.rmi.ContextPropagatingRemoteInvocationFactory"/>
  26. -->
  27. <!-- Proxy for the HTTP-invoker-exported ContactManager -->
  28. <!-- Spring's HTTP invoker uses Java serialization via HTTP -->
  29. <bean id="httpInvokerProxy" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
  30. <property name="serviceInterface">
  31. <value>sample.contact.ContactManager</value>
  32. </property>
  33. <property name="serviceUrl">
  34. <value>http://${serverName}:${httpPort}${contextPath}/remoting/ContactManager-httpinvoker</value>
  35. </property>
  36. <property name="httpInvokerRequestExecutor">
  37. <ref bean="httpInvokerRequestExecutor"/>
  38. </property>
  39. </bean>
  40. <!-- Automatically propagates ContextHolder-managed Authentication principal
  41. and credentials to a HTTP invoker BASIC authentication header -->
  42. <bean id="httpInvokerRequestExecutor" class="org.springframework.security.core.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor"/>
  43. <!-- Proxy for the Hessian-exported ContactManager
  44. <bean id="hessianProxy" class="org.springframework.remoting.caucho.HessianProxyFactoryBean">
  45. <property name="serviceInterface">
  46. <value>sample.contact.ContactManager</value>
  47. </property>
  48. <property name="serviceUrl">
  49. <value>http://${serverName}:${httpPort}${contextPath}/remoting/ContactManager-hessian</value>
  50. </property>
  51. </bean>
  52. -->
  53. <!-- Proxy for the Burlap-exported ContactManager
  54. <bean id="burlapProxy" class="org.springframework.remoting.caucho.BurlapProxyFactoryBean">
  55. <property name="serviceInterface">
  56. <value>sample.contact.ContactManager</value>
  57. </property>
  58. <property name="serviceUrl">
  59. <value>http://${serverName}:${httpPort}${contextPath}/remoting/ContactManager-burlap</value>
  60. </property>
  61. </bean>
  62. -->
  63. </beans>