Skip to content
This repository
Browse code

requested ported commit

  • Loading branch information...
commit dd9e89c42426f2fd74b62bf4a91c94143e5300ee 0 parents
Jean-Frederic Clere jfclere authored

Showing 239 changed files with 29,122 additions and 0 deletions. Show diff stats Hide diff stats

  1. +22 0 .classpath
  2. +17 0 .project
  3. +104 0 JBossORG-EULA.txt
  4. +33 0 README.txt
  5. +91 0 build-demo.xml
  6. +51 0 build-jbossweb.xml
  7. +443 0 build-test.xml
  8. +10 0 docs/README
  9. +165 0 lgpl.txt
  10. +84 0 local.properties
  11. 0  native/advertise/.deps
  12. +23 0 native/advertise/Makefile.in
  13. +17 0 native/advertise/README
  14. +12 0 native/advertise/buildconf
  15. +24 0 native/advertise/configure.in
  16. +692 0 native/advertise/mod_advertise.c
  17. +146 0 native/advertise/mod_advertise.h
  18. +154 0 native/include/balancer.h
  19. +156 0 native/include/context.h
  20. +149 0 native/include/host.h
  21. +48 0 native/include/mod_clustersize.h
  22. +48 0 native/include/mod_proxy_cluster.h
  23. +217 0 native/include/node.h
  24. +163 0 native/include/slotmem.h
  25. 0  native/mod_manager/.deps
  26. +23 0 native/mod_manager/Makefile.in
  27. +228 0 native/mod_manager/balancer.c
  28. +12 0 native/mod_manager/buildconf
  29. +24 0 native/mod_manager/configure.in
  30. +229 0 native/mod_manager/context.c
  31. +226 0 native/mod_manager/host.c
  32. +1,527 0 native/mod_manager/mod_manager.c
  33. +281 0 native/mod_manager/node.c
  34. 0  native/mod_proxy_cluster/.deps
  35. +34 0 native/mod_proxy_cluster/Makefile.in
  36. +11 0 native/mod_proxy_cluster/buildconf
  37. +28 0 native/mod_proxy_cluster/config.m4.patch
  38. +24 0 native/mod_proxy_cluster/configure.in
  39. +49 0 native/mod_proxy_cluster/mod_proxy_ajp.patch
  40. +1,865 0 native/mod_proxy_cluster/mod_proxy_cluster.c
  41. 0  native/mod_slotmem/.deps
  42. +23 0 native/mod_slotmem/Makefile.in
  43. +12 0 native/mod_slotmem/buildconf
  44. +24 0 native/mod_slotmem/configure.in
  45. +108 0 native/mod_slotmem/mod_sharedmem.c
  46. +549 0 native/mod_slotmem/sharedmem_util.c
  47. +20 0 native/mod_slotmem/sharedmem_util.h
  48. +403 0 pom.xml
  49. +30 0 src/assembly/bin.xml
  50. +18 0 src/assembly/sar.xml
  51. +31 0 src/demo/java/org/jboss/modcluster/demo/Constants.java
  52. +146 0 src/demo/java/org/jboss/modcluster/demo/client/ChartManager.java
  53. +1,013 0 src/demo/java/org/jboss/modcluster/demo/client/ModClusterDemo.java
  54. +436 0 src/demo/java/org/jboss/modcluster/demo/client/RequestDriver.java
  55. +69 0 src/demo/java/org/jboss/modcluster/demo/client/load/ServerLoadParam.java
  56. +148 0 src/demo/java/org/jboss/modcluster/demo/client/load/ServerLoadServlets.java
  57. +70 0 src/demo/java/org/jboss/modcluster/demo/servlet/ActiveSessionsLoadServlet.java
  58. +112 0 src/demo/java/org/jboss/modcluster/demo/servlet/BusyConnectorsLoadServlet.java
  59. +108 0 src/demo/java/org/jboss/modcluster/demo/servlet/ConnectionPoolLoadServlet.java
  60. +78 0 src/demo/java/org/jboss/modcluster/demo/servlet/HeapMemoryLoadServlet.java
  61. +137 0 src/demo/java/org/jboss/modcluster/demo/servlet/LoadServlet.java
  62. +83 0 src/demo/java/org/jboss/modcluster/demo/servlet/ReceiveTrafficLoadServlet.java
  63. +98 0 src/demo/java/org/jboss/modcluster/demo/servlet/RecordServlet.java
  64. +57 0 src/demo/java/org/jboss/modcluster/demo/servlet/RequestCountLoadServlet.java
  65. +95 0 src/demo/java/org/jboss/modcluster/demo/servlet/SendTrafficLoadServlet.java
  66. +67 0 src/demo/java/org/jboss/modcluster/demo/servlet/SystemLoadServlet.java
  67. +72 0 src/demo/java/org/jboss/modcluster/demo/servlet/ThreadCountLoadServlet.java
  68. +12 0 src/demo/resources/run-demo.bat
  69. +16 0 src/demo/resources/run-demo.sh
  70. +142 0 src/demo/resources/web.xml
  71. +211 0 src/main/java/org/jboss/modcluster/BasicClusterListener.java
  72. +256 0 src/main/java/org/jboss/modcluster/ClusterListener.java
  73. +27 0 src/main/java/org/jboss/modcluster/Constants.java
  74. +312 0 src/main/java/org/jboss/modcluster/DefaultJBossWebEventHandler.java
  75. +51 0 src/main/java/org/jboss/modcluster/JBossWebEventHandler.java
  76. +40 0 src/main/java/org/jboss/modcluster/LocalStrings.properties
  77. +925 0 src/main/java/org/jboss/modcluster/ModClusterService.java
  78. +82 0 src/main/java/org/jboss/modcluster/ModClusterServiceMBean.java
  79. +220 0 src/main/java/org/jboss/modcluster/Utils.java
  80. +58 0 src/main/java/org/jboss/modcluster/advertise/AdvertiseListener.java
  81. +34 0 src/main/java/org/jboss/modcluster/advertise/AdvertiseListenerFactory.java
  82. +36 0 src/main/java/org/jboss/modcluster/advertise/MulticastSocketFactory.java
  83. +63 0 src/main/java/org/jboss/modcluster/advertise/impl/AdvertiseEventType.java
  84. +43 0 src/main/java/org/jboss/modcluster/advertise/impl/AdvertiseListenerFactoryImpl.java
  85. +549 0 src/main/java/org/jboss/modcluster/advertise/impl/AdvertiseListenerImpl.java
  86. +123 0 src/main/java/org/jboss/modcluster/advertise/impl/AdvertisedServer.java
  87. +115 0 src/main/java/org/jboss/modcluster/advertise/impl/MulticastSocketFactoryImpl.java
  88. +40 0 src/main/java/org/jboss/modcluster/config/BalancerConfiguration.java
  89. +50 0 src/main/java/org/jboss/modcluster/config/MCMPHandlerConfiguration.java
  90. +341 0 src/main/java/org/jboss/modcluster/config/ModClusterConfig.java
  91. +46 0 src/main/java/org/jboss/modcluster/config/NodeConfiguration.java
  92. +49 0 src/main/java/org/jboss/modcluster/config/SSLConfiguration.java
  93. +52 0 src/main/java/org/jboss/modcluster/ha/ClusteredMCMPHandler.java
  94. +582 0 src/main/java/org/jboss/modcluster/ha/ClusteredMCMPHandlerImpl.java
  95. +41 0 src/main/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSource.java
  96. +166 0 src/main/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSourceImpl.java
  97. +188 0 src/main/java/org/jboss/modcluster/ha/ModClusterServiceDRMEntry.java
  98. +50 0 src/main/java/org/jboss/modcluster/ha/rpc/BooleanGroupRpcResponse.java
  99. +49 0 src/main/java/org/jboss/modcluster/ha/rpc/ClusteredMCMPHandlerRpcHandler.java
  100. +52 0 src/main/java/org/jboss/modcluster/ha/rpc/GroupRpcResponse.java
  101. +53 0 src/main/java/org/jboss/modcluster/ha/rpc/GroupRpcResponseFilter.java
  102. +53 0 src/main/java/org/jboss/modcluster/ha/rpc/InetAddressGroupRpcResponse.java
  103. +51 0 src/main/java/org/jboss/modcluster/ha/rpc/IntegerGroupRpcResponse.java
  104. +94 0 src/main/java/org/jboss/modcluster/ha/rpc/MCMPServerDiscoveryEvent.java
  105. +41 0 src/main/java/org/jboss/modcluster/ha/rpc/ModClusterServiceRpcHandler.java
  106. +81 0 src/main/java/org/jboss/modcluster/ha/rpc/ModClusterServiceStateGroupRpcResponse.java
  107. +66 0 src/main/java/org/jboss/modcluster/ha/rpc/PeerMCMPDiscoveryStatus.java
  108. +54 0 src/main/java/org/jboss/modcluster/ha/rpc/ResetRequestGroupRpcResponse.java
  109. +37 0 src/main/java/org/jboss/modcluster/ha/rpc/ResetRequestSourceRpcHandler.java
  110. +51 0 src/main/java/org/jboss/modcluster/ha/rpc/StringGroupRpcResponse.java
  111. +60 0 src/main/java/org/jboss/modcluster/ha/rpc/ThrowableGroupRpcResponse.java
  112. +34 0 src/main/java/org/jboss/modcluster/load/LoadBalanceFactorProvider.java
  113. +218 0 src/main/java/org/jboss/modcluster/load/impl/DynamicLoadBalanceFactorProvider.java
  114. +53 0 src/main/java/org/jboss/modcluster/load/impl/DynamicLoadBalanceFactorProviderMBean.java
  115. +51 0 src/main/java/org/jboss/modcluster/load/impl/StaticLoadBalanceFactorProvider.java
  116. +31 0 src/main/java/org/jboss/modcluster/load/metric/LoadContext.java
  117. +52 0 src/main/java/org/jboss/modcluster/load/metric/LoadMetric.java
  118. +34 0 src/main/java/org/jboss/modcluster/load/metric/LoadMetricMBean.java
  119. +35 0 src/main/java/org/jboss/modcluster/load/metric/LoadMetricSource.java
  120. +78 0 src/main/java/org/jboss/modcluster/load/metric/impl/AbstractLoadMetric.java
  121. +51 0 src/main/java/org/jboss/modcluster/load/metric/impl/ActiveSessionsLoadMetric.java
  122. +74 0 src/main/java/org/jboss/modcluster/load/metric/impl/AverageSystemLoadMetric.java
  123. +52 0 src/main/java/org/jboss/modcluster/load/metric/impl/BusyConnectorsLoadMetric.java
  124. +84 0 src/main/java/org/jboss/modcluster/load/metric/impl/ConnectionPoolLoadMetricSource.java
  125. +52 0 src/main/java/org/jboss/modcluster/load/metric/impl/ConnectionPoolUsageLoadMetric.java
  126. +48 0 src/main/java/org/jboss/modcluster/load/metric/impl/DeterministicLoadState.java
  127. +60 0 src/main/java/org/jboss/modcluster/load/metric/impl/HeapMemoryUsageLoadMetric.java
  128. +60 0 src/main/java/org/jboss/modcluster/load/metric/impl/MBeanAttributeLoadMetric.java
  129. +73 0 src/main/java/org/jboss/modcluster/load/metric/impl/MBeanAttributeRatioLoadMetric.java
  130. +67 0 src/main/java/org/jboss/modcluster/load/metric/impl/MBeanLoadContext.java
  131. +58 0 src/main/java/org/jboss/modcluster/load/metric/impl/MBeanLoadMetricSource.java
  132. +79 0 src/main/java/org/jboss/modcluster/load/metric/impl/MBeanQueryLoadContext.java
  133. +62 0 src/main/java/org/jboss/modcluster/load/metric/impl/MBeanQueryLoadMetricSource.java
  134. +59 0 src/main/java/org/jboss/modcluster/load/metric/impl/OperatingSystemLoadMetricSource.java
  135. +63 0 src/main/java/org/jboss/modcluster/load/metric/impl/ReceiveTrafficLoadMetric.java
  136. +64 0 src/main/java/org/jboss/modcluster/load/metric/impl/RequestCountLoadMetric.java
  137. +86 0 src/main/java/org/jboss/modcluster/load/metric/impl/RequestProcessorLoadMetricSource.java
  138. +61 0 src/main/java/org/jboss/modcluster/load/metric/impl/SelfSourcedLoadMetric.java
  139. +65 0 src/main/java/org/jboss/modcluster/load/metric/impl/SendTrafficLoadMetric.java
  140. +86 0 src/main/java/org/jboss/modcluster/load/metric/impl/SessionLoadMetricSource.java
  141. +48 0 src/main/java/org/jboss/modcluster/load/metric/impl/SourcedLoadMetric.java
  142. +76 0 src/main/java/org/jboss/modcluster/load/metric/impl/SystemMemoryUsageLoadMetric.java
  143. +86 0 src/main/java/org/jboss/modcluster/load/metric/impl/ThreadPoolLoadMetricSource.java
  144. +138 0 src/main/java/org/jboss/modcluster/mbeans-descriptors.xml
  145. +80 0 src/main/java/org/jboss/modcluster/mcmp/AbstractMCMPHandler.java
  146. +81 0 src/main/java/org/jboss/modcluster/mcmp/AddressPort.java
  147. +191 0 src/main/java/org/jboss/modcluster/mcmp/MCMPHandler.java
  148. +91 0 src/main/java/org/jboss/modcluster/mcmp/MCMPRequest.java
  149. +66 0 src/main/java/org/jboss/modcluster/mcmp/MCMPRequestType.java
  150. +43 0 src/main/java/org/jboss/modcluster/mcmp/MCMPServer.java
  151. +41 0 src/main/java/org/jboss/modcluster/mcmp/MCMPServerState.java
  152. +42 0 src/main/java/org/jboss/modcluster/mcmp/MCMPURLEncoder.java
  153. +431 0 src/main/java/org/jboss/modcluster/mcmp/MCMPUtils.java
  154. +60 0 src/main/java/org/jboss/modcluster/mcmp/ResetRequestSource.java
  155. +1,330 0 src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPHandler.java
  156. +151 0 src/main/java/org/jboss/modcluster/mcmp/impl/JSSEKeyManager.java
  157. +454 0 src/main/java/org/jboss/modcluster/mcmp/impl/JSSESocketFactory.java
  158. +99 0 src/main/java/org/jboss/modcluster/mcmp/impl/MCMPJBURLEncoder.java
  159. +121 0 src/main/java/org/jboss/modcluster/mcmp/impl/MCMPTCURLEncoder.java
  160. +64 0 src/main/java/org/jboss/modcluster/mcmp/impl/ResetRequestSourceImpl.java
  161. +266 0 src/main/resources/mod-cluster-jboss-beans.xml
  162. +269 0 src/test/java/org/jboss/modcluster/BasicClusterListenerTestCase.java
  163. +250 0 src/test/java/org/jboss/modcluster/ClusterListenerTestCase.java
  164. +742 0 src/test/java/org/jboss/modcluster/DefaultJBossWebEventHandlerTestCase.java
  165. +920 0 src/test/java/org/jboss/modcluster/ModClusterServiceTestCase.java
  166. +146 0 src/test/java/org/jboss/modcluster/advertise/AdvertiseListenerImplTestCase.java
  167. +132 0 src/test/java/org/jboss/modcluster/advertise/MulticastSocketFactoryImplTestCase.java
  168. +778 0 src/test/java/org/jboss/modcluster/ha/ClusteredMCMPHandlerTestCase.java
  169. +285 0 src/test/java/org/jboss/modcluster/ha/HASingletonAwareResetRequestSourceTestCase.java
  170. +154 0 src/test/java/org/jboss/modcluster/load/DynamicLoadBalanceFactorProviderTestCase.java
  171. +49 0 src/test/java/org/jboss/modcluster/load/StaticLoadBalanceFactorProviderTestCase.java
  172. +38 0 src/test/java/org/jboss/modcluster/load/metric/ActiveSessionsLoadMetricTestCase.java
  173. +88 0 src/test/java/org/jboss/modcluster/load/metric/AverageSystemLoadMetricTestCase.java
  174. +38 0 src/test/java/org/jboss/modcluster/load/metric/BusyConnectorsLoadMetricTestCase.java
  175. +45 0 src/test/java/org/jboss/modcluster/load/metric/ConnectionPoolLoadMetricSourceTestCase.java
  176. +39 0 src/test/java/org/jboss/modcluster/load/metric/ConnectionPoolUsageLoadMetricTestCase.java
  177. +68 0 src/test/java/org/jboss/modcluster/load/metric/HeapMemoryUsageLoadMetricTestCase.java
  178. +103 0 src/test/java/org/jboss/modcluster/load/metric/MBeanAttributeLoadMetricTestCase.java
  179. +108 0 src/test/java/org/jboss/modcluster/load/metric/MBeanAttributeRatioLoadMetricTestCase.java
  180. +81 0 src/test/java/org/jboss/modcluster/load/metric/MBeanLoadContextTestCase.java
  181. +72 0 src/test/java/org/jboss/modcluster/load/metric/MBeanLoadMetricSourceTestCase.java
  182. +131 0 src/test/java/org/jboss/modcluster/load/metric/MBeanQueryLoadContextTestCase.java
  183. +85 0 src/test/java/org/jboss/modcluster/load/metric/MBeanQueryLoadMetricSourceTestCase.java
  184. +45 0 src/test/java/org/jboss/modcluster/load/metric/OperatingSystemLoadMetricSourceTestCase.java
  185. +87 0 src/test/java/org/jboss/modcluster/load/metric/ReceiveTrafficLoadMetricTestCase.java
  186. +88 0 src/test/java/org/jboss/modcluster/load/metric/RequestCountLoadMetricTestCase.java
  187. +45 0 src/test/java/org/jboss/modcluster/load/metric/RequestProcessorLoadMetricSourceTestCase.java
  188. +87 0 src/test/java/org/jboss/modcluster/load/metric/SendTrafficLoadMetricTestCase.java
  189. +45 0 src/test/java/org/jboss/modcluster/load/metric/SessionLoadMetricSourceTestCase.java
  190. +89 0 src/test/java/org/jboss/modcluster/load/metric/SystemMemoryUsageLoadMetricTestCase.java
  191. +45 0 src/test/java/org/jboss/modcluster/load/metric/ThreadPoolLoadMetricSourceTestCase.java
  192. +990 0 src/test/resources/test-configs/mod-cluster-httpd/conf/mod-cluster-httpd.conf
  193. +32 0 src/test/resources/test-configs/mod-cluster-jbossas/deploy/jbossweb.sar/META-INF/jboss-beans.xml
Sorry, we could not display the entire diff because it was too big.
22 .classpath
... ... @@ -0,0 +1,22 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<classpath>
  3 + <classpathentry kind="src" path="src/main/java"/>
  4 + <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
  5 + <classpathentry kind="src" output="target/demo/classes" path="src/demo/java"/>
  6 + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
  7 + <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-api/1.1.0.GA/jboss-ha-server-api-1.1.0.GA.jar"/>
  8 + <classpathentry kind="var" path="M2_REPO/jboss/web/jbossweb/2.1.1.CR6/jbossweb-2.1.1.CR6.jar"/>
  9 + <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar"/>
  10 + <classpathentry kind="var" path="M2_REPO/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar"/>
  11 + <classpathentry kind="var" path="M2_REPO/org/easymock/easymock/2.4/easymock-2.4.jar"/>
  12 + <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.0.Beta17/jboss-kernel-2.0.0.Beta17.jar"/>
  13 + <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
  14 + <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar"/>
  15 + <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar"/>
  16 + <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar"/>
  17 + <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar"/>
  18 + <classpathentry kind="var" path="M2_REPO/org/jboss/naming/jnp-client/5.0.0.CR2/jnp-client-5.0.0.CR2.jar" sourcepath="M2_REPO/org/jboss/naming/jnp-client/5.0.0.CR2/jnp-client-5.0.0.CR2-sources.jar"/>
  19 + <classpathentry kind="var" path="M2_REPO/jfree/jcommon/1.0.12/jcommon-1.0.12.jar"/>
  20 + <classpathentry kind="var" path="M2_REPO/jfree/jfreechart/1.0.9/jfreechart-1.0.9.jar"/>
  21 + <classpathentry kind="output" path="target/classes"/>
  22 +</classpath>
17 .project
... ... @@ -0,0 +1,17 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<projectDescription>
  3 + <name>mod_cluster</name>
  4 + <comment></comment>
  5 + <projects>
  6 + </projects>
  7 + <buildSpec>
  8 + <buildCommand>
  9 + <name>org.eclipse.jdt.core.javabuilder</name>
  10 + <arguments>
  11 + </arguments>
  12 + </buildCommand>
  13 + </buildSpec>
  14 + <natures>
  15 + <nature>org.eclipse.jdt.core.javanature</nature>
  16 + </natures>
  17 +</projectDescription>
104 JBossORG-EULA.txt
... ... @@ -0,0 +1,104 @@
  1 +LICENSE AGREEMENT
  2 +JBOSS(r)
  3 +
  4 +This License Agreement governs the use of the Software Packages and any updates to the Software
  5 +Packages, regardless of the delivery mechanism. Each Software Package is a collective work
  6 +under U.S. Copyright Law. Subject to the following terms, Red Hat, Inc. ("Red Hat") grants to
  7 +the user ("Client") a license to the applicable collective work(s) pursuant to the
  8 +GNU Lesser General Public License v. 2.1 except for the following Software Packages:
  9 +(a) JBoss Portal Forums and JBoss Transactions JTS, each of which is licensed pursuant to the
  10 +GNU General Public License v.2;
  11 +
  12 +(b) JBoss Rules, which is licensed pursuant to the Apache License v.2.0;
  13 +
  14 +(c) an optional download for JBoss Cache for the Berkeley DB for Java database, which is licensed under the
  15 +(open source) Sleepycat License (if Client does not wish to use the open source version of this database,
  16 +it may purchase a license from Sleepycat Software);
  17 +
  18 +and (d) the BPEL extension for JBoss jBPM, which is licensed under the Common Public License v.1,
  19 +and, pursuant to the OASIS BPEL4WS standard, requires parties wishing to redistribute to enter various
  20 +royalty-free patent licenses.
  21 +
  22 +Each of the foregoing licenses is available at http://www.opensource.org/licenses/index.php.
  23 +
  24 +1. The Software. "Software Packages" refer to the various software modules that are created and made available
  25 +for distribution by the JBoss.org open source community at http://www.jboss.org. Each of the Software Packages
  26 +may be comprised of hundreds of software components. The end user license agreement for each component is located in
  27 +the component's source code. With the exception of certain image files identified in Section 2 below,
  28 +the license terms for the components permit Client to copy, modify, and redistribute the component,
  29 +in both source code and binary code forms. This agreement does not limit Client's rights under,
  30 +or grant Client rights that supersede, the license terms of any particular component.
  31 +
  32 +2. Intellectual Property Rights. The Software Packages are owned by Red Hat and others and are protected under copyright
  33 +and other laws. Title to the Software Packages and any component, or to any copy, modification, or merged portion shall
  34 +remain with the aforementioned, subject to the applicable license. The "JBoss" trademark, "Red Hat" trademark, the
  35 +individual Software Package trademarks, and the "Shadowman" logo are registered trademarks of Red Hat and its affiliates
  36 +in the U.S. and other countries. This agreement permits Client to distribute unmodified copies of the Software Packages
  37 +using the Red Hat trademarks that Red Hat has inserted in the Software Packages on the condition that Client follows Red Hat's
  38 +trademark guidelines for those trademarks located at http://www.redhat.com/about/corporate/trademark/. Client must abide by
  39 +these trademark guidelines when distributing the Software Packages, regardless of whether the Software Packages have been modified.
  40 +If Client modifies the Software Packages, then Client must replace all Red Hat trademarks and logos identified at
  41 +http://www.jboss.com/company/logos unless a separate agreement with Red Hat is executed or other permission granted.
  42 +Merely deleting the files containing the Red Hat trademarks may corrupt the Software Packages.
  43 +
  44 +3. Limited Warranty. Except as specifically stated in this Paragraph 3 or a license for a particular
  45 +component, to the maximum extent permitted under applicable law, the Software Packages and the
  46 +components are provided and licensed "as is" without warranty of any kind, expressed or implied,
  47 +including the implied warranties of merchantability, non-infringement or fitness for a particular purpose.
  48 +Red Hat warrants that the media on which Software Packages may be furnished will be free from defects in
  49 +materials and manufacture under normal use for a period of 30 days from the date of delivery to Client.
  50 +Red Hat does not warrant that the functions contained in the Software Packages will meet Client's requirements
  51 +or that the operation of the Software Packages will be entirely error free or appear precisely as described
  52 +in the accompanying documentation. This warranty extends only to the party that purchases the Services
  53 +pertaining to the Software Packages from Red Hat or a Red Hat authorized distributor.
  54 +
  55 +4. Limitation of Remedies and Liability. To the maximum extent permitted by applicable law, the remedies
  56 +described below are accepted by Client as its only remedies. Red Hat's entire liability, and Client's
  57 +exclusive remedies, shall be: If the Software media is defective, Client may return it within 30 days of
  58 +delivery along with a copy of Client's payment receipt and Red Hat, at its option, will replace it or
  59 +refund the money paid by Client for the Software. To the maximum extent permitted by applicable law,
  60 +Red Hat or any Red Hat authorized dealer will not be liable to Client for any incidental or consequential
  61 +damages, including lost profits or lost savings arising out of the use or inability to use the Software,
  62 +even if Red Hat or such dealer has been advised of the possibility of such damages. In no event shall
  63 +Red Hat's liability under this agreement exceed the amount that Client paid to Red Hat under this
  64 +Agreement during the twelve months preceding the action.
  65 +
  66 +5. Export Control. As required by U.S. law, Client represents and warrants that it:
  67 +(a) understands that the Software Packages are subject to export controls under the
  68 +U.S. Commerce Department's Export Administration Regulations ("EAR");
  69 +
  70 +(b) is not located in a prohibited destination country under the EAR or U.S. sanctions regulations
  71 +(currently Cuba, Iran, Iraq, Libya, North Korea, Sudan and Syria);
  72 +
  73 +(c) will not export, re-export, or transfer the Software Packages to any prohibited destination, entity,
  74 +or individual without the necessary export license(s) or authorizations(s) from the U.S. Government;
  75 +
  76 +(d) will not use or transfer the Software Packages for use in any sensitive nuclear, chemical or
  77 +biological weapons, or missile technology end-uses unless authorized by the U.S. Government by
  78 +regulation or specific license;
  79 +
  80 +(e) understands and agrees that if it is in the United States and exports or transfers the Software
  81 +Packages to eligible end users, it will, as required by EAR Section 740.17(e), submit semi-annual
  82 +reports to the Commerce Department's Bureau of Industry & Security (BIS), which include the name and
  83 +address (including country) of each transferee;
  84 +
  85 +and (f) understands that countries other than the United States may restrict the import, use, or
  86 +export of encryption products and that it shall be solely responsible for compliance with any such
  87 +import, use, or export restrictions.
  88 +
  89 +6. Third Party Programs. Red Hat may distribute third party software programs with the Software Packages
  90 +that are not part of the Software Packages and which Client must install separately. These third party
  91 +programs are subject to their own license terms. The license terms either accompany the programs or
  92 +can be viewed at http://www.redhat.com/licenses/. If Client does not agree to abide by the applicable
  93 +license terms for such programs, then Client may not install them. If Client wishes to install the programs
  94 +on more than one system or transfer the programs to another party, then Client must contact the licensor
  95 +of the programs.
  96 +
  97 +7. General. If any provision of this agreement is held to be unenforceable, that shall not affect the
  98 +enforceability of the remaining provisions. This License Agreement shall be governed by the laws of the
  99 +State of North Carolina and of the United States, without regard to any conflict of laws provisions,
  100 +except that the United Nations Convention on the International Sale of Goods shall not apply.
  101 +
  102 +Copyright 2006-2007 Red Hat, Inc. All rights reserved.
  103 +"JBoss" and the JBoss logo are registered trademarks of Red Hat, Inc.
  104 +All other trademarks are the property of their respective owners.
33 README.txt
... ... @@ -0,0 +1,33 @@
  1 +mod-cluster
  2 +===========
  3 +
  4 +Instructions
  5 +------------
  6 +
  7 +JBoss AS
  8 +
  9 +1. Copy the exploded sar "mod-cluster.sar" directory into the deploy directory
  10 + of a JBoss server profile.
  11 +2. Modify the server.xml within jbossweb.sar and add a clustered mode engine
  12 + listener as documented here:
  13 + http://www.jboss.org/mod_cluster/java/config.html
  14 +
  15 +
  16 +JBoss Web
  17 +
  18 +1. Copy the jar file contained in the mod-cluster.sar directory into the lib
  19 + directory of your JBoss Web installation.
  20 +2. Copy the following dependency jars into the same lib directory:
  21 +
  22 +3. Modify the server.xml within the conf directory and add a non-cluster mode
  23 + engine listener as documented here:
  24 + http://www.jboss.org/mod_cluster/java/config.html
  25 +
  26 +
  27 +Additional notes for Tomcat
  28 +
  29 +1.
  30 +
  31 +
  32 +This software is distributed under the terms of the FSF Lesser Gnu
  33 +Public License (see lgpl.txt).
91 build-demo.xml
... ... @@ -0,0 +1,91 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!--======================================================================-->
  3 +<!-- -->
  4 +<!-- JBoss, the OpenSource J2EE webOS -->
  5 +<!-- -->
  6 +<!-- Distributable under LGPL license. -->
  7 +<!-- See terms of license at http://www.gnu.org. -->
  8 +<!-- -->
  9 +<!--======================================================================-->
  10 +<project default="main" name="JBoss/mod_cluster Demo" xmlns:server="http://jboss.org/ns/test/ant/server">
  11 +
  12 + <property environment="env"></property>
  13 +
  14 + <!-- TODO: consolidate common properties with build-test.xml -->
  15 + <property name="module.output" location="${basedir}/target"/>
  16 + <property name="module.src" location="${basedir}/src"/>
  17 +
  18 + <property name="demo.src" location="${module.src}/demo"/>
  19 + <property name="demo.src.java" location="${demo.src}/java"/>
  20 + <property name="demo.src.resources" location="${demo.src}/resources"/>
  21 + <property name="demo.output" location="${module.output}/demo"/>
  22 + <property name="demo.output.classes" location="${demo.output}/classes"/>
  23 + <property name="demo.output.client" location="${demo.output}/client"/>
  24 + <property name="demo.output.server" location="${demo.output}/server"/>
  25 + <property name="demo.client.jar" value="mod-cluster-demo.jar"></property>
  26 + <property name="demo.server.war" value="load-demo.war"></property>
  27 + <property name="demo.dependencies.lib" location="${module.output}/dependencies/lib"></property>
  28 +
  29 + <path id="demo">
  30 + <fileset dir="${demo.dependencies.lib}" includes="*.jar"/>
  31 + </path>
  32 +
  33 + <target name="main" depends="init, compile-demo">
  34 + <jar destfile="${demo.output.client}/lib/${demo.client.jar}">
  35 + <fileset dir="${demo.output.classes}" excludes="**/server/**"></fileset>
  36 + <manifest>
  37 + <attribute name="Main-Class" value="org.jboss.modcluster.demo.client.ModClusterDemo"/>
  38 + </manifest>
  39 + </jar>
  40 + <copy todir="${demo.output.client}">
  41 + <fileset dir="${demo.src.resources}">
  42 + <include name="run-demo.sh"/>
  43 + <include name="run-demo.bat"/>
  44 + </fileset>
  45 + </copy>
  46 + <copy todir="${demo.output.client}/lib">
  47 + <fileset dir="${demo.dependencies.lib}">
  48 + <include name="jcommon.jar"/>
  49 + <include name="jfreechart.jar"/>
  50 + </fileset>
  51 + </copy>
  52 + <war destfile="${demo.output.server}/${demo.server.war}" webxml="${demo.src.resources}/web.xml">
  53 + <classes dir="${demo.output.classes}" excludes="**/client/**"></classes>
  54 + <lib dir="${demo.dependencies.lib}">
  55 + <include name="commons-httpclient.jar"/>
  56 + <include name="commons-codec.jar"/>
  57 + </lib>
  58 + </war>
  59 +
  60 + <fixcrlf srcdir="${demo.output.client}"
  61 + eol="lf" eof="remove"
  62 + includes="**/*.sh"/>
  63 +
  64 + <fixcrlf srcdir="${demo.output.client}"
  65 + eol="crlf" eof="remove"
  66 + includes="**/*.bat, **/*.cmd"/>
  67 +
  68 + <chmod perm="+x">
  69 + <fileset dir="${demo.output.client}">
  70 + <include name="**/*.sh"/>
  71 + </fileset>
  72 + </chmod>
  73 + </target>
  74 +
  75 + <target name="init">
  76 + <mkdir dir="${demo.output}"/>
  77 + <mkdir dir="${demo.output.classes}"></mkdir>
  78 + <mkdir dir="${demo.output.client}"/>
  79 + <mkdir dir="${demo.output.client}/lib"/>
  80 + <mkdir dir="${demo.output.server}"/>
  81 + </target>
  82 +
  83 + <target name="compile-demo">
  84 + <!-- Why doesn't this work without fork? -->
  85 + <javac destdir="${demo.output.classes}" srcdir="${demo.src.java}" classpathref="demo" fork="true"></javac>
  86 + </target>
  87 +
  88 + <target name="run-demo" depends="main">
  89 + <java jar="${demo.output.client}/${demo.client.jar}" classpathref="demo" fork="true"></java>
  90 + </target>
  91 +</project>
51 build-jbossweb.xml
... ... @@ -0,0 +1,51 @@
  1 +<?xml version="1.0"?>
  2 +<!--
  3 + * Copyright(c) 2008 Red Hat Middleware, LLC,
  4 + * and individual contributors as indicated by the @authors tag.
  5 + * See the copyright.txt in the distribution for a
  6 + * full listing of individual contributors.
  7 + *
  8 + * This library is free software; you can redistribute it and/or
  9 + * modify it under the terms of the GNU Lesser General Public
  10 + * License as published by the Free Software Foundation; either
  11 + * version 2 of the License, or (at your option) any later version.
  12 + *
  13 + * This library is distributed in the hope that it will be useful,
  14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16 + * Lesser General Public License for more details.
  17 + *
  18 + * You should have received a copy of the GNU Lesser General Public
  19 + * License along with this library in the file COPYING.LIB;
  20 + * if not, write to the Free Software Foundation, Inc.,
  21 + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  22 + *
  23 + * @author Brian Stansberry
  24 + * @version $Revision$
  25 +-->
  26 +<project name="jbossweb" default="all" basedir=".">
  27 +
  28 + <!-- See "build.properties.sample" in the top level directory for all -->
  29 + <!-- property values you must customize for successful building!!! -->
  30 + <property file="${user.home}/build.properties"/>
  31 + <property file="build.properties"/>
  32 +
  33 + <property file="build.properties.default"/>
  34 +
  35 + <property name="target.dir" value="${basedir}/target"/>
  36 + <property name="out.dir" value="${target.dir}/JBossWeb-Tomcat/"/>
  37 + <property name="out.lib" value="${out.dir}/lib"/>
  38 + <property name="dependencies.dir" value="${target.dir}/dependencies/lib/"/>
  39 +
  40 +
  41 + <target name="all">
  42 + <mkdir dir="${out.lib}"/>
  43 + <copy todir="${out.lib}">
  44 + <fileset dir="${dependencies.dir}">
  45 + <include name="jboss-logging-spi.jar"/>
  46 + <include name="jboss-logging-jdk.jar"/>
  47 + </fileset>
  48 + </copy>
  49 + <copy tofile="${out.lib}/mod-cluster.jar" file="${target.dir}/${mod-cluster.jar.name}.jar"/>
  50 + </target>
  51 +</project>
443 build-test.xml
... ... @@ -0,0 +1,443 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!--======================================================================-->
  3 +<!-- -->
  4 +<!-- JBoss, the OpenSource J2EE webOS -->
  5 +<!-- -->
  6 +<!-- Distributable under LGPL license. -->
  7 +<!-- See terms of license at http://www.gnu.org. -->
  8 +<!-- -->
  9 +<!--======================================================================-->
  10 +<project default="main" name="JBoss/mod_cluster Tests" xmlns:server="http://jboss.org/ns/test/ant/server">
  11 +
  12 + <!-- ======================================================== -->
  13 + <!-- Initialization -->
  14 + <!-- ======================================================== -->
  15 + <tstamp>
  16 + <format property="TIMENOW" pattern="yyyy-MM-dd.HH-mm" timezone="GMT" />
  17 + </tstamp>
  18 + <echo message="${TIMENOW}" file="run.tstamp" />
  19 +
  20 + <!-- =================== -->
  21 + <!-- Basic Configuration -->
  22 + <!-- =================== -->
  23 +
  24 + <property name="results_web" value="http://jboss.sourceforge.net/junit-results/32" />
  25 + <property name="buildlog.level" value="info" />
  26 + <property environment="env" />
  27 +
  28 + <!--
  29 + Set a hostname property based on COMPUTERNAME for win32, HOSTNAME
  30 + otherwise and initialize the node0/node1 cluster hostnames to
  31 + localhost and ${hostname} by default. If you cannot route multicast
  32 + traffic between localhost and hostname, then you need to specify node0
  33 + and node1 binding in the local.properties that can in order to be able
  34 + to run the clustering tests.
  35 + -->
  36 + <condition property="hostname" value="${env.COMPUTERNAME}">
  37 + <os family="windows" />
  38 + </condition>
  39 + <condition property="hostname" value="${env.HOSTNAME}">
  40 + <not>
  41 + <os family="windows" />
  42 + </not>
  43 + </condition>
  44 +
  45 + <!--
  46 + We will use local.properties file to provide some configuration to the
  47 + testsuite mainly for the Clustering framework. Please do not checkin
  48 + your local.properties file into CVS
  49 + -->
  50 + <property file="local.properties" />
  51 +
  52 + <!-- Cluster node defaults -->
  53 + <property name="node0" value="localhost" />
  54 + <property name="node0.http.url" value="http://${node0}:8080" />
  55 + <property name="node0.jndi.url" value="jnp://${node0}:1099" />
  56 + <property name="node0.jndi.port1.url" value="jnp://${node0}:1199" />
  57 + <property name="node0.http.port1.url" value="http://${node0}:8180" />
  58 + <property name="node0.jgroups.bind_addr" value="${node0}" />
  59 + <property name="node1" value="${hostname}" />
  60 + <property name="node1.http.url" value="http://${node1}:8080" />
  61 + <property name="node1.jndi.url" value="jnp://${node1}:1099" />
  62 + <property name="node1.jgroups.bind_addr" value="${node1}" />
  63 + <!--property name="node2" value="${env.MYTESTIP_3}" />
  64 + <property name="node2.http.url" value="http://${node2}:8080" />
  65 + <property name="node2.jndi.url" value="jnp://${node2}:1099" />
  66 + <property name="node2.jgroups.bind_addr" value="${node2}" />
  67 + <property name="node3" value="${env.MYTESTIP_4}" />
  68 + <property name="node3.http.url" value="http://${node3}:8080" />
  69 + <property name="node3.jndi.url" value="jnp://${node3}:1099" />
  70 + <property name="node3.jgroups.bind_addr" value="${node3}" /-->
  71 +
  72 + <!-- UDP Group, must be done before server-config.xml -->
  73 + <!-- The value of the -u option passed to jboss -->
  74 + <!-- A blank value will prevent the -u option from being passed -->
  75 + <!--
  76 + Override this in the local.properties or pass to Ant as
  77 + -DupdGroup=128.x.x.x
  78 + -->
  79 + <property name="udpGroup" value="" />
  80 + <!-- Same thing, but passed to the client -->
  81 + <property name="jbosstest.udpGroup" value="${udpGroup}" />
  82 +
  83 + <!-- Set "jboss.dist" to JBOSS_HOME -->
  84 + <property name="jboss.dist" value="${env.JBOSS_HOME}" />
  85 +
  86 + <!-- Propagate the dist directory as a jbosstest system property -->
  87 + <property name="jbosstest.dist" value="${jboss.dist}" />
  88 +
  89 + <!-- Externalized locations -->
  90 + <property name="location.resources.main" value="${basedir}/src/main/resources" />
  91 + <property name="location.resources.test" value="${basedir}/src/test/resources" />
  92 + <property name="location.target" value="${basedir}/target" />
  93 + <property name="location.artifact.tests" value="${location.target}/jboss-ejb3-testsuite-tests.jar" />
  94 + <property name="location.dependencies" value="${location.target}/dependencies" />
  95 + <property name="location.dependencies.unpacked" value="${location.dependencies}/unpacked" />
  96 + <property name="location.dependencies.unpacked.jboss-test:jboss.test" value="${location.dependencies.unpacked}/jboss-test" />
  97 + <property name="location.dependencies.lib" value="${location.dependencies}/lib" />
  98 + <property name="location.dependencies.lib.jboss-test:jboss-test" value="${location.dependencies.lib}/jboss-test.jar" />
  99 + <property name="location.dependencies.lib.org.jboss.jbossas:server-manager" value="${location.dependencies.lib}/jboss-server-manager.jar" />
  100 + <property name="location.dependencies.lib.junit:junit" value="${location.dependencies.lib}/junit.jar" />
  101 + <property name="location.dependencies.lib.apache-httpclient:commons-httpclient" value="${location.dependencies.lib}/commons-httpclient.jar" />
  102 + <property name="location.client.lib" value="${jboss.dist}/client"/>
  103 + <property name="location.apache.httpd" value="/usr/sbin"/>
  104 + <property name="location.apache.serverroot" value="${user.home}/httpd"/>
  105 + <property name="location.apache.config" value="conf/mod-cluster-httpd.conf"/>
  106 +
  107 + <!-- Import the jboss server run targets -->
  108 + <import file="${location.dependencies.unpacked.jboss-test:jboss.test}/server-config.xml" />
  109 +
  110 + <!-- Module name(s) & version -->
  111 + <property name="module.name" value="mod-cluster" />
  112 + <property name="module.Name" value="JBoss Testsuite" />
  113 + <property name="module.version" value="DEV" />
  114 + <property name="module.source" value="${basedir}/src" />
  115 + <property name="module.output" value="${basedir}/target" />
  116 +
  117 + <!-- Where source files live -->
  118 + <property name="source.resources" value="${module.source}/test/resources"/>
  119 +
  120 + <!-- Where build generated files will go -->
  121 + <property name="build.classes" value="${module.output}/classes"/>
  122 + <property name="build.lib" value="${module.output}/lib"/>
  123 + <property name="build.resources" value="${module.output}/resources"/>
  124 + <property name="build.reports" value="${module.output}/reports"/>
  125 + <property name="build.testlog" value="${module.output}/log"/>
  126 +
  127 + <!-- Define common JVM Arguments for all mod-cluster JBossAS Runtimes -->
  128 + <property name="mod_cluster.jboss.jvmargs"
  129 + value="-Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Dresolve.dns=false" />
  130 +
  131 + <property name="junit.timeout" value="300000"/>
  132 +
  133 + <!--
  134 + Define Server Configurations for mod_cluster Integration Tests
  135 + -->
  136 + <server:config javaHome="${env.JAVA_HOME}" jbossHome="${jboss.dist}"
  137 + udpGroup="${udpGroup}">
  138 +
  139 + <server name="mod-cluster-0" host="${node0}">
  140 + <jvmarg value="${mod_cluster.jboss.jvmargs}" />
  141 + <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
  142 + <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
  143 + <sysproperty key="jboss.messaging.ServerPeerID" value="0" />
  144 + </server>
  145 +
  146 + <server name="mod-cluster-1" host="${node1}">
  147 + <jvmarg value="${mod_cluster.jboss.jvmargs}" />
  148 + <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
  149 + <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
  150 + <sysproperty key="jboss.messaging.ServerPeerID" value="1" />
  151 + </server>
  152 +
  153 + <server name="mod-cluster-2" host="${node2}">
  154 + <jvmarg value="${mod_cluster.jboss.jvmargs}" />
  155 + <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
  156 + <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
  157 + <sysproperty key="jboss.messaging.ServerPeerID" value="2" />
  158 + </server>
  159 +
  160 + <server name="mod-cluster-3" host="${node3}">
  161 + <jvmarg value="${mod_cluster.jboss.jvmargs}" />
  162 + <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
  163 + <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
  164 + <sysproperty key="jboss.messaging.ServerPeerID" value="3" />
  165 + </server>
  166 +
  167 + </server:config>
  168 +
  169 + <!-- ===================== -->
  170 + <!-- Paths and Patternsets -->
  171 + <!-- ===================== -->
  172 +
  173 + <!-- Define test Classpath -->
  174 + <path id="jboss.test.classpath">
  175 + <pathelement path="${jboss.test.path}" />
  176 + </path>
  177 +
  178 + <!-- Classpath used by the Test Client -->
  179 + <path id="client.classpath">
  180 +
  181 + <!-- JBoss Client Binaries -->
  182 +
  183 + </path>
  184 +
  185 + <!--
  186 + Define the Path to Server Task Definitions, used by the JBoss Server
  187 + Run targets
  188 + -->
  189 + <path id="server.taskdef.classpath">
  190 + <pathelement path="${location.dependencies.lib.jboss-test:jboss-test}" />
  191 + <pathelement
  192 + path="${location.dependencies.lib.org.jboss.jbossas:server-manager}" />
  193 + </path>
  194 +
  195 + <patternset id="jboss.server.all.includes">
  196 + <include name="conf/**" />
  197 + <include name="deploy/**" />
  198 + <include name="deployers/**" />
  199 + <include name="deploy-hasingleton/**" />
  200 + <include name="lib/**" />
  201 + </patternset>
  202 +
  203 + <!-- Define the test pattern sets Here -->
  204 + <patternset id="apache.integration.test.includes">
  205 + <include name="org/jboss/modcluster/test/*TestCase.class" />
  206 + </patternset>
  207 +
  208 + <!-- Add exclude elements for any tests that should be excluded -->
  209 + <patternset id="badtest.excludes"/>
  210 +
  211 + <!-- ============================================== -->
  212 + <!-- Macros -->
  213 + <!-- ============================================== -->
  214 +
  215 + <macrodef name="httpd">
  216 + <attribute name="location" default="/usr/sbin"/>
  217 + <attribute name="action-type" default="start"/>
  218 + <attribute name="server-root"/>
  219 + <attribute name="config" default="conf/mod-cluster-httpd.conf"/>
  220 + <attribute name="failonerror" default="true"/>
  221 +
  222 + <sequential>
  223 + <echo message="Will @{action-type} the apache instance at @{location} using -d @{server-root} -f @{config}"/>
  224 + <echo message="If you need apache to run on port 80, then"/>
  225 + <echo message="you need to start apache with admin/root rights."/>
  226 + <echo message="If so, start/stop apache independent of this testsuite"/>
  227 + <exec executable="@{location}/httpd"
  228 + failonerror="@{failonerror}" failifexecutionfails="@{failonerror}">
  229 + <arg value="-k"/>
  230 + <arg value="@{action-type}"/>
  231 + <arg value="-d"/>
  232 + <arg value="@{server-root}"/>
  233 + <arg value="-f"/>
  234 + <arg value="@{config}"/>
  235 + </exec>
  236 + </sequential>
  237 + </macrodef>
  238 +
  239 + <macrodef name="create-httpd">
  240 + <attribute name="server-root" description="the httpd serverroot to which newconf-src should be copied"/>
  241 + <attribute name="newconf-src" description="The name of the tests-config to copy"/>
  242 + <sequential>
  243 + <echo message="Updating httpd config at @{server-root}" />
  244 + <copy todir="@{server-root}" overwrite="true" failonerror="false">
  245 + <fileset dir="${build.resources}/test-configs/@{newconf-src}" />
  246 + </copy>
  247 + </sequential>
  248 + </macrodef>
  249 +
  250 + <!-- ============================================== -->
  251 + <!-- Targets -->
  252 + <!-- ============================================== -->
  253 +
  254 + <!-- Import the test jars build targets -->
  255 + <import file="test-jars.xml"/>
  256 +
  257 + <!-- "main" is the default target; depends on "jars" which is imported
  258 + from test-jars.xml -->
  259 + <target name="main"
  260 + description="Executes the default target (jars)."
  261 + depends="jars"/>
  262 +
  263 + <target name="init">
  264 + <record name="${basedir}/build.log" append="yes" action="start" loglevel="error"/>
  265 + </target>
  266 +
  267 + <!-- Compile resource files -->
  268 + <target name="compile-resources">
  269 + <mkdir dir="${build.resources}"/>
  270 + <copy todir="${build.resources}" filtering="no">
  271 + <fileset dir="${source.resources}">
  272 + <include name="**/*"/>
  273 + </fileset>
  274 + </copy>
  275 + </target>
  276 +
  277 + <target name="tests-apache-integration"
  278 + description="Execute integration tests requiring an apache load balanced two JBoss nodes.">
  279 +
  280 + <!-- Determine whether we are configured to ignore failures and
  281 + pass the appropriate property to tests-clustering-junit.
  282 + One property we check below and fail the build; the other is ignored.
  283 + -->
  284 + <condition property="apache.integration.junit.failure.property"
  285 + value="apache.integration.junit.failure"
  286 + else="apache.integration.junit.failure.ignored">
  287 + <and>
  288 + <isset property="ignore.integration.test.failures"/>
  289 + <equals arg1="${ignore.integration.test.failures}" arg2="true" casesensitive="false" trim="true"/>
  290 + </and>
  291 + </condition>
  292 +
  293 + <echo message="Setting up httpd config in ${location.apache.serverroot}"/>
  294 + <create-httpd server-root="${location.apache.serverroot}" newconf-src="mod-cluster-httpd"/>
  295 +
  296 + <create-config baseconf="all" newconf="mod-cluster-0" newconf-src="mod-cluster-jbossas">
  297 + <patternset id="jboss.server.all.includes">
  298 + <include name="conf/**" />
  299 + <include name="deploy/**" />
  300 + <include name="deployers/**" />
  301 + <include name="deploy-hasingleton/**" />
  302 + <include name="lib/**" />
  303 + </patternset>
  304 + </create-config>
  305 +
  306 + <create-config baseconf="all" newconf="mod-cluster-1" newconf-src="mod-cluster-jbossas">
  307 + <patternset id="jboss.server.all.includes">
  308 + <include name="conf/**" />
  309 + <include name="deploy/**" />
  310 + <include name="deployers/**" />
  311 + <include name="deploy-hasingleton/**" />
  312 + <include name="lib/**" />
  313 + </patternset>
  314 + </create-config>
  315 +
  316 + <httpd location="${location.apache.httpd}" server-root="${location.apache.serverroot}"
  317 + config="${location.apache.config}" action-type="start" />
  318 +
  319 +
  320 + <server:start name="mod-cluster-0" />
  321 + <server:start name="mod-cluster-1" />
  322 +
  323 + <echo message="Nodes have started, waiting for cluster to stablize..." />
  324 +
  325 + <echo message="Going to call target tests-clustering-unit" />
  326 +
  327 + <antcall target="tests-clustering-unit">
  328 + <param name="cluster.includes.refid" value="apache.integration.test.includes" />
  329 + <param name="jboss-junit-configuration" value="ModCluster" />
  330 + <param name="tests-clustering-unit.failure.property" value="${apache.integration.junit.failure.property}"/>
  331 + </antcall>
  332 +
  333 + <server:stop name="mod-cluster-0" />
  334 + <server:stop name="mod-cluster-1" />
  335 +
  336 + <httpd location="${location.apache.httpd}" server-root="${location.apache.serverroot}"
  337 + config="${location.apache.config}" action-type="stop" />
  338 +
  339 + <!-- See if junit set the failure property that triggers build failure -->
  340 + <fail message="JUnit tests failed; see test reports for details" if="apache.integration.junit.failure"/>
  341 +
  342 + </target>
  343 +
  344 + <!-- Executes a set of tests in a clustered environment -->
  345 + <target name="tests-clustering-unit">
  346 +
  347 + <mkdir dir="${build.reports}" />
  348 + <mkdir dir="${build.testlog}" />
  349 + <junit dir="${module.output}" printsummary="on"
  350 + haltonerror="false" haltonfailure="false"
  351 + fork="true"
  352 + timeout="${junit.timeout}"
  353 + failureProperty="${tests-clustering-unit.failure.property}">
  354 +
  355 + <sysproperty key="java.net.preferIPv4Stack" value="true" />
  356 +
  357 + <sysproperty key="jboss.internal-server.serverroot"
  358 + value="${jboss.dist}/server" />
  359 + <sysproperty key="jbosstest.deploy.dir" file="${build.lib}" />
  360 + <sysproperty key="jbosstest.cluster.node0" value="${node0}" />
  361 + <sysproperty key="jbosstest.cluster.node0.http.url"
  362 + value="${node0.http.url}" />
  363 + <sysproperty key="jbosstest.cluster.node0.jndi.url"
  364 + value="${node0.jndi.url}" />
  365 + <sysproperty key="jbosstest.cluster.node0.serverroot"
  366 + value="${jboss.dist}/server/${jbosstest.cluster.node0.config}" />
  367 + <sysproperty key="jbosstest.cluster.node1" value="${node1}" />
  368 + <sysproperty key="jbosstest.cluster.node1.http.url"
  369 + value="${node1.http.url}" />
  370 + <sysproperty key="jbosstest.cluster.node1.jndi.url"
  371 + value="${node1.jndi.url}" />
  372 + <sysproperty key="jbosstest.cluster.node1.serverroot"
  373 + value="${jboss.dist}/server/${jbosstest.cluster.node1.config}" />
  374 + <sysproperty key="build.testlog" value="${build.testlog}" />
  375 + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml" />
  376 + <!-- Pass along any jbosstest.* system properties -->
  377 + <syspropertyset>
  378 + <propertyref prefix="jbosstest." />
  379 + </syspropertyset>
  380 +
  381 + <!--
  382 + Lets pass some parameters from local.properties file as system
  383 + properties
  384 + -->
  385 + <syspropertyset>
  386 + <propertyref prefix="org.apache." />
  387 + </syspropertyset>
  388 + <syspropertyset>
  389 + <propertyref prefix="apache" />
  390 + </syspropertyset>
  391 + <syspropertyset>
  392 + <propertyref prefix="node" />
  393 + </syspropertyset>
  394 +
  395 + <!--
  396 + jvmarg value="${junit.jvm.options}"/> <jvmarg
  397 + value="-Xrunjdwp:transport=dt_socket,address=8789,server=y,suspend=y"/>
  398 + <jvmarg value="-Djava.compiler=NONE"/> <jvmarg value="-Xdebug"/>
  399 + <jvmarg value="-Xnoagent"/
  400 + -->
  401 +
  402 + <classpath>
  403 + <pathelement location="${build.classes}" />
  404 + <pathelement location="${build.resources}" />
  405 + <path refid="tests.classpath" />
  406 + </classpath>
  407 +
  408 + <!--
  409 + definition of the property for keeping results between configuration
  410 + -->
  411 + <sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}" />
  412 + <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
  413 + usefile="${junit.formatter.usefile}" extension="-${jboss-junit-configuration}.xml" />
  414 +
  415 + <batchtest todir="${build.reports}" haltonerror="false"
  416 + haltonfailure="false" fork="true">
  417 +
  418 + <fileset dir="${build.classes}">
  419 + <patternset refid="${cluster.includes.refid}" />
  420 + <patternset refid="badtest.excludes" />
  421 + </fileset>
  422 + </batchtest>
  423 + </junit>
  424 + </target>
  425 +
  426 + <!-- Launches a test assuming the AS instances are already running -->
  427 + <target name="one-cluster-test-nostart" if="test">
  428 +
  429 + <property name="jboss-junit-configuration" value="ModCluster" />
  430 +
  431 + <echo message="Going to call target tests-clustering-unit for ${test}" />
  432 +
  433 + <antcall target="tests-clustering-unit">
  434 + <param name="cluster.includes.refid" value="one.test.includes" />
  435 + <param name="jboss-junit-configuration" value="${jboss-junit-configuration}" />
  436 + <param name="jbosstest.cluster.web.cache.config" value="standard-session-cache" />
  437 + <param name="jbosstest.cluster.node0.config" value="mod-cluster-0" />
  438 + <param name="jbosstest.cluster.node1.config" value="mod-cluster-1" />
  439 + </antcall>
  440 +
  441 + </target>
  442 +
  443 +</project>
10 docs/README
... ... @@ -0,0 +1,10 @@
  1 +This is mod_cluster code (See http://wiki.jboss.org/wiki/ModClusterDesign).
  2 +It is organized in the following subdirectories:
  3 +docs (Documentation)
  4 +native/mod_manager (manager part)
  5 +native/mod_proxy_cluster (balancer for mod_proxy)
  6 +native/include ( common includes like the table access layer API)
  7 +native/mod_slotmem (shared memory provider).
  8 +test/java (test utilities using httpclient).
  9 +test/native (native test utilities).
  10 +
165 lgpl.txt
... ... @@ -0,0 +1,165 @@
  1 + GNU LESSER GENERAL PUBLIC LICENSE
  2 + Version 3, 29 June 2007
  3 +
  4 + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
  5 + Everyone is permitted to copy and distribute verbatim copies
  6 + of this license document, but changing it is not allowed.
  7 +
  8 +
  9 + This version of the GNU Lesser General Public License incorporates
  10 +the terms and conditions of version 3 of the GNU General Public
  11 +License, supplemented by the additional permissions listed below.
  12 +
  13 + 0. Additional Definitions.
  14 +
  15 + As used herein, "this License" refers to version 3 of the GNU Lesser
  16 +General Public License, and the "GNU GPL" refers to version 3 of the GNU
  17 +General Public License.
  18 +
  19 + "The Library" refers to a covered work governed by this License,
  20 +other than an Application or a Combined Work as defined below.
  21 +
  22 + An "Application" is any work that makes use of an interface provided
  23 +by the Library, but which is not otherwise based on the Library.
  24 +Defining a subclass of a class defined by the Library is deemed a mode
  25 +of using an interface provided by the Library.
  26 +
  27 + A "Combined Work" is a work produced by combining or linking an
  28 +Application with the Library. The particular version of the Library
  29 +with which the Combined Work was made is also called the "Linked
  30 +Version".
  31 +
  32 + The "Minimal Corresponding Source" for a Combined Work means the
  33 +Corresponding Source for the Combined Work, excluding any source code
  34 +for portions of the Combined Work that, considered in isolation, are
  35 +based on the Application, and not on the Linked Version.
  36 +
  37 + The "Corresponding Application Code" for a Combined Work means the
  38 +object code and/or source code for the Application, including any data
  39 +and utility programs needed for reproducing the Combined Work from the
  40 +Application, but excluding the System Libraries of the Combined Work.
  41 +
  42 + 1. Exception to Section 3 of the GNU GPL.
  43 +
  44 + You may convey a covered work under sections 3 and 4 of this License
  45 +without being bound by section 3 of the GNU GPL.
  46 +
  47 + 2. Conveying Modified Versions.
  48 +
  49 + If you modify a copy of the Library, and, in your modifications, a
  50 +facility refers to a function or data to be supplied by an Application
  51 +that uses the facility (other than as an argument passed when the
  52 +facility is invoked), then you may convey a copy of the modified
  53 +version:
  54 +
  55 + a) under this License, provided that you make a good faith effort to
  56 + ensure that, in the event an Application does not supply the
  57 + function or data, the facility still operates, and performs
  58 + whatever part of its purpose remains meaningful, or
  59 +
  60 + b) under the GNU GPL, with none of the additional permissions of
  61 + this License applicable to that copy.
  62 +
  63 + 3. Object Code Incorporating Material from Library Header Files.
  64 +
  65 + The object code form of an Application may incorporate material from
  66 +a header file that is part of the Library. You may convey such object
  67 +code under terms of your choice, provided that, if the incorporated
  68 +material is not limited to numerical parameters, data structure
  69 +layouts and accessors, or small macros, inline functions and templates
  70 +(ten or fewer lines in length), you do both of the following:
  71 +
  72 + a) Give prominent notice with each copy of the object code that the
  73 + Library is used in it and that the Library and its use are
  74 + covered by this License.
  75 +
  76 + b) Accompany the object code with a copy of the GNU GPL and this license
  77 + document.
  78 +
  79 + 4. Combined Works.
  80 +
  81 + You may convey a Combined Work under terms of your choice that,
  82 +taken together, effectively do not restrict modification of the
  83 +portions of the Library contained in the Combined Work and reverse
  84 +engineering for debugging such modifications, if you also do each of
  85 +the following:
  86 +
  87 + a) Give prominent notice with each copy of the Combined Work that
  88 + the Library is used in it and that the Library and its use are
  89 + covered by this License.
  90 +
  91 + b) Accompany the Combined Work with a copy of the GNU GPL and this license
  92 + document.
  93 +
  94 + c) For a Combined Work that displays copyright notices during
  95 + execution, include the copyright notice for the Library among
  96 + these notices, as well as a reference directing the user to the
  97 + copies of the GNU GPL and this license document.
  98 +
  99 + d) Do one of the following:
  100 +
  101 + 0) Convey the Minimal Corresponding Source under the terms of this
  102 + License, and the Corresponding Application Code in a form
  103 + suitable for, and under terms that permit, the user to
  104 + recombine or relink the Application with a modified version of
  105 + the Linked Version to produce a modified Combined Work, in the
  106 + manner specified by section 6 of the GNU GPL for conveying
  107 + Corresponding Source.
  108 +
  109 + 1) Use a suitable shared library mechanism for linking with the
  110 + Library. A suitable mechanism is one that (a) uses at run time
  111 + a copy of the Library already present on the user's computer
  112 + system, and (b) will operate properly with a modified version
  113 + of the Library that is interface-compatible with the Linked
  114 + Version.
  115 +
  116 + e) Provide Installation Information, but only if you would otherwise
  117 + be required to provide such information under section 6 of the
  118 + GNU GPL, and only to the extent that such information is
  119 + necessary to install and execute a modified version of the
  120 + Combined Work produced by recombining or relinking the
  121 + Application with a modified version of the Linked Version. (If
  122 + you use option 4d0, the Installation Information must accompany
  123 + the Minimal Corresponding Source and Corresponding Application
  124 + Code. If you use option 4d1, you must provide the Installation
  125 + Information in the manner specified by section 6 of the GNU GPL
  126 + for conveying Corresponding Source.)
  127 +
  128 + 5. Combined Libraries.
  129 +
  130 + You may place library facilities that are a work based on the
  131 +Library side by side in a single library together with other library
  132 +facilities that are not Applications and are not covered by this
  133 +License, and convey such a combined library under terms of your
  134 +choice, if you do both of the following:
  135 +
  136 + a) Accompany the combined library with a copy of the same work based
  137 + on the Library, uncombined with any other library facilities,
  138 + conveyed under the terms of this License.
  139 +
  140 + b) Give prominent notice with the combined library that part of it
  141 + is a work based on the Library, and explaining where to find the
  142 + accompanying uncombined form of the same work.
  143 +
  144 + 6. Revised Versions of the GNU Lesser General Public License.
  145 +
  146 + The Free Software Foundation may publish revised and/or new versions
  147 +of the GNU Lesser General Public License from time to time. Such new
  148 +versions will be similar in spirit to the present version, but may
  149 +differ in detail to address new problems or concerns.
  150 +
  151 + Each version is given a distinguishing version number. If the
  152 +Library as you received it specifies that a certain numbered version
  153 +of the GNU Lesser General Public License "or any later version"
  154 +applies to it, you have the option of following the terms and
  155 +conditions either of that published version or of any later version
  156 +published by the Free Software Foundation. If the Library as you
  157 +received it does not specify a version number of the GNU Lesser
  158 +General Public License, you may choose any version of the GNU Lesser
  159 +General Public License ever published by the Free Software Foundation.
  160 +
  161 + If the Library as you received it specifies that a proxy can decide
  162 +whether future versions of the GNU Lesser General Public License shall
  163 +apply, that proxy's public statement of acceptance of any version is
  164 +permanent authorization for you to choose that version for the
  165 +Library.
84 local.properties
... ... @@ -0,0 +1,84 @@
  1 +#IMPORTANT:- Please do not check this file into CVS with your local changes
  2 +#This file is used to pass config info to targets like apache_tomcat-clustering tests
  3 +#Please uncomment or add your properties to this file.
  4 +
  5 +# $Id: local.properties 72339 2008-04-17 11:38:28Z adrian@jboss.org $
  6 +
  7 +### General compiler configuration ###
  8 +
  9 +# Use the jikes compiler
  10 +#build.compiler=jikes
  11 +
  12 +# Use the eclipse compiler to allow for hot code swapping
  13 +# http://www.jboss.org/index.html?module=bb&op=viewtopic&t=65783
  14 +#
  15 +# Make sure you have these jars in tools/lib
  16 +#
  17 +# org.eclipse.jdt.core_3.1.0.jar
  18 +# jdtCompilerAdapter.jar (is contained in org.eclipse.jdt.core_3.1.0.jar)
  19 +#
  20 +#build.compiler=org.eclipse.jdt.core.JDTCompilerAdapter
  21 +
  22 +javac.optimize=false
  23 +javac.debug=true
  24 +javac.depend=false
  25 +javac.verbose=false
  26 +javac.deprecation=false
  27 +javac.include.ant.runtime=true
  28 +javac.include.java.runtime=false
  29 +javac.fail.onerror=true
  30 +
  31 +junit.showoutput=true
  32 +
  33 +rmic.verify=true
  34 +rmic.iiop=false
  35 +rmic.iiopopts=
  36 +rmic.idl=
  37 +rmic.idlops=
  38 +rmic.debug=true
  39 +
  40 +# Location of the httpd binary and the httpd serverroot
  41 +#location.apache.httpd=/usr/sbin
  42 +#location.apache.serverroot=${user.home}/httpd
  43 +#location.apache.config=conf/mod-cluster-httpd.conf
  44 +
  45 +# Location of JBoss
  46 +jboss.dist=${env.JBOSS_HOME}
  47 +
  48 +#
  49 +# Both node0 and node1 properties are needed to run clustering tests.
  50 +# e.g., tests-clustering. Note that you will need to have two separate ips
  51 +# (even at the same machine). Actually what we needed are just node0 and node1
  52 +# ips and the rest are optional.
  53 +#
  54 +#node0=${env.MYTESTIP_1}
  55 +#node0.http.url=http://192.168.1.103:8080
  56 +#node0.jndiurl=jnp://192.168.1.103:1099
  57 +#node0.hajndi.url=jnp://192.168.1.103:1100
  58 +
  59 +#node1=${env.MYTESTIP_2}
  60 +#node1.http.url=http://192.168.1.113:8080
  61 +#node1.jndiurl=jnp://192.168.1.113:1099
  62 +#node1.hajndi.url=jnp://192.168.1.113:1100
  63 +
  64 +# Set this to partition your testsuite runs
  65 +# from others on the network.
  66 +#udpGroup=${env.MY_UDP_GROUP}
  67 +
  68 +# In tests involving multicast, multicast packets by default have a TTL
  69 +# of 0. Uncomment to set this to 1 if you find 0 prevents proper multicast
  70 +# communication on your machine
  71 +#jbosstest.udp.ip_ttl=1
  72 +
  73 +# Some DTM tests (e.g., dtm-tests) bring four JBoss instances up in order
  74 +# to test transactions distributed across multiple servers. Those tests
  75 +# need all four properties node0, node1, node2, and node3. Note that you
  76 +# will need to have four separate ips (even at the same machine).
  77 +node2=${env.MYTESTIP_3}
  78 +node3=${env.MYTESTIP_4}
  79 +
  80 +#The following properties will reduce verbosity of Apache Commons HttpClient
  81 +#org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
  82 +#org.apache.commons.logging.simplelog.showdatetime=true
  83 +#org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=debug
  84 +#org.apache.commons.logging.simplelog.log.httpclient.wire.header=error
0  native/advertise/.deps
No changes.
0  native/advertise/.deps
Sorry, we could not display the changes to this file because there were too many other changes to display.
23 native/advertise/Makefile.in
... ... @@ -0,0 +1,23 @@
  1 +# Makefile.in for mod_proxy_cluster
  2 +# copy the source in the httpd Apache source tree
  3 +APACHE_BASE = @APACHE_BASE@
  4 +top_builddir = @APACHE_BASE@
  5 +# For .deps.
  6 +builddir = @CLUSTER_BASE@
  7 +# For the apache includes
  8 +top_srcdir = @APACHE_BASE@
  9 +
  10 +include $(APACHE_BASE)/build/rules.mk
  11 +SH_COMPILE = $(LIBTOOL) --mode=compile $(BASE_CC) -I../include -prefer-pic -c $< && touch $@
  12 +
  13 +all: mod_advertise.so
  14 +
  15 +mod_advertise.so: mod_advertise.la