jruby-activemq 5.5.1-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. data/History.md +6 -0
  2. data/LICENSE +619 -0
  3. data/README.md +15 -0
  4. data/Rakefile +34 -0
  5. data/apache-activemq-5.5.1/LICENSE +619 -0
  6. data/apache-activemq-5.5.1/NOTICE +85 -0
  7. data/apache-activemq-5.5.1/README.txt +63 -0
  8. data/apache-activemq-5.5.1/WebConsole-README.txt +42 -0
  9. data/apache-activemq-5.5.1/activemq-all-5.5.1.jar +0 -0
  10. data/apache-activemq-5.5.1/bin/activemq +653 -0
  11. data/apache-activemq-5.5.1/bin/activemq-admin +155 -0
  12. data/apache-activemq-5.5.1/bin/linux-x86-32/activemq +543 -0
  13. data/apache-activemq-5.5.1/bin/linux-x86-32/libwrapper.so +0 -0
  14. data/apache-activemq-5.5.1/bin/linux-x86-32/wrapper +0 -0
  15. data/apache-activemq-5.5.1/bin/linux-x86-32/wrapper.conf +139 -0
  16. data/apache-activemq-5.5.1/bin/linux-x86-64/activemq +543 -0
  17. data/apache-activemq-5.5.1/bin/linux-x86-64/libwrapper.so +0 -0
  18. data/apache-activemq-5.5.1/bin/linux-x86-64/wrapper +0 -0
  19. data/apache-activemq-5.5.1/bin/linux-x86-64/wrapper.conf +139 -0
  20. data/apache-activemq-5.5.1/bin/macosx/activemq +537 -0
  21. data/apache-activemq-5.5.1/bin/macosx/libwrapper.jnilib +0 -0
  22. data/apache-activemq-5.5.1/bin/macosx/wrapper +0 -0
  23. data/apache-activemq-5.5.1/bin/macosx/wrapper.conf +139 -0
  24. data/apache-activemq-5.5.1/bin/run.jar +0 -0
  25. data/apache-activemq-5.5.1/bin/wrapper.jar +0 -0
  26. data/apache-activemq-5.5.1/conf/activemq-command.xml +52 -0
  27. data/apache-activemq-5.5.1/conf/activemq-demo.xml +289 -0
  28. data/apache-activemq-5.5.1/conf/activemq-dynamic-network-broker1.xml +108 -0
  29. data/apache-activemq-5.5.1/conf/activemq-dynamic-network-broker2.xml +109 -0
  30. data/apache-activemq-5.5.1/conf/activemq-jdbc.xml +98 -0
  31. data/apache-activemq-5.5.1/conf/activemq-scalability.xml +77 -0
  32. data/apache-activemq-5.5.1/conf/activemq-security.xml +132 -0
  33. data/apache-activemq-5.5.1/conf/activemq-specjms.xml +118 -0
  34. data/apache-activemq-5.5.1/conf/activemq-static-network-broker1.xml +100 -0
  35. data/apache-activemq-5.5.1/conf/activemq-static-network-broker2.xml +100 -0
  36. data/apache-activemq-5.5.1/conf/activemq-stomp.xml +133 -0
  37. data/apache-activemq-5.5.1/conf/activemq-throughput.xml +82 -0
  38. data/apache-activemq-5.5.1/conf/activemq.xml +136 -0
  39. data/apache-activemq-5.5.1/conf/broker-localhost.cert +0 -0
  40. data/apache-activemq-5.5.1/conf/broker.ks +0 -0
  41. data/apache-activemq-5.5.1/conf/broker.ts +0 -0
  42. data/apache-activemq-5.5.1/conf/camel.xml +66 -0
  43. data/apache-activemq-5.5.1/conf/client.ks +0 -0
  44. data/apache-activemq-5.5.1/conf/client.ts +0 -0
  45. data/apache-activemq-5.5.1/conf/credentials-enc.properties +22 -0
  46. data/apache-activemq-5.5.1/conf/credentials.properties +22 -0
  47. data/apache-activemq-5.5.1/conf/jetty-realm.properties +20 -0
  48. data/apache-activemq-5.5.1/conf/jetty.xml +112 -0
  49. data/apache-activemq-5.5.1/conf/jmx.access +18 -0
  50. data/apache-activemq-5.5.1/conf/jmx.password +18 -0
  51. data/apache-activemq-5.5.1/conf/log4j.properties +75 -0
  52. data/apache-activemq-5.5.1/conf/logging.properties +25 -0
  53. data/apache-activemq-5.5.1/data/activemq.log +0 -0
  54. data/apache-activemq-5.5.1/docs/index.html +22 -0
  55. data/apache-activemq-5.5.1/example/build.xml +317 -0
  56. data/apache-activemq-5.5.1/example/conf/activemq.xml +41 -0
  57. data/apache-activemq-5.5.1/example/conf/log4j.properties +39 -0
  58. data/apache-activemq-5.5.1/example/conf/resin-web.xml +35 -0
  59. data/apache-activemq-5.5.1/example/conf/web.xml +40 -0
  60. data/apache-activemq-5.5.1/example/perfharness/perfharness-activemq.sh +49 -0
  61. data/apache-activemq-5.5.1/example/ruby/README.txt +27 -0
  62. data/apache-activemq-5.5.1/example/ruby/catstomp.rb +49 -0
  63. data/apache-activemq-5.5.1/example/ruby/listener.rb +51 -0
  64. data/apache-activemq-5.5.1/example/ruby/publisher.rb +67 -0
  65. data/apache-activemq-5.5.1/example/ruby/stompcat.rb +50 -0
  66. data/apache-activemq-5.5.1/example/src/CommandLineSupport.java +120 -0
  67. data/apache-activemq-5.5.1/example/src/ConsumerTool.java +353 -0
  68. data/apache-activemq-5.5.1/example/src/EmbeddedBroker.java +41 -0
  69. data/apache-activemq-5.5.1/example/src/Log4jJMSAppenderExample.java +70 -0
  70. data/apache-activemq-5.5.1/example/src/ProducerAndConsumerTool.java +51 -0
  71. data/apache-activemq-5.5.1/example/src/ProducerTool.java +247 -0
  72. data/apache-activemq-5.5.1/example/src/RequesterTool.java +257 -0
  73. data/apache-activemq-5.5.1/example/src/StompExample.java +59 -0
  74. data/apache-activemq-5.5.1/example/src/TopicListener.java +118 -0
  75. data/apache-activemq-5.5.1/example/src/TopicPublisher.java +205 -0
  76. data/apache-activemq-5.5.1/example/src/jndi.properties +17 -0
  77. data/apache-activemq-5.5.1/example/src/log4j-jms.properties +31 -0
  78. data/apache-activemq-5.5.1/example/transactions/README.txt +40 -0
  79. data/apache-activemq-5.5.1/example/transactions/build.xml +113 -0
  80. data/apache-activemq-5.5.1/example/transactions/src/Retailer.java +107 -0
  81. data/apache-activemq-5.5.1/example/transactions/src/Supplier.java +135 -0
  82. data/apache-activemq-5.5.1/example/transactions/src/TransactionsDemo.java +47 -0
  83. data/apache-activemq-5.5.1/example/transactions/src/Vendor.java +302 -0
  84. data/apache-activemq-5.5.1/lib/a.sh +3 -0
  85. data/apache-activemq-5.5.1/lib/activation-1.1.jar +0 -0
  86. data/apache-activemq-5.5.1/lib/activemq-camel-5.5.1.jar +0 -0
  87. data/apache-activemq-5.5.1/lib/activemq-console-5.5.1.jar +0 -0
  88. data/apache-activemq-5.5.1/lib/activemq-core-5.5.1.jar +0 -0
  89. data/apache-activemq-5.5.1/lib/activemq-jaas-5.5.1.jar +0 -0
  90. data/apache-activemq-5.5.1/lib/activemq-protobuf-1.1.jar +0 -0
  91. data/apache-activemq-5.5.1/lib/activemq-rar.txt +20 -0
  92. data/apache-activemq-5.5.1/lib/activemq-web-5.5.1.jar +0 -0
  93. data/apache-activemq-5.5.1/lib/camel-core-2.7.0.jar +0 -0
  94. data/apache-activemq-5.5.1/lib/camel-jetty-2.7.0.jar +0 -0
  95. data/apache-activemq-5.5.1/lib/camel-jms-2.7.0.jar +0 -0
  96. data/apache-activemq-5.5.1/lib/camel-spring-2.7.0.jar +0 -0
  97. data/apache-activemq-5.5.1/lib/geronimo-j2ee-management_1.1_spec-1.0.1.jar +0 -0
  98. data/apache-activemq-5.5.1/lib/geronimo-jms_1.1_spec-1.1.1.jar +0 -0
  99. data/apache-activemq-5.5.1/lib/geronimo-jta_1.0.1B_spec-1.0.1.jar +0 -0
  100. data/apache-activemq-5.5.1/lib/jaxb-api-2.1.jar +0 -0
  101. data/apache-activemq-5.5.1/lib/jaxb-impl-2.1.6.jar +0 -0
  102. data/apache-activemq-5.5.1/lib/jcl-over-slf4j-1.5.11.jar +0 -0
  103. data/apache-activemq-5.5.1/lib/kahadb-5.5.1.jar +0 -0
  104. data/apache-activemq-5.5.1/lib/optional/activeio-core-3.1.2.jar +0 -0
  105. data/apache-activemq-5.5.1/lib/optional/activemq-jmdns_1.0-5.5.1.jar +0 -0
  106. data/apache-activemq-5.5.1/lib/optional/activemq-optional-5.5.1.jar +0 -0
  107. data/apache-activemq-5.5.1/lib/optional/activemq-pool-5.5.1.jar +0 -0
  108. data/apache-activemq-5.5.1/lib/optional/activemq-spring-5.5.1.jar +0 -0
  109. data/apache-activemq-5.5.1/lib/optional/activemq-xmpp-5.5.1.jar +0 -0
  110. data/apache-activemq-5.5.1/lib/optional/commons-beanutils-1.6.1.jar +0 -0
  111. data/apache-activemq-5.5.1/lib/optional/commons-codec-1.2.jar +0 -0
  112. data/apache-activemq-5.5.1/lib/optional/commons-collections-3.2.1.jar +0 -0
  113. data/apache-activemq-5.5.1/lib/optional/commons-dbcp-1.2.2.jar +0 -0
  114. data/apache-activemq-5.5.1/lib/optional/commons-httpclient-3.1.jar +0 -0
  115. data/apache-activemq-5.5.1/lib/optional/commons-lang-2.4.jar +0 -0
  116. data/apache-activemq-5.5.1/lib/optional/commons-net-2.0.jar +0 -0
  117. data/apache-activemq-5.5.1/lib/optional/commons-pool-1.5.4.jar +0 -0
  118. data/apache-activemq-5.5.1/lib/optional/geronimo-j2ee-connector_1.5_spec-2.0.0.jar +0 -0
  119. data/apache-activemq-5.5.1/lib/optional/jasypt-1.7.jar +0 -0
  120. data/apache-activemq-5.5.1/lib/optional/jettison-1.2.jar +0 -0
  121. data/apache-activemq-5.5.1/lib/optional/josql-1.5.jar +0 -0
  122. data/apache-activemq-5.5.1/lib/optional/log4j-1.2.14.jar +0 -0
  123. data/apache-activemq-5.5.1/lib/optional/slf4j-log4j12-1.5.11.jar +0 -0
  124. data/apache-activemq-5.5.1/lib/optional/spring-aop-3.0.3.RELEASE.jar +0 -0
  125. data/apache-activemq-5.5.1/lib/optional/spring-asm-3.0.3.RELEASE.jar +0 -0
  126. data/apache-activemq-5.5.1/lib/optional/spring-beans-3.0.3.RELEASE.jar +0 -0
  127. data/apache-activemq-5.5.1/lib/optional/spring-context-3.0.3.RELEASE.jar +0 -0
  128. data/apache-activemq-5.5.1/lib/optional/spring-core-3.0.3.RELEASE.jar +0 -0
  129. data/apache-activemq-5.5.1/lib/optional/spring-expression-3.0.3.RELEASE.jar +0 -0
  130. data/apache-activemq-5.5.1/lib/optional/spring-jms-3.0.3.RELEASE.jar +0 -0
  131. data/apache-activemq-5.5.1/lib/optional/spring-oxm-tiger-1.5.8.jar +0 -0
  132. data/apache-activemq-5.5.1/lib/optional/spring-tx-3.0.3.RELEASE.jar +0 -0
  133. data/apache-activemq-5.5.1/lib/optional/stax2-api-3.0.1.jar +0 -0
  134. data/apache-activemq-5.5.1/lib/optional/velocity-1.6.2.jar +0 -0
  135. data/apache-activemq-5.5.1/lib/optional/woodstox-core-asl-4.0.7.jar +0 -0
  136. data/apache-activemq-5.5.1/lib/optional/xbean-spring-3.7.jar +0 -0
  137. data/apache-activemq-5.5.1/lib/optional/xpp3-1.1.4c.jar +0 -0
  138. data/apache-activemq-5.5.1/lib/optional/xstream-1.3.1.jar +0 -0
  139. data/apache-activemq-5.5.1/lib/slf4j-api-1.5.11.jar +0 -0
  140. data/apache-activemq-5.5.1/lib/stax-1.2.0.jar +0 -0
  141. data/apache-activemq-5.5.1/lib/stax-api-1.0.1.jar +0 -0
  142. data/apache-activemq-5.5.1/lib/web/commons-management-1.0.jar +0 -0
  143. data/apache-activemq-5.5.1/lib/web/core-3.1.1.jar +0 -0
  144. data/apache-activemq-5.5.1/lib/web/geronimo-servlet_2.5_spec-1.2.jar +0 -0
  145. data/apache-activemq-5.5.1/lib/web/jdom-1.0.jar +0 -0
  146. data/apache-activemq-5.5.1/lib/web/jetty-all-server-7.1.6.v20100715.jar +0 -0
  147. data/apache-activemq-5.5.1/lib/web/jetty-websocket-7.1.6.v20100715.jar +0 -0
  148. data/apache-activemq-5.5.1/lib/web/jsp-2.1-glassfish-2.1.v20100127.jar +0 -0
  149. data/apache-activemq-5.5.1/lib/web/jsp-api-2.1-glassfish-2.1.v20100127.jar +0 -0
  150. data/apache-activemq-5.5.1/lib/web/rome-0.8.jar +0 -0
  151. data/apache-activemq-5.5.1/lib/web/sitemesh-2.2.1.jar +0 -0
  152. data/apache-activemq-5.5.1/lib/web/spring-web-3.0.3.RELEASE.jar +0 -0
  153. data/apache-activemq-5.5.1/lib/web/spring-webmvc-3.0.3.RELEASE.jar +0 -0
  154. data/apache-activemq-5.5.1/user-guide.html +119 -0
  155. data/apache-activemq-5.5.1/webapps/admin/404.html +137 -0
  156. data/apache-activemq-5.5.1/webapps/admin/500.html +138 -0
  157. data/apache-activemq-5.5.1/webapps/admin/META-INF/LICENSE +1026 -0
  158. data/apache-activemq-5.5.1/webapps/admin/META-INF/NOTICE +107 -0
  159. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/WebConsoleStarter.class +0 -0
  160. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/CopyMessage.class +0 -0
  161. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/CreateDestination.class +0 -0
  162. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/CreateSubscriber.class +0 -0
  163. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/DeleteDestination.class +0 -0
  164. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/DeleteJob.class +0 -0
  165. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/DeleteMessage.class +0 -0
  166. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/DeleteSubscriber.class +0 -0
  167. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/MoveMessage.class +0 -0
  168. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/PurgeDestination.class +0 -0
  169. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/controller/SendMessage.class +0 -0
  170. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/filter/ApplicationContextFilter$1.class +0 -0
  171. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/filter/ApplicationContextFilter$2.class +0 -0
  172. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/filter/ApplicationContextFilter.class +0 -0
  173. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/classes/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.class +0 -0
  174. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/decorators.xml +30 -0
  175. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/dispatcher-servlet.xml +62 -0
  176. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/jspf/headertags.jspf +21 -0
  177. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/jspf/old.jspf +21 -0
  178. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/checkbox.tag +18 -0
  179. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/forEachMapEntry.tag +29 -0
  180. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/option.tag +20 -0
  181. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/short.tag +29 -0
  182. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/text.tag +30 -0
  183. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/tooltip.tag +29 -0
  184. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/form/uri.tag +18 -0
  185. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/jms/forEachConnection.tag +35 -0
  186. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/jms/forEachMessage.tag +34 -0
  187. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/jms/formatTimestamp.tag +29 -0
  188. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/tags/jms/persistent.tag +27 -0
  189. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/web.xml +187 -0
  190. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-default.xml +26 -0
  191. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-embedded.xml +45 -0
  192. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-invm.xml +41 -0
  193. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-jndi.xml +39 -0
  194. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-properties.xml +39 -0
  195. data/apache-activemq-5.5.1/webapps/admin/WEB-INF/webconsole-query.xml +25 -0
  196. data/apache-activemq-5.5.1/webapps/admin/browse.jsp +64 -0
  197. data/apache-activemq-5.5.1/webapps/admin/connection.jsp +138 -0
  198. data/apache-activemq-5.5.1/webapps/admin/connections.jsp +85 -0
  199. data/apache-activemq-5.5.1/webapps/admin/decorators/main.jsp +165 -0
  200. data/apache-activemq-5.5.1/webapps/admin/decorators/panel.jsp +31 -0
  201. data/apache-activemq-5.5.1/webapps/admin/decorators/printable.jsp +31 -0
  202. data/apache-activemq-5.5.1/webapps/admin/graph.jsp +67 -0
  203. data/apache-activemq-5.5.1/webapps/admin/images/activemq-logo.png +0 -0
  204. data/apache-activemq-5.5.1/webapps/admin/images/asf-logo.png +0 -0
  205. data/apache-activemq-5.5.1/webapps/admin/images/big-bullet.png +0 -0
  206. data/apache-activemq-5.5.1/webapps/admin/images/black-footer-bottom.png +0 -0
  207. data/apache-activemq-5.5.1/webapps/admin/images/black-footer-left.png +0 -0
  208. data/apache-activemq-5.5.1/webapps/admin/images/black-footer-right.png +0 -0
  209. data/apache-activemq-5.5.1/webapps/admin/images/bottom-red-bar.png +0 -0
  210. data/apache-activemq-5.5.1/webapps/admin/images/checker-bg.png +0 -0
  211. data/apache-activemq-5.5.1/webapps/admin/images/content-left.png +0 -0
  212. data/apache-activemq-5.5.1/webapps/admin/images/content-right.png +0 -0
  213. data/apache-activemq-5.5.1/webapps/admin/images/feed_atom.png +0 -0
  214. data/apache-activemq-5.5.1/webapps/admin/images/feed_rss.png +0 -0
  215. data/apache-activemq-5.5.1/webapps/admin/images/left-box-bottom.png +0 -0
  216. data/apache-activemq-5.5.1/webapps/admin/images/left-box-right.png +0 -0
  217. data/apache-activemq-5.5.1/webapps/admin/images/left-box-top.png +0 -0
  218. data/apache-activemq-5.5.1/webapps/admin/images/oval-arrow.png +0 -0
  219. data/apache-activemq-5.5.1/webapps/admin/images/right-box-bottom.png +0 -0
  220. data/apache-activemq-5.5.1/webapps/admin/images/right-box-left.png +0 -0
  221. data/apache-activemq-5.5.1/webapps/admin/images/right-box-top.png +0 -0
  222. data/apache-activemq-5.5.1/webapps/admin/images/small-bullet-gray.png +0 -0
  223. data/apache-activemq-5.5.1/webapps/admin/images/small-bullet-red.png +0 -0
  224. data/apache-activemq-5.5.1/webapps/admin/images/spacer.gif +0 -0
  225. data/apache-activemq-5.5.1/webapps/admin/images/top-red-bar.png +0 -0
  226. data/apache-activemq-5.5.1/webapps/admin/images/white-header-left.png +0 -0
  227. data/apache-activemq-5.5.1/webapps/admin/images/white-header-right.png +0 -0
  228. data/apache-activemq-5.5.1/webapps/admin/images/white-header-top.png +0 -0
  229. data/apache-activemq-5.5.1/webapps/admin/index.jsp +65 -0
  230. data/apache-activemq-5.5.1/webapps/admin/js/common.js +121 -0
  231. data/apache-activemq-5.5.1/webapps/admin/js/css.js +145 -0
  232. data/apache-activemq-5.5.1/webapps/admin/js/mochi/MochiKit.js +4804 -0
  233. data/apache-activemq-5.5.1/webapps/admin/js/mochi/__package__.js +14 -0
  234. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/Base.js +332 -0
  235. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/Canvas.js +707 -0
  236. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/Layout.js +588 -0
  237. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/SVG.js +677 -0
  238. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/SweetCanvas.js +281 -0
  239. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/SweetSVG.js +196 -0
  240. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/dummy.svg +15 -0
  241. data/apache-activemq-5.5.1/webapps/admin/js/plotkit/iecanvas.htc +389 -0
  242. data/apache-activemq-5.5.1/webapps/admin/js/prettify.js +1424 -0
  243. data/apache-activemq-5.5.1/webapps/admin/js/standardista-table-sorting.js +434 -0
  244. data/apache-activemq-5.5.1/webapps/admin/message.jsp +185 -0
  245. data/apache-activemq-5.5.1/webapps/admin/network.jsp +52 -0
  246. data/apache-activemq-5.5.1/webapps/admin/queueConsumers.jsp +79 -0
  247. data/apache-activemq-5.5.1/webapps/admin/queueGraph.jsp +68 -0
  248. data/apache-activemq-5.5.1/webapps/admin/queues.jsp +78 -0
  249. data/apache-activemq-5.5.1/webapps/admin/scheduled.jsp +67 -0
  250. data/apache-activemq-5.5.1/webapps/admin/send.jsp +173 -0
  251. data/apache-activemq-5.5.1/webapps/admin/styles/prettify.css +44 -0
  252. data/apache-activemq-5.5.1/webapps/admin/styles/site.css +206 -0
  253. data/apache-activemq-5.5.1/webapps/admin/styles/sorttable.css +70 -0
  254. data/apache-activemq-5.5.1/webapps/admin/styles/type-settings.css +177 -0
  255. data/apache-activemq-5.5.1/webapps/admin/subscribers.jsp +158 -0
  256. data/apache-activemq-5.5.1/webapps/admin/test/dummy.jsp +52 -0
  257. data/apache-activemq-5.5.1/webapps/admin/test/index.jsp +84 -0
  258. data/apache-activemq-5.5.1/webapps/admin/test/systemProperties.jsp +53 -0
  259. data/apache-activemq-5.5.1/webapps/admin/topics.jsp +66 -0
  260. data/apache-activemq-5.5.1/webapps/admin/xml/queues.jsp +34 -0
  261. data/apache-activemq-5.5.1/webapps/admin/xml/topics.jsp +29 -0
  262. data/apache-activemq-5.5.1/webapps/demo/META-INF/LICENSE +494 -0
  263. data/apache-activemq-5.5.1/webapps/demo/META-INF/NOTICE +82 -0
  264. data/apache-activemq-5.5.1/webapps/demo/WEB-INF/web.xml +111 -0
  265. data/apache-activemq-5.5.1/webapps/demo/chat.css +76 -0
  266. data/apache-activemq-5.5.1/webapps/demo/chat.html +219 -0
  267. data/apache-activemq-5.5.1/webapps/demo/index.html +181 -0
  268. data/apache-activemq-5.5.1/webapps/demo/js/amq.js +307 -0
  269. data/apache-activemq-5.5.1/webapps/demo/js/amq_dojo_adapter.js +84 -0
  270. data/apache-activemq-5.5.1/webapps/demo/js/amq_jquery_adapter.js +88 -0
  271. data/apache-activemq-5.5.1/webapps/demo/js/amq_prototype_adapter.js +84 -0
  272. data/apache-activemq-5.5.1/webapps/demo/js/chat.js +209 -0
  273. data/apache-activemq-5.5.1/webapps/demo/js/dojo.js +16 -0
  274. data/apache-activemq-5.5.1/webapps/demo/js/jquery-1.4.2.min.js +154 -0
  275. data/apache-activemq-5.5.1/webapps/demo/js/prototype.js +4874 -0
  276. data/apache-activemq-5.5.1/webapps/demo/portfolio/portfolio.html +87 -0
  277. data/apache-activemq-5.5.1/webapps/demo/portfolio/portfolio.js +91 -0
  278. data/apache-activemq-5.5.1/webapps/demo/sandbox/index.html +31 -0
  279. data/apache-activemq-5.5.1/webapps/demo/sandbox/portfolio.html +93 -0
  280. data/apache-activemq-5.5.1/webapps/demo/sandbox/portfolio.js +49 -0
  281. data/apache-activemq-5.5.1/webapps/demo/sandbox/util.js +52 -0
  282. data/apache-activemq-5.5.1/webapps/demo/sandbox/webmq.js +149 -0
  283. data/apache-activemq-5.5.1/webapps/demo/send.html +51 -0
  284. data/apache-activemq-5.5.1/webapps/demo/style.css +440 -0
  285. data/apache-activemq-5.5.1/webapps/demo/test/amq_test.html +311 -0
  286. data/apache-activemq-5.5.1/webapps/demo/test/assets/README +4 -0
  287. data/apache-activemq-5.5.1/webapps/demo/test/assets/jsunittest.js +1017 -0
  288. data/apache-activemq-5.5.1/webapps/demo/test/assets/unittest.css +54 -0
  289. data/apache-activemq-5.5.1/webapps/favicon.ico +0 -0
  290. data/apache-activemq-5.5.1/webapps/fileserver/META-INF/LICENSE +203 -0
  291. data/apache-activemq-5.5.1/webapps/fileserver/META-INF/NOTICE +5 -0
  292. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/classes/org/apache/activemq/util/FilenameGuardFilter$GuardedHttpServletRequest.class +0 -0
  293. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/classes/org/apache/activemq/util/FilenameGuardFilter.class +0 -0
  294. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/classes/org/apache/activemq/util/IOHelper.class +0 -0
  295. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/classes/org/apache/activemq/util/RestFilter.class +0 -0
  296. data/apache-activemq-5.5.1/webapps/fileserver/WEB-INF/web.xml +56 -0
  297. data/apache-activemq-5.5.1/webapps/fileserver/index.html +30 -0
  298. data/apache-activemq-5.5.1/webapps/index.html +145 -0
  299. data/apache-activemq-5.5.1/webapps/styles/site.css +206 -0
  300. data/apache-activemq-5.5.1/webapps/styles/type-settings.css +177 -0
  301. data/lib/activemq.rb +11 -0
  302. metadata +382 -0
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements. See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License. You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import org.apache.activemq.broker.BrokerService;
18
+
19
+ /**
20
+ * This example demonstrates how to run an embedded broker inside your Java code
21
+ *
22
+ *
23
+ */
24
+ public final class EmbeddedBroker {
25
+
26
+ private EmbeddedBroker() {
27
+ }
28
+
29
+ public static void main(String[] args) throws Exception {
30
+ BrokerService broker = new BrokerService();
31
+ broker.setUseJmx(true);
32
+ broker.addConnector("tcp://localhost:61616");
33
+ broker.start();
34
+
35
+ // now lets wait forever to avoid the JVM terminating immediately
36
+ Object lock = new Object();
37
+ synchronized (lock) {
38
+ lock.wait();
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements. See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License. You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ import javax.jms.Connection;
19
+ import javax.jms.Message;
20
+ import javax.jms.MessageConsumer;
21
+ import javax.jms.MessageListener;
22
+ import javax.jms.Session;
23
+
24
+ import org.apache.activemq.ActiveMQConnectionFactory;
25
+ import org.apache.activemq.command.ActiveMQObjectMessage;
26
+ import org.apache.log4j.Logger;
27
+ import org.apache.log4j.spi.LoggingEvent;
28
+
29
+
30
+ /**
31
+ * A simple example of log4j jms appender in conjuction with ActiveMQ
32
+ */
33
+ public class Log4jJMSAppenderExample implements MessageListener {
34
+
35
+ public Log4jJMSAppenderExample() throws Exception {
36
+ // create a logTopic topic consumer
37
+ ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
38
+ Connection conn = factory.createConnection();
39
+ Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
40
+ conn.start();
41
+ MessageConsumer consumer = sess.createConsumer(sess.createTopic("logTopic"));
42
+ consumer.setMessageListener(this);
43
+ // log a message
44
+ Logger log = Logger.getLogger(Log4jJMSAppenderExample.class);
45
+ log.info("Test log");
46
+ // clean up
47
+ Thread.sleep(1000);
48
+ consumer.close();
49
+ sess.close();
50
+ conn.close();
51
+ System.exit(1);
52
+ }
53
+
54
+ public static void main(String[] args) throws Exception {
55
+ new Log4jJMSAppenderExample();
56
+ }
57
+
58
+ public void onMessage(Message message) {
59
+ try {
60
+ // receive log event in your consumer
61
+ LoggingEvent event = (LoggingEvent)((ActiveMQObjectMessage)message).getObject();
62
+ System.out.println("Received log [" + event.getLevel() + "]: "+ event.getMessage());
63
+ } catch (Exception e) {
64
+ e.printStackTrace();
65
+ }
66
+ }
67
+
68
+
69
+
70
+ }
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements. See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License. You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ import java.util.Arrays;
19
+ import java.util.HashSet;
20
+
21
+ import javax.jms.MessageListener;
22
+
23
+ /**
24
+ * A simple tool for producing and consuming messages
25
+ *
26
+ *
27
+ */
28
+ public class ProducerAndConsumerTool extends ConsumerTool implements MessageListener {
29
+
30
+ public static void main(String[] args) {
31
+
32
+ ConsumerTool consumerTool = new ConsumerTool();
33
+ String[] unknown = CommandLineSupport.setOptions(consumerTool, args);
34
+ HashSet<String> set1 = new HashSet<String>(Arrays.asList(unknown));
35
+
36
+ ProducerTool producerTool = new ProducerTool();
37
+ unknown = CommandLineSupport.setOptions(producerTool, args);
38
+ HashSet<String> set2 = new HashSet<String>(Arrays.asList(unknown));
39
+
40
+ set1.retainAll(set2);
41
+ if (set1.size() > 0) {
42
+ System.out.println("Unknown options: " + set1);
43
+ System.exit(-1);
44
+ }
45
+
46
+ consumerTool.run();
47
+ producerTool.run();
48
+
49
+ }
50
+
51
+ }
@@ -0,0 +1,247 @@
1
+ /**
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements. See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License. You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import java.util.Arrays;
18
+ import java.util.ArrayList;
19
+ import java.util.Date;
20
+ import java.util.Iterator;
21
+
22
+ import javax.jms.Connection;
23
+ import javax.jms.DeliveryMode;
24
+ import javax.jms.Destination;
25
+ import javax.jms.MessageProducer;
26
+ import javax.jms.Session;
27
+ import javax.jms.TextMessage;
28
+
29
+ import org.apache.activemq.ActiveMQConnection;
30
+ import org.apache.activemq.ActiveMQConnectionFactory;
31
+ import org.apache.activemq.util.IndentPrinter;
32
+
33
+ /**
34
+ * A simple tool for publishing messages
35
+ *
36
+ *
37
+ */
38
+ public class ProducerTool extends Thread {
39
+
40
+ private Destination destination;
41
+ private int messageCount = 10;
42
+ private long sleepTime;
43
+ private boolean verbose = true;
44
+ private int messageSize = 255;
45
+ private static int parallelThreads = 1;
46
+ private long timeToLive;
47
+ private String user = ActiveMQConnection.DEFAULT_USER;
48
+ private String password = ActiveMQConnection.DEFAULT_PASSWORD;
49
+ private String url = ActiveMQConnection.DEFAULT_BROKER_URL;
50
+ private String subject = "TOOL.DEFAULT";
51
+ private boolean topic;
52
+ private boolean transacted;
53
+ private boolean persistent;
54
+ private static Object lockResults = new Object();
55
+
56
+ public static void main(String[] args) {
57
+ ArrayList<ProducerTool> threads = new ArrayList();
58
+ ProducerTool producerTool = new ProducerTool();
59
+ String[] unknown = CommandLineSupport.setOptions(producerTool, args);
60
+ if (unknown.length > 0) {
61
+ System.out.println("Unknown options: " + Arrays.toString(unknown));
62
+ System.exit(-1);
63
+ }
64
+ producerTool.showParameters();
65
+ for (int threadCount = 1; threadCount <= parallelThreads; threadCount++) {
66
+ producerTool = new ProducerTool();
67
+ CommandLineSupport.setOptions(producerTool, args);
68
+ producerTool.start();
69
+ threads.add(producerTool);
70
+ }
71
+
72
+ while (true) {
73
+ Iterator<ProducerTool> itr = threads.iterator();
74
+ int running = 0;
75
+ while (itr.hasNext()) {
76
+ ProducerTool thread = itr.next();
77
+ if (thread.isAlive()) {
78
+ running++;
79
+ }
80
+ }
81
+ if (running <= 0) {
82
+ System.out.println("All threads completed their work");
83
+ break;
84
+ }
85
+ try {
86
+ Thread.sleep(1000);
87
+ } catch (Exception e) {
88
+ }
89
+ }
90
+ }
91
+
92
+ public void showParameters() {
93
+ System.out.println("Connecting to URL: " + url);
94
+ System.out.println("Publishing a Message with size " + messageSize + " to " + (topic ? "topic" : "queue") + ": " + subject);
95
+ System.out.println("Using " + (persistent ? "persistent" : "non-persistent") + " messages");
96
+ System.out.println("Sleeping between publish " + sleepTime + " ms");
97
+ System.out.println("Running " + parallelThreads + " parallel threads");
98
+
99
+ if (timeToLive != 0) {
100
+ System.out.println("Messages time to live " + timeToLive + " ms");
101
+ }
102
+ }
103
+
104
+ public void run() {
105
+ Connection connection = null;
106
+ try {
107
+ // Create the connection.
108
+ ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
109
+ connection = connectionFactory.createConnection();
110
+ connection.start();
111
+
112
+ // Create the session
113
+ Session session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
114
+ if (topic) {
115
+ destination = session.createTopic(subject);
116
+ } else {
117
+ destination = session.createQueue(subject);
118
+ }
119
+
120
+ // Create the producer.
121
+ MessageProducer producer = session.createProducer(destination);
122
+ if (persistent) {
123
+ producer.setDeliveryMode(DeliveryMode.PERSISTENT);
124
+ } else {
125
+ producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
126
+ }
127
+ if (timeToLive != 0) {
128
+ producer.setTimeToLive(timeToLive);
129
+ }
130
+
131
+ // Start sending messages
132
+ sendLoop(session, producer);
133
+
134
+ System.out.println("[" + this.getName() + "] Done.");
135
+
136
+ synchronized (lockResults) {
137
+ ActiveMQConnection c = (ActiveMQConnection) connection;
138
+ System.out.println("[" + this.getName() + "] Results:\n");
139
+ c.getConnectionStats().dump(new IndentPrinter());
140
+ }
141
+
142
+ } catch (Exception e) {
143
+ System.out.println("[" + this.getName() + "] Caught: " + e);
144
+ e.printStackTrace();
145
+ } finally {
146
+ try {
147
+ connection.close();
148
+ } catch (Throwable ignore) {
149
+ }
150
+ }
151
+ }
152
+
153
+ protected void sendLoop(Session session, MessageProducer producer) throws Exception {
154
+
155
+ for (int i = 0; i < messageCount || messageCount == 0; i++) {
156
+
157
+ TextMessage message = session.createTextMessage(createMessageText(i));
158
+
159
+ if (verbose) {
160
+ String msg = message.getText();
161
+ if (msg.length() > 50) {
162
+ msg = msg.substring(0, 50) + "...";
163
+ }
164
+ System.out.println("[" + this.getName() + "] Sending message: '" + msg + "'");
165
+ }
166
+
167
+ producer.send(message);
168
+
169
+ if (transacted) {
170
+ System.out.println("[" + this.getName() + "] Committing " + messageCount + " messages");
171
+ session.commit();
172
+ }
173
+ Thread.sleep(sleepTime);
174
+ }
175
+ }
176
+
177
+ private String createMessageText(int index) {
178
+ StringBuffer buffer = new StringBuffer(messageSize);
179
+ buffer.append("Message: " + index + " sent at: " + new Date());
180
+ if (buffer.length() > messageSize) {
181
+ return buffer.substring(0, messageSize);
182
+ }
183
+ for (int i = buffer.length(); i < messageSize; i++) {
184
+ buffer.append(' ');
185
+ }
186
+ return buffer.toString();
187
+ }
188
+
189
+ public void setPersistent(boolean durable) {
190
+ this.persistent = durable;
191
+ }
192
+
193
+ public void setMessageCount(int messageCount) {
194
+ this.messageCount = messageCount;
195
+ }
196
+
197
+ public void setMessageSize(int messageSize) {
198
+ this.messageSize = messageSize;
199
+ }
200
+
201
+ public void setPassword(String pwd) {
202
+ this.password = pwd;
203
+ }
204
+
205
+ public void setSleepTime(long sleepTime) {
206
+ this.sleepTime = sleepTime;
207
+ }
208
+
209
+ public void setSubject(String subject) {
210
+ this.subject = subject;
211
+ }
212
+
213
+ public void setTimeToLive(long timeToLive) {
214
+ this.timeToLive = timeToLive;
215
+ }
216
+
217
+ public void setParallelThreads(int parallelThreads) {
218
+ if (parallelThreads < 1) {
219
+ parallelThreads = 1;
220
+ }
221
+ this.parallelThreads = parallelThreads;
222
+ }
223
+
224
+ public void setTopic(boolean topic) {
225
+ this.topic = topic;
226
+ }
227
+
228
+ public void setQueue(boolean queue) {
229
+ this.topic = !queue;
230
+ }
231
+
232
+ public void setTransacted(boolean transacted) {
233
+ this.transacted = transacted;
234
+ }
235
+
236
+ public void setUrl(String url) {
237
+ this.url = url;
238
+ }
239
+
240
+ public void setUser(String user) {
241
+ this.user = user;
242
+ }
243
+
244
+ public void setVerbose(boolean verbose) {
245
+ this.verbose = verbose;
246
+ }
247
+ }
@@ -0,0 +1,257 @@
1
+ /**
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements. See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License. You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import java.util.Arrays;
18
+ import java.util.Date;
19
+
20
+ import javax.jms.Connection;
21
+ import javax.jms.DeliveryMode;
22
+ import javax.jms.Destination;
23
+ import javax.jms.Message;
24
+ import javax.jms.MessageConsumer;
25
+ import javax.jms.MessageProducer;
26
+ import javax.jms.Session;
27
+ import javax.jms.TextMessage;
28
+
29
+ import org.apache.activemq.ActiveMQConnection;
30
+ import org.apache.activemq.ActiveMQConnectionFactory;
31
+ import org.apache.activemq.util.IndentPrinter;
32
+
33
+ /**
34
+ * A simple tool for publishing messages
35
+ *
36
+ *
37
+ */
38
+ public class RequesterTool {
39
+
40
+ private int messageCount = 10;
41
+ private long sleepTime;
42
+ private boolean verbose = true;
43
+ private int messageSize = 255;
44
+ private long timeToLive;
45
+ private String subject = "TOOL.DEFAULT";
46
+ private String replySubject;
47
+ private boolean topic;
48
+ private String user = ActiveMQConnection.DEFAULT_USER;
49
+ private String password = ActiveMQConnection.DEFAULT_PASSWORD;
50
+ private String url = ActiveMQConnection.DEFAULT_BROKER_URL;
51
+ private boolean transacted;
52
+ private boolean persistent;
53
+ private String clientId;
54
+
55
+ private Destination destination;
56
+ private Destination replyDest;
57
+ private MessageProducer producer;
58
+ private MessageConsumer consumer;
59
+ private Session session;
60
+
61
+ public static void main(String[] args) {
62
+ RequesterTool requesterTool = new RequesterTool();
63
+ String[] unknown = CommandLineSupport.setOptions(requesterTool, args);
64
+ if (unknown.length > 0) {
65
+ System.out.println("Unknown options: " + Arrays.toString(unknown));
66
+ System.exit(-1);
67
+ }
68
+ requesterTool.run();
69
+ }
70
+
71
+ public void run() {
72
+
73
+ Connection connection = null;
74
+ try {
75
+
76
+ System.out.println("Connecting to URL: " + url);
77
+ System.out.println("Publishing a Message with size " + messageSize + " to " + (topic ? "topic" : "queue") + ": " + subject);
78
+ System.out.println("Using " + (persistent ? "persistent" : "non-persistent") + " messages");
79
+ System.out.println("Sleeping between publish " + sleepTime + " ms");
80
+
81
+ // Create the connection
82
+ ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
83
+ connection = connectionFactory.createConnection();
84
+ if (persistent && clientId != null && clientId.length() > 0 && !"null".equals(clientId)) {
85
+ connection.setClientID(clientId);
86
+ }
87
+ connection.start();
88
+
89
+ // Create the Session
90
+ session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
91
+
92
+ // And the Destinations..
93
+ if (topic) {
94
+ destination = session.createTopic(subject);
95
+ if (replySubject == null || replySubject.equals("")) {
96
+ replyDest = session.createTemporaryTopic();
97
+ } else {
98
+ replyDest = session.createTopic(replySubject);
99
+ }
100
+ } else {
101
+ destination = session.createQueue(subject);
102
+ if (replySubject == null || replySubject.equals("")) {
103
+ replyDest = session.createTemporaryQueue();
104
+ } else {
105
+ replyDest = session.createQueue(replySubject);
106
+ }
107
+ }
108
+ System.out.println("Reply Destination: " + replyDest);
109
+
110
+ // Create the producer
111
+ producer = session.createProducer(destination);
112
+ if (persistent) {
113
+ producer.setDeliveryMode(DeliveryMode.PERSISTENT);
114
+ } else {
115
+ producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
116
+ }
117
+ if (timeToLive != 0) {
118
+ System.out.println("Messages time to live " + timeToLive + " ms");
119
+ producer.setTimeToLive(timeToLive);
120
+ }
121
+
122
+ // Create the reply consumer
123
+ consumer = session.createConsumer(replyDest);
124
+
125
+ // Start sending reqests.
126
+ requestLoop();
127
+
128
+ System.out.println("Done.");
129
+
130
+ // Use the ActiveMQConnection interface to dump the connection
131
+ // stats.
132
+ ActiveMQConnection c = (ActiveMQConnection)connection;
133
+ c.getConnectionStats().dump(new IndentPrinter());
134
+
135
+ } catch (Exception e) {
136
+ System.out.println("Caught: " + e);
137
+ e.printStackTrace();
138
+ } finally {
139
+ try {
140
+ connection.close();
141
+ } catch (Throwable ignore) {
142
+ }
143
+ }
144
+ }
145
+
146
+ protected void requestLoop() throws Exception {
147
+
148
+ for (int i = 0; i < messageCount || messageCount == 0; i++) {
149
+
150
+ TextMessage message = session.createTextMessage(createMessageText(i));
151
+ message.setJMSReplyTo(replyDest);
152
+
153
+ if (verbose) {
154
+ String msg = message.getText();
155
+ if (msg.length() > 50) {
156
+ msg = msg.substring(0, 50) + "...";
157
+ }
158
+ System.out.println("Sending message: " + msg);
159
+ }
160
+
161
+ producer.send(message);
162
+ if (transacted) {
163
+ session.commit();
164
+ }
165
+
166
+ System.out.println("Waiting for reponse message...");
167
+ Message message2 = consumer.receive();
168
+ if (message2 instanceof TextMessage) {
169
+ System.out.println("Reponse message: " + ((TextMessage)message2).getText());
170
+ } else {
171
+ System.out.println("Reponse message: " + message2);
172
+ }
173
+ if (transacted) {
174
+ session.commit();
175
+ }
176
+
177
+ Thread.sleep(sleepTime);
178
+
179
+ }
180
+ }
181
+
182
+ /**
183
+ * @param i
184
+ * @return
185
+ */
186
+ private String createMessageText(int index) {
187
+ StringBuffer buffer = new StringBuffer(messageSize);
188
+ buffer.append("Message: " + index + " sent at: " + new Date());
189
+ if (buffer.length() > messageSize) {
190
+ return buffer.substring(0, messageSize);
191
+ }
192
+ for (int i = buffer.length(); i < messageSize; i++) {
193
+ buffer.append(' ');
194
+ }
195
+ return buffer.toString();
196
+ }
197
+
198
+ public void setClientId(String clientId) {
199
+ this.clientId = clientId;
200
+ }
201
+
202
+ public void setPersistent(boolean durable) {
203
+ this.persistent = durable;
204
+ }
205
+
206
+ public void setMessageCount(int messageCount) {
207
+ this.messageCount = messageCount;
208
+ }
209
+
210
+ public void setMessageSize(int messageSize) {
211
+ this.messageSize = messageSize;
212
+ }
213
+
214
+ public void setPassword(String password) {
215
+ this.password = password;
216
+ }
217
+
218
+ public void setSleepTime(long sleepTime) {
219
+ this.sleepTime = sleepTime;
220
+ }
221
+
222
+ public void setSubject(String subject) {
223
+ this.subject = subject;
224
+ }
225
+
226
+ public void setTimeToLive(long timeToLive) {
227
+ this.timeToLive = timeToLive;
228
+ }
229
+
230
+ public void setTopic(boolean topic) {
231
+ this.topic = topic;
232
+ }
233
+
234
+ public void setQueue(boolean queue) {
235
+ this.topic = !queue;
236
+ }
237
+
238
+ public void setTransacted(boolean transacted) {
239
+ this.transacted = transacted;
240
+ }
241
+
242
+ public void setUrl(String url) {
243
+ this.url = url;
244
+ }
245
+
246
+ public void setUser(String user) {
247
+ this.user = user;
248
+ }
249
+
250
+ public void setVerbose(boolean verbose) {
251
+ this.verbose = verbose;
252
+ }
253
+
254
+ public void setReplySubject(String replySubject) {
255
+ this.replySubject = replySubject;
256
+ }
257
+ }