clientContext.xml 2.8 KB

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