clientContext.xml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. -->
  27. <!-- Automatically propagates ContextHolder contents when using the RMI proxy -->
  28. <bean id="remoteInvocationFactory" class="net.sf.acegisecurity.ui.rmi.ContextPropagatingRemoteInvocationFactory"/>
  29. <!-- Proxy for the HTTP-invoker-exported ContactManager -->
  30. <!-- Spring's HTTP invoker uses Java serialization via HTTP -->
  31. <bean id="httpInvokerProxy" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
  32. <property name="serviceInterface">
  33. <value>sample.contact.ContactManager</value>
  34. </property>
  35. <property name="serviceUrl">
  36. <value>http://${serverName}:${httpPort}${contextPath}/remoting/ContactManager-httpinvoker</value>
  37. </property>
  38. <property name="httpInvokerRequestExecutor">
  39. <ref local="httpInvokerRequestExecutor"/>
  40. </property>
  41. </bean>
  42. <!-- Automatically propagates ContextHolder-managed Authentication principal
  43. and credentials to a HTTP invoker BASIC authentication header -->
  44. <bean id="httpInvokerRequestExecutor" class="net.sf.acegisecurity.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor"/>
  45. <!-- Proxy for the Hessian-exported ContactManager -->
  46. <!-- Hessian is a slim binary HTTP remoting protocol -->
  47. <bean id="hessianProxy" class="org.springframework.remoting.caucho.HessianProxyFactoryBean">
  48. <property name="serviceInterface">
  49. <value>sample.contact.ContactManager</value>
  50. </property>
  51. <property name="serviceUrl">
  52. <value>http://${serverName}:${httpPort}${contextPath}/remoting/ContactManager-hessian</value>
  53. </property>
  54. </bean>
  55. <!-- Proxy for the Burlap-exported ContactManager -->
  56. <!-- Burlap is a slim XML-based HTTP remoting protocol -->
  57. <bean id="burlapProxy" class="org.springframework.remoting.caucho.BurlapProxyFactoryBean">
  58. <property name="serviceInterface">
  59. <value>sample.contact.ContactManager</value>
  60. </property>
  61. <property name="serviceUrl">
  62. <value>http://${serverName}:${httpPort}${contextPath}/remoting/ContactManager-burlap</value>
  63. </property>
  64. </bean>
  65. </beans>