pax_global_header00006660000000000000000000000064117575355460014534gustar00rootroot0000000000000052 comment=484fcfb3ecf89010918d6e6f0181705b1ed98697 activemq-5.6.0+dfsg/000077500000000000000000000000001175753554600142745ustar00rootroot00000000000000activemq-5.6.0+dfsg/.gitignore000066400000000000000000000004551175753554600162700ustar00rootroot00000000000000*~ *.swp .idea .idea/* *.iml *.ipr *.iws target .DS_Store .project .classpath .settings eclipse-classes activemq-core/ActiveMQConnections.dot activemq-core/KahaDB activemq-core/broker activemq-core/derby.log activemq-core/derbyDb activemq-core/networkedBroker activemq-core/shared activemq-data data/ activemq-5.6.0+dfsg/KEYS000066400000000000000000000550651175753554600150050ustar00rootroot00000000000000pub 1024D/F5BA7E4F 2006-02-10 uid Hiram Chirino sig 3 F5BA7E4F 2006-02-10 Hiram Chirino sub 1024g/6733C080 2006-02-10 sig F5BA7E4F 2006-02-10 Hiram Chirino -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.1 (Darwin) mQGiBEPspSsRBADdguKAxMQbA32vTQrCyONR6Zs/YGdvau2Zrr3SSSSR0Ge4FMjZ 4tzwpf6+32m4Bsf7YIwdLl0H5hI1CgT5gDl9kXvfaFUehFnwR+FDyiBRiyHjUpGF 4dgkQfWy9diYeWGtsvszsvWHXtED4SXb322StX4MfJj+YesA1iEdTiXK6wCg1QDa RucfjC+kx4zPsJwkJOgYpyMEAMTiXtNwQcke6nIFb/lb5374NjwwVAuuMTrRWLyq 5HodugEIHaw3EitQWtnFfXNkXTJZzS6t2HAGv29UTfhiBzKdkydgCkOk2MLWISOV fqcg0tNIp5ZJCmUHg3s+OFNSH4oUi65u+FyDseUid3OKtPI+ZhIk8N+DjOIg2Kvo /UALA/9q+WfBd7re+W3iUtU7TutUcwbKsjP+jpaJeUHg2ChOBxVfQKt4YlPHVdrR iCrfNi90Z8qbsZ0iAXuqexrfMq20pAPmpHRpe54mmP1CMT5m+Gq71eKIfkUrb3LC /zv08dLG2vm9oghd242wbcifaX+t7AhNAIpe/WTvQsB0gpdO4LQmSGlyYW0gQ2hp cmlubyA8aGlyYW1AaGlyYW1jaGlyaW5vLmNvbT6IWwQTEQIAGwUCQ+ylKwYLCQgH AwIDFQIDAxYCAQIeAQIXgAAKCRCf8lmA9bp+T/G/AKDM1QDs7il/CJhTycgDvE3c EOgUBwCfelsVK4sgBCooZptoaCCDgVtt71G5AQ0EQ+ylLhAEAJD25AWgwcNgBFKY svExQaGIojIGJyn4Cf/5U30cui/K7fIU7JtyNhKcfZdCrh2hKx+x3H/dTF6e0SrR hzKV7Dx0j76yhHHB1Ak25kjRxoU4Jk+CG0m+bRNTF9xz9k1ALSm3Y+A5RqNU10K6 e/5KsPuXMGSGoQgJ1H6g/i80Wf8PAAMFA/9mIxu7lMaqE1OE7EeAsHgLslNbi0h9 pjDUVNv8bc1Os2gBPaJD8B89EeheTHw6NMNIe75HVOpKk4UA0gvOBrxJqCr18yFJ BM5sIlaEmuJwZOW4dDGOR1oS5qgE9NzpmyKhE+fu/S1wmy0coL667+1xZcnrPbUF D4i7/aD1r8qJhohGBBgRAgAGBQJD7KUuAAoJEJ/yWYD1un5Pth0An0QEUs5cxpl8 zL5kZCj7c8MN8YZDAKDR9LTb6woveul50+uGtUl2fIH1uA== =RBPl -----END PGP PUBLIC KEY BLOCK----- pub 4096R/A2F9E313 2009-11-25 uid David Jencks (CODE SIGNING KEY) sig 3 A2F9E313 2009-11-25 David Jencks (CODE SIGNING KEY) sig 56F3E01B 2009-11-25 David Jencks (geronimo) sub 4096R/15B6F699 2009-11-25 sig A2F9E313 2009-11-25 David Jencks (CODE SIGNING KEY) -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.7 (Darwin) mQINBEsM0K0BEADsxU+6EeeFuENlLLYvEQrWZlqkRrbPARx8TSbFkIgIHKGv+yvx MGbXXA/PXdvOqQV3nVhNFPrRR3NpXF8vZg7Ud5IrOT39GxYDluaQVsU/g2cgQgJi EW8E3pzShlOPVcv1Eq/W8Tfx0DzvCL8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5qdWUNorBQARAQABiQIfBBgBCgAJBQJLDNCtAhsMAAoJEP7+ /tei+eMTKpcQANkxzN2hWXrKQpdqP8YDg8b9CVQwlv4SDp+tFQJiATFdBKFp1eSu 5ZoIokldRipfsLWOZl207DGrzCkYo/baufSzTiLdNQwryR1Jm6rq37WrCvxoxAtA sRRkS7+UFmDaiUBwGnKxjnPUbm6uGfRC3XRhxQHO3bLgY5WCtJ7JvD91cegWT8mQ 0hEijqHe7ymJXmPzWygr0qmAs+5v+o/UkDatfK1ycDETHIG4o45SKASL+HUiZXRS aH3zDA492gfNuo4u3/MgI5xwmPGLitWBsJurJ3DnT9OHkuCMV5/T7JCXFd0/9sTB FcbU2IldBjyWrXdlIIaY/T+1CSN8zNBzjVBcThCS2oewq6PeId6ifzv3e8SV2zBJ f33FWqTt/oDafKI8ug9qz3O5L0EDLQWxxkekTeFCOI0x8h7putaumoUM92plKx+J uaKbpRBO/D1/slqDgOIFVvTscVQHkeJ6eoari4CdBl0MaSh/HhNJjC/n/lPLm4nw uCU7ZzRdlm3wg11i05U5ik0CpRVuiRqq0YIRq4PPcBu4q37f1Kd+M9jfJkr9B0XY YdZuDlwDHJrZJqdpBlAe9RUFzDd9ZR8exDkQqVWZU7UG1aJJ7ZI+J1zViFJnQ3n5 5GxRRHPpa0uQg2B20/xYbO4lcC9co54UK1OAWiPNXzqCfvuELA6IUAcu =q1Bf -----END PGP PUBLIC KEY BLOCK----- pub 1024D/56F3E01B 2007-08-01 Key fingerprint = A48F ADE5 4FA5 6B93 FE66 EC17 A05E BEE6 56F3 E01B uid David Jencks (geronimo) sig 3 56F3E01B 2007-08-01 David Jencks (geronimo) sub 2048g/4E525FE0 2007-08-01 sig 56F3E01B 2007-08-01 David Jencks (geronimo) -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.7 (Darwin) mQGiBEawPygRBADKQe8iEQdS45n4jbSopR4XfDOLEVcxHHZBHrdj357vAZvSdgYI U738HNAX5INMHub1+pv/B2DpUk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Mgc4Dv9w3tpNNdi1TBPvEQfK0D7+8RbEtp1ssI3IM3EAjGt1fZ/EFO2IziIG3k+1 5JWU8tSlmUrzgWemJ+ogTR1eRDndsI2pHT2yf4KbTCtB/xh12HVTVOCi3M5Lx3cp gF+0WMV3wgzIEi59xmosJSCwC8bkETMSqtikEPt2hwk+cWYIQZ9/u9JB2Xrvqs+7 vDDZT9DrGUDtJNkAZ+fjU+V7jeVIfowsfVo6nQAVxrKcQ4PapplKWpqG9bFl8q4I zwADBQf/X5Bkepht9M3dfaGSs7RwbwJrVeOjmuoLJr59wsQu3yLzCPyBYETQzBFd FRKs4tQiv8NKeE8bLfBZNa23+RdS0HtNUT/sbiMDUOH/CeMVTptmYlFQDWicvBh9 fgswD4bE3prafIJmYcM2j0E0r17FCDjVojmllQslEz2FdS/UKHQOFynwr8wapH4B LJfKuxQek3vdCbmsBseKsTpn9rKJ0VbAmzGQtazstt0w1ag8I33Z63bMAwLf4+KI FXGtW0yf0uk3V2WNKo9SMhR6Qi0XC8CFSxtMIWMf4hscvzQpp4FNtRwS7A2Z69BL ZFcn94uoUEO2GAbXiedjxRckC6O1YohJBBgRAgAJBQJDnknHAhsMAAoJEP2e2fEX qlslx8MAoKM+DrO1U9eaph/nvzTxkUPjwOEfAKDWM5WWzi6UoysRPcQ7rlJCW58n qQ== =lxT7 -----END PGP PUBLIC KEY BLOCK----- pub 1024D/69CC103E 2008-09-04 uid Gary Tully (key for apache releases) sig 3 69CC103E 2008-09-04 Gary Tully (key for apache releases) sub 2048g/4700624C 2008-09-04 sig 69CC103E 2008-09-04 Gary Tully (key for apache releases) -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.6 (GNU/Linux) mQGiBEi/0oIRBAD3B1qa7X29fw5mS4uIUUwAmRo8ft1ZG05NXXDffHkliJ2YXxtD 7i/njkhw0DIpyP1TFKRtnFGJYGzde4rbc0imm6BXfT0WY1BRWIL0FsyFcqOauffQ fiRdnX1wnTIpwbH8548iDbZSTv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SGcE zgf7C9KB90x7fIThefsUhWO+TYb5CIDqE8QhUWqsbnP6IdTMij8LiGFxdG/BJPhO tPQzGc4Thnni63FHjY+zcKV5LM3ji8sI0mpqeYY+SH17amEM+rlFsu/gKcsytsM2 /CbW/4Sp68tQusVecCASSY/aKInyAZbEUaFus2KOMS9RbKSCfs7OPxxgXH09mQk6 Hwjj+FBnMXJbWRmqeDnYGo/tjU4CLLmsNMksnmLYcBo+q3idX6ALO+giEk728exV qn4vZohJBBgRAgAJBQJIv9KKAhsMAAoJEPE12+JpzBA+890An3hxMx8WFevHe6a8 kkdmWVT4/VQ8AKC2tL9ynro1zsvntXCE0pmSH96ibg== =tR92 -----END PGP PUBLIC KEY BLOCK----- pub 2048R/2C983957 2006-04-21 uid Bruce Snyder sig 3 2C983957 2008-04-10 Bruce Snyder uid Bruce Snyder sig 3 2C983957 2006-04-21 Bruce Snyder -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.10 (Darwin) mQELBERJPzYBCACxRfC0PROVsuErkKAtaCgAtvdCmF61cnC16s7m95r+KO9scznf nMKsjDj/xBcf+A3Hu0cizpSomgTe6GAW4ZLvrMbAsrAVkqkLoa03JDWykjBAibNZ 1lTf441u6jX4h0z6pGDw0PDpjL99ybJicBQgIA76cXyXHwbNV7X0z6LwiUcQLvZM y+tnlXrsk6stiLXsPXh5y0Rqnz7PLFzBk4gxjxYCV7XmEV1lBisFR/hXT7wPnJQR x8JH4TPG3QAEH5gA+TNxnr3QO0PdQRATQ5nVaqQ50mtG80EahohovfMQp4lIJCZq i2wJNxN2fv8dzGq3kBpmB7C1vCA7HaljParPAAYptCVCcnVjZSBTbnlkZXIgPGJy dWNlLnNueWRlckBnbWFpbC5jb20+iQE2BBMBAgAgBQJEST82AhsDBgsJCAcDAgQV AggDBBYCAwECHgECF4AACgkQ/upbIyyYOVctjwf+J0NbBP6kBDQOZmYoVlosPsY5 tpvINO89Bx3vgzIh8U4xnzztzMqtz72kvVC7Kr0K67pMJHu+1aPAxwpEkGtKgu8F XuQf4NqNpe8GkYTAuoNAh5SRn5Uj/Y6V6maQ8Ww4YMvVaaI3tbBjaOndfdLXxVdG i5t1WXQqxd0D/pti8uqwCrqrbyCR3zCV9OASolAGqq/9whuDR0UAVSfhW5JmPbIQ eQepyGBt2U5cQpzbB3J/5IEKxFWED94pEs5NtYTCzAaRdHDEDMqS1x1sosnQehbg m5J70/2ykza7DT0fpMcMgtMPCSDUdKBrS9V/2sdqk1UzK7N2DmlO0i998eXksLQh QnJ1Y2UgU255ZGVyIDxic255ZGVyQGFwYWNoZS5vcmc+iQE2BBMBAgAgBQJH/jgb AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ/upbIyyYOVecJQf9G4DCKkut xyeyEr5ThxXwlomScx7sncoH8hKmjnru3gyx+u55vayDXVvL2PbI30sN575CAW+i 8IAbrDcbmgqlgM42LJcZvAyLirq0Mt779qaai/p58wFwbtKS8mAPPjrh6dLCvcAX Cg/sxNQMUhQDR+JTTmJSGADHRafZo6RY/jL1ptKX/2Dx6x7Ua/SCQL5bTLxJ/owL nTzrf69UaOPSrIdAXmnNIeysSuqIfzTq3aakEh05vY0LPJ4/VjO5H1RAAgNLSKsW o1gqHiKSDpHv47c8vi9BtjlKUsuV4gvdXYTqxqF++GoJ+LFJ6TpZILnCP+5We9jo vdvvY9eS2HTMVw== =nJYJ -----END PGP PUBLIC KEY BLOCK----- pub 1024D/6852C7DA 2005-05-12 [expires: 2010-05-11] uid Dejan Bosanac sub 2048g/934A81F9 2005-05-12 [expires: 2010-05-11] -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.9 (Darwin) mQGiBEKDhQ4RBADTLB9GqCPVZQs5MVAy9l+FGOh2Yc9BUiPyDX11xzRE2wFUTi3s MGiBwkySkJtWqZbEpLd572LbFcaO6rql1s8dlOq5Wa8h4qBb3FkTgMYm8bALIRdm nvWDNAT/uFtA/hVat7T5PTp/ImSDT8tBOuv8m7b1rAR8X0d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YgcUo0MAAwYIAJQBptZLCuCib03S2HesX53tsyzJoqPF+LVJW3Yl+dJB qjTgoruYCKysOw9LzCTijilT6VnCgZW5FzKwexFQA4rHkXfnssxXTf1M2yyZXQKP SileY3GAfPJSGUVv2205DKFAgeoVy/1PiRill0DUU30ubFvdTHcTCbOA3KCXdogY 8MiYkSZzptz7MzQ+0hraUMsPRPph4uooTwMfWMM6j+/jiJQNZk/vkCGWCfmvy/PY qxyJZn1ub1KOe9S8AvaEoovCE+6hIpLcq6mISYyIFllivCT3geG3ZcUK3Yy1oZe8 zZ6T1biGO/h/Rca7lWdQ/+s91uOLX7uuZoXOzDbNaouITAQYEQIADAUCQoOFGgUJ CWYBgAAKCRDDGj9waFLH2mswAJ980Y4gq1GjgFh5Ia7xb5G7kvtvCQCfW+L7EGrR O5WIEMQfbBko9c9h01M= =zltt -----END PGP PUBLIC KEY BLOCK----- pub 1024D/BACB8793 2010-08-03 uid Dejan Bosanac sub 2048g/8DCB6C83 2010-08-03 -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.9 (Darwin) mQGiBExX8rERBACdLseBul1eQb1NAfpJKWid8nW9CS/kMIuzASfcii7x/Aqs5bio S5FRsQDPXmkNubvsauYziLBi05mPynax+bnpfnVkLU0M1IyLBcnFERvIXSVT5l41 KMbzKf8na8hX6nKzOkzhyC8E7H46x0LYSJh0J5erE3DqdbNHK2tbm1ZHlwCg1Qg8 Gp6jy0/uCfE5o4k/ZP5ynLUEAIy8Pjb+jOZzo+C7npOwwActEFFvsmSL7nnXLVDk D7pDWg6VgMT9mGsHX3tXcujWCKAtloNFP+Iaa/jaJvOSEwFf277ZMUMqBLMIsw90 4N3IHbBtySYekJpiXXU1iBxXXq76BSLza9GN19xqa61mtvP//+1VRzYpTKP1C1zV gUU9A/9wNrK6XRAmD3BiB94C+5Yap5Rc582DtP4bGwAsRYv/ZVVclk9MoR/oIdIH Gg45e20J3n+tcJH0mYkZGwHDEMoF3oPhDMmPTjHbO4g6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MV/KxAhsMAAoJEGLtTfC6y4eT8PgAoMJsdRXIIxwFV/pz glfZ+7J4EVsFAJ442wwYi+zDKNIRFGXY1APsoq85wA== =RMPC -----END PGP PUBLIC KEY BLOCK----- pub 4096R/6A70C608 2009-06-10 Fingerprint=4AAC 7338 D125 F866 4167 6AF6 1522 6672 6A70 C608 uid Hadrian Zbarcea sig sig3 6A70C608 2009-06-10 __________ __________ [selfsig] sig sig B4493B94 2009-06-10 __________ __________ Guillaume Nodet -----BEGIN PGP PUBLIC KEY BLOCK----- Version: SKS 1.1.0 mQINBEovye4BEADGv4ARt7Pt53QECZeMdbTb3Jdivxl+sX7pBK2B529Z2hkmPhl9q/pj1HrV I6rE8DqD7go/Q9n8KmX6c6UQas0PSUAZIaJdfLsIodMCFG1EIL6ctUqRrzFuV2i7Q9pFQvsC hd0GPf6dwdRSLJBc567+BTjuVBHn6KX69azo4a5qdUEQ5uceqVETGaWkXOgcveNg35QOAQPY rnkPIYVzU00yBCMIXTqeYQq/psFYUbndklXAaMjkkHyuW24pZgdcTkf8LWVZ/nGPpWWd2bYv tBL3cK30UF1xD/HqJ0qL+a4KnthXbZvHl+UNgcmj382BsMVDtMh+O8SbX3D1WqP4NdLl89Ib 7f5CqfMK1vKItteFNIMfl3ukhMU1NoN/8SwAYYLtXMzsBW0c+YBELinYPFzHdBJVMzuX1Ffl Jdmxjs5Z6nT7FTSD8b74JrdfpDVDP7yYjN9xgJ7TG9NHSzBpV3/8APrVybmQwrdMRw2Mp0LM 5ccVt+Gk3HqacD58FEsdTyF6BFvvFaXxYBvAq0TDoy7FfsVS3Dsj2bnsIKtxYLAS46BnYa80 FvotU3KsnBqc+bYIR+cx+1gJ3gcKvAweQOAf6Gf0M4JyIjOW6QeQiu2E5+zRGk4UC9Aul1Jd nRjCUpEn46Lm8kGZGkBylm7ij/cGpoHLzIgOWeU7mtwUzUVnTQARAQABtCRIYWRyaWFuIFpi YXJjZWEgPGhhZHJpYW5AYXBhY2hlLm9yZz6IRgQ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V+aYnuuHqie8Ywnh30dws8EFRzckcq+nUSM0e3zfPvK0r98WntAGKuFPZ zyukYmrD62v+HepLN8meDlEJMQJWKpCLp6SYwnBBxGY3rUpkbuoZ/vNbuBYWdyHcq3dxHEu5 HzSpeZz97HtFnC/bNqM= =H3nh -----END PGP PUBLIC KEY BLOCK----- activemq-5.6.0+dfsg/LICENSE000077500000000000000000002106461175753554600153150ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- activemq-xmpp ========================================================================= == For the Jabber Software Foundation XSDs == ========================================================================= Attribution 2.5 CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. 1. Definitions 1. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. 2. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. 3. "Licensor" means the individual or entity that offers the Work under the terms of this License. 4. "Original Author" means the individual or entity who created the Work. 5. "Work" means the copyrightable work of authorship offered under the terms of this License. 6. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. 2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. 3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: 1. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; 2. to create and reproduce Derivative Works; 3. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; 4. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. 5. For the avoidance of doubt, where the work is a musical composition: 1. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. 2. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). 6. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. 4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: 1. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(b), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(b), as requested. 2. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. 5. Representations, Warranties and Disclaimer UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. Termination 1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. 2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. 8. Miscellaneous 1. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. 2. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. 3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. 4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. 5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. Creative Commons may be contacted at http://creativecommons.org/. -- activemq-web ========================================================================= == For the behaviour.js library == ========================================================================= Copyright (c) 2005, Ben Nolan All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Ben Nolan nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ========================================================================= == For the prototype.js library == ========================================================================= Copyright (c) 2005 Sam Stephenson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --activemq-web-demo ========================================================================= == For the scriptaculous.js library == ========================================================================= // Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ========================================================================= == For the style.css library == == For the common.js library == =========================================================================

License

THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.

1. Definitions

  1. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.
  2. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.
  3. "Licensor" means the individual or entity that offers the Work under the terms of this License.
  4. "Original Author" means the individual or entity who created the Work.
  5. "Work" means the copyrightable work of authorship offered under the terms of this License.
  6. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.

2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.

3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:

  1. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;
  2. to create and reproduce Derivative Works;
  3. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;
  4. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.
  5. For the avoidance of doubt, where the work is a musical composition:

    1. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.
    2. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).
  6. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).

The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.

4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:

  1. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(b), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(b), as requested.
  2. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.

5. Representations, Warranties and Disclaimer

UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. Termination

  1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
  2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneous

  1. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
  2. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
  3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
  4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
  5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
--activemq-web-console ========================================================================= == For the MochiKit library == ========================================================================= MochiKit is dual-licensed software. It is available under the terms of the MIT License, or the Academic Free License version 2.1. The full text of each license is included below. MIT License =========== Copyright (c) 2005 Bob Ippolito. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Academic Free License v. 2.1 ============================ Copyright (c) 2005 Bob Ippolito. All rights reserved. This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work: Licensed under the Academic Free License version 2.1 1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license to do the following: a) to reproduce the Original Work in copies; b) to prepare derivative works ("Derivative Works") based upon the Original Work; c) to distribute copies of the Original Work and Derivative Works to the public; d) to perform the Original Work publicly; and e) to display the Original Work publicly. 2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, to make, use, sell and offer for sale the Original Work and Derivative Works. 3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor hereby agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work, and by publishing the address of that information repository in a notice immediately following the copyright notice that applies to the Original Work. 4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior written permission of the Licensor. Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor except as expressly stated herein. No patent license is granted to make, use, sell or offer to sell embodiments of any patent claims other than the licensed claims defined in Section 2. No right is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any Original Work that Licensor otherwise would have a right to license. 5) This section intentionally omitted. 6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately proceeding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to Original Work is granted hereunder except under this disclaimer. 8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to any person for any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to liability for death or personal injury resulting from Licensor's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. 9) Acceptance and Termination. If You distribute copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. Nothing else but this License (or another written agreement between Licensor and You) grants You permission to create Derivative Works based upon the Original Work or to exercise any of the rights granted in Section 1 herein, and any attempt to do so except under the terms of this License (or another written agreement between Licensor and You) is expressly prohibited by U.S. copyright law, the equivalent laws of other countries, and by international treaty. Therefore, by exercising any of the rights granted to You in Section 1 herein, You indicate Your acceptance of this License and all of its terms and conditions. 10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. 11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of the U.S. Copyright Act, 17 U.S.C. ¤ 101 et seq., the equivalent laws of other countries, and international treaty. This section shall survive the termination of this License. 12) Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. 13) Miscellaneous. This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. 14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. Permission is hereby granted to copy and distribute this license without modification. This license may not be modified without the express written permission of its copyright owner. ========================================================================= == For the Plotkit library == ========================================================================= Copyright (c) 2006, Alastair Tse All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Alastair Tse nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ========================================================================= == For the iecanvas.htc library == ========================================================================= |-----------------------------------------------------------------------------| | Copyright (c) 2005 Emil A Eklund | |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| | This program is free software; you can redistribute it and/or modify it | | under the terms of the MIT License. | |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| | Permission is hereby granted, free of charge, to any person obtaining a | | copy of this software and associated documentation files (the "Software"), | | to deal in the Software without restriction, including without limitation | | the rights to use, copy, modify, merge, publish, distribute, sublicense, | | and/or sell copies of the Software, and to permit persons to whom the | | Software is furnished to do so, subject to the following conditions: | | The above copyright notice and this permission notice shall be included in | | all copies or substantial portions of the Software. | |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | | DEALINGS IN THE SOFTWARE. | |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| ========================================================================= == For the standardista-table-sorting.js library == == For the css.js library == ========================================================================= /** * Copyright (c) 2006 Neil Crosby * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. **/ ========================================================================= == For the style.css library == == For the common.js library == =========================================================================

License

THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.

1. Definitions

  1. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.
  2. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.
  3. "Licensor" means the individual or entity that offers the Work under the terms of this License.
  4. "Original Author" means the individual or entity who created the Work.
  5. "Work" means the copyrightable work of authorship offered under the terms of this License.
  6. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.

2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.

3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:

  1. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;
  2. to create and reproduce Derivative Works;
  3. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;
  4. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.
  5. For the avoidance of doubt, where the work is a musical composition:

    1. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.
    2. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).
  6. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).

The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.

4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:

  1. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(b), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(b), as requested.
  2. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.

5. Representations, Warranties and Disclaimer

UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. Termination

  1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
  2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneous

  1. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
  2. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
  3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
  4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
  5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
activemq-5.6.0+dfsg/NOTICE000066400000000000000000000034161175753554600152040ustar00rootroot00000000000000Apache ActiveMQ Copyright 2005-2009 Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). ------------- Jabber xsds in activemq-xmpp This software was generated using XSDs from the Jabber Software Foundation http://www.xmpp.org/schemas/ Copyright (c) 1999-2006 The Jabber Software Foundation http://www.xmpp.org/about/copyright.shtml These XSD files are licensed under the Creative Commons License 2.5 http://creativecommons.org/licenses/by/2.5/ ============================================================== Jetty Web Container Copyright 1995-2006 Mort Bay Consulting Pty Ltd ============================================================== This product includes some software developed at The Apache Software Foundation (http://www.apache.org/). The javax.servlet package used by Jetty is copyright Sun Microsystems, Inc and Apache Software Foundation. It is distributed under the Common Development and Distribution License. You can obtain a copy of the license at https://glassfish.dev.java.net/public/CDDLv1.0.html. The UnixCrypt.java code ~Implements the one way cryptography used by Unix systems for simple password protection. Copyright 1996 Aki Yoshida, modified April 2001 by Iris Van den Broeke, Daniel Deville. The default JSP implementation is provided by the Glassfish JSP engine from project Glassfish http://glassfish.dev.java.net. Copyright 2005 Sun Microsystems, Inc. and portions Copyright Apache Software Foundation. Some portions of the code are Copyright: 2006 Tim Vernum 1999 Jason Gilbert. The jboss integration module contains some LGPL code. This product includes software developed by Yahoo! Inc. (www.yahoo.com) Copyright (c) 2010 Yahoo! Inc. All rights reserved. activemq-5.6.0+dfsg/README.txt000077500000000000000000000050271175753554600160010ustar00rootroot00000000000000Welcome to Apache ActiveMQ ======================================================================= Apache ActiveMQ is a high performance Apache 2.0 licensed Message Broker and JMS 1.1 implementation. Getting Started =============== To help you get started, try the following links:- Getting Started http://activemq.apache.org/getting-started.html Building http://activemq.apache.org/getting-started.html#GettingStarted-WindowsSourceInstallation http://activemq.apache.org/getting-started.html#GettingStarted-UnixSourceInstallation Examples http://activemq.apache.org/examples.html We welcome contributions of all kinds, for details of how you can help http://activemq.apache.org/contributing.html Please refer to the website for details of finding the issue tracker, email lists, wiki or IRC channel at http://activemq.apache.org/ Please help us make Apache ActiveMQ better - we appreciate any feedback you may have. Enjoy! Licensing ======================================================================= This software is licensed under the terms you may find in the file named "LICENSE.txt" in this directory. This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See for more information. The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code. The following provides more details on the included cryptographic software: ActiveMQ supports the use of SSL TCP connections when used with with a JVM supporting the Java Cryptography extensions . ActiveMQ does not include these libraries itself, but is designed to use them. activemq-5.6.0+dfsg/activemq-all/000077500000000000000000000000001175753554600166535ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-all/pom.xml000066400000000000000000000126741175753554600202020ustar00rootroot00000000000000 4.0.0 org.apache.activemq activemq-parent 5.6.0 activemq-all jar ActiveMQ :: Jar Bundle Puts together an ActiveMQ jar bundle ${project.groupId} activemq-camel ${project.groupId} activemq-console ${project.groupId} activemq-optional ${project.groupId} kahadb org.apache.geronimo.specs geronimo-annotation_1.0_spec org.slf4j slf4j-log4j12 org.apache.maven.plugins maven-shade-plugin ${maven-shade-plugin-version} package shade ${project.groupId}:activemq-camel ${project.groupId}:activemq-core ${project.groupId}:activemq-console ${project.groupId}:activemq-jaas ${project.groupId}:activemq-optional ${project.groupId}:kahadb org.apache.geronimo.specs:geronimo-jms_1.1_spec org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec org.apache.geronimo.specs:geronimo-annotation_1.0_spec org.slf4j:slf4j-api org.slf4j:slf4j-log4j12 log4j:log4j Apache ActiveMQ META-INF/spring.handlers META-INF/services/com.sun.tools.xjc.Plugin META-INF/spring.schemas deploy deploy org.apache.maven.plugins maven-source-plugin 2.1.2 false attach-sources jar activemq-5.6.0+dfsg/activemq-blueprint/000077500000000000000000000000001175753554600201075ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-blueprint/pom.xml000066400000000000000000000053041175753554600214260ustar00rootroot00000000000000 4.0.0 org.apache.activemq activemq-parent 5.6.0 activemq-blueprint bundle ActiveMQ :: Blueprint The ActiveMQ Message Broker and Client implementations org.apache.xbean*;version="[3.7,4)", * org.apache.aries.blueprint org.apache.aries.blueprint ${aries-version} org.apache.xbean xbean-blueprint ${xbean-version} org.apache.felix maven-bundle-plugin org.apache.activemq.activemq-core maven-resources-plugin maven-install-plugin ${maven-install-plugin-version} activemq-5.6.0+dfsg/activemq-blueprint/src/000077500000000000000000000000001175753554600206765ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-blueprint/src/main/000077500000000000000000000000001175753554600216225ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-blueprint/src/main/resources/000077500000000000000000000000001175753554600236345ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-blueprint/src/main/resources/OSGI-INF/000077500000000000000000000000001175753554600250075ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-blueprint/src/main/resources/OSGI-INF/blueprint/000077500000000000000000000000001175753554600270135ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-blueprint/src/main/resources/OSGI-INF/blueprint/activemq-blueprint.xml000066400000000000000000000030251175753554600333500ustar00rootroot00000000000000 activemq-5.6.0+dfsg/activemq-camel/000077500000000000000000000000001175753554600171645ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/pom.xml000077500000000000000000000153761175753554600205200ustar00rootroot00000000000000 4.0.0 org.apache.activemq activemq-parent 5.6.0 activemq-camel bundle ActiveMQ :: Camel ActiveMQ component for Camel org.apache.activemq.pool;resolution:=optional, javax.annotation*;resolution:=optional, com.thoughtworks.xstream*;resolution:=optional, org.apache.activeio*;resolution:=optional, org.apache.camel*;version="[2,3)";resolution:=optional, org.apache.commons.pool*;resolution:=optional, org.apache.derby*;resolution:=optional, org.apache.tools.ant*;resolution:=optional, org.apache.xbean*;resolution:=optional, '=org.apache.xbean.spring.context.v2;resolution:=optional', org.apache.xpath*;resolution:=optional, org.codehaus.jam*;resolution:=optional, org.springframework*;resolution:=optional, org.springframework.beans.factory.xml;resolution:=optional, org.w3c.dom.traversal*;resolution:=optional, * org.apache.activemq.camel*;version=${project.version};-noimport:=true org.slf4j slf4j-api org.apache.camel camel-jms ${project.groupId} activemq-core ${project.groupId} activemq-pool true org.apache.geronimo.specs geronimo-annotation_1.0_spec true ${project.groupId} activemq-core test-jar test org.apache.camel camel-test test org.springframework spring-test test junit junit test org.hamcrest hamcrest-all test org.apache.derby derby true test org.apache.xbean xbean-spring true test org.apache.geronimo.components geronimo-transaction true test org.objectweb.howl howl 1.0.1-1 true test org.apache.openejb openejb-core 3.1.2 true test org.jencks jencks 2.2 true test ${project.groupId} activemq-spring true test ${project.groupId} activemq-ra true test org.jencks jencks-amqpool 2.2 true test org.apache.camel camel-jdbc ${camel-version} true test org.slf4j slf4j-log4j12 test log4j log4j true test maven-surefire-plugin pertest false true -Xmx512M org.apache.activemq.default.directory.prefix target/ activemq-5.6.0+dfsg/activemq-camel/src/000077500000000000000000000000001175753554600177535ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/000077500000000000000000000000001175753554600206775ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/000077500000000000000000000000001175753554600216205ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/000077500000000000000000000000001175753554600224075ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/000077500000000000000000000000001175753554600236305ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/000077500000000000000000000000001175753554600254415ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/000077500000000000000000000000001175753554600265225ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/CamelConnection.java000066400000000000000000000032771175753554600324370ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.management.JMSStatsImpl; import org.apache.activemq.transport.Transport; import org.apache.activemq.util.IdGenerator; import org.apache.camel.CamelContext; import org.apache.camel.CamelContextAware; /** * */ public class CamelConnection extends ActiveMQConnection implements CamelContextAware { private CamelContext camelContext; protected CamelConnection(Transport transport, IdGenerator clientIdGenerator, IdGenerator connectionIdGenerator, JMSStatsImpl factoryStats) throws Exception { super(transport, clientIdGenerator, connectionIdGenerator, factoryStats); } public CamelContext getCamelContext() { return camelContext; } public void setCamelContext(CamelContext camelContext) { this.camelContext = camelContext; } } CamelConnectionFactory.java000066400000000000000000000041701175753554600337010ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import org.apache.activemq.management.JMSStatsImpl; import org.apache.activemq.spring.ActiveMQConnectionFactory; import org.apache.activemq.transport.Transport; import org.apache.camel.CamelContext; import org.apache.camel.CamelContextAware; /** * A JMS ConnectionFactory which resolves non-JMS destinations or instances of * {@link CamelDestination} to use the {@link CamelContext} to perform smart routing etc * * */ public class CamelConnectionFactory extends ActiveMQConnectionFactory implements CamelContextAware { private CamelContext camelContext; public CamelConnectionFactory() { } public CamelContext getCamelContext() { return camelContext; } public void setCamelContext(CamelContext camelContext) { this.camelContext = camelContext; } // Implementation methods //----------------------------------------------------------------------- protected CamelConnection createActiveMQConnection(Transport transport, JMSStatsImpl stats) throws Exception { CamelConnection connection = new CamelConnection(transport, getClientIdGenerator(), getConnectionIdGenerator(), stats); CamelContext context = getCamelContext(); if (context != null) { connection.setCamelContext(context); } return connection; } } activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/CamelDestination.java000066400000000000000000000130541175753554600326130ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import javax.jms.JMSException; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.QueueReceiver; import javax.jms.QueueSender; import javax.jms.TopicPublisher; import javax.jms.TopicSubscriber; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQSession; import org.apache.activemq.CustomDestination; import org.apache.camel.CamelContext; import org.apache.camel.CamelContextAware; import org.apache.camel.Endpoint; import org.apache.camel.component.jms.JmsBinding; import org.apache.camel.component.jms.JmsEndpoint; /** * */ public class CamelDestination implements CustomDestination, CamelContextAware { private String uri; private Endpoint endpoint; private CamelContext camelContext; // add in dummy endpoint pending camel release with // https://issues.apache.org/activemq/browse/CAMEL-1982 private JmsBinding binding = new JmsBinding(new JmsEndpoint()); public CamelDestination() { } public CamelDestination(String uri) { this.uri = uri; } public String toString() { return uri.toString(); } // CustomDestination interface //----------------------------------------------------------------------- public MessageConsumer createConsumer(ActiveMQSession session, String messageSelector) { return createConsumer(session, messageSelector, false); } public MessageConsumer createConsumer(ActiveMQSession session, String messageSelector, boolean noLocal) { return new CamelMessageConsumer(this, resolveEndpoint(session), session, messageSelector, noLocal); } public TopicSubscriber createSubscriber(ActiveMQSession session, String messageSelector, boolean noLocal) { return createDurableSubscriber(session, null, messageSelector, noLocal); } public TopicSubscriber createDurableSubscriber(ActiveMQSession session, String name, String messageSelector, boolean noLocal) { throw new UnsupportedOperationException("This destination is not a Topic: " + this); } public QueueReceiver createReceiver(ActiveMQSession session, String messageSelector) { throw new UnsupportedOperationException("This destination is not a Queue: " + this); } // Producers //----------------------------------------------------------------------- public MessageProducer createProducer(ActiveMQSession session) throws JMSException { return new CamelMessageProducer(this, resolveEndpoint(session), session); } public TopicPublisher createPublisher(ActiveMQSession session) throws JMSException { throw new UnsupportedOperationException("This destination is not a Topic: " + this); } public QueueSender createSender(ActiveMQSession session) throws JMSException { throw new UnsupportedOperationException("This destination is not a Queue: " + this); } // Properties //----------------------------------------------------------------------- public String getUri() { return uri; } public void setUri(String uri) { this.uri = uri; } public Endpoint getEndpoint() { return endpoint; } public void setEndpoint(Endpoint endpoint) { this.endpoint = endpoint; } public CamelContext getCamelContext() { return camelContext; } public void setCamelContext(CamelContext camelContext) { this.camelContext = camelContext; } public JmsBinding getBinding() { return binding; } public void setBinding(JmsBinding binding) { this.binding = binding; } // Implementation methods //----------------------------------------------------------------------- /** * Resolves the Camel Endpoint for this destination * * @return */ protected Endpoint resolveEndpoint(ActiveMQSession session) { Endpoint answer = getEndpoint(); if (answer == null) { answer = resolveCamelContext(session).getEndpoint(getUri()); if (answer == null) { throw new IllegalArgumentException("No endpoint could be found for URI: " + getUri()); } } return answer; } protected CamelContext resolveCamelContext(ActiveMQSession session) { CamelContext answer = getCamelContext(); if (answer == null) { ActiveMQConnection connection = session.getConnection(); if (connection instanceof CamelConnection) { CamelConnection camelConnection = (CamelConnection) connection; answer = camelConnection.getCamelContext(); } } if (answer == null) { throw new IllegalArgumentException("No CamelContext has been configured"); } return answer; } } activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/CamelMessageConsumer.java000066400000000000000000000127741175753554600334420ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import javax.jms.IllegalStateException; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageConsumer; import javax.jms.MessageListener; import org.apache.activemq.ActiveMQSession; import org.apache.activemq.util.JMSExceptionSupport; import org.apache.camel.Consumer; import org.apache.camel.Endpoint; import org.apache.camel.Exchange; import org.apache.camel.PollingConsumer; import org.apache.camel.Processor; /** * A JMS {@link javax.jms.MessageConsumer} which consumes message exchanges from * a Camel {@link Endpoint} * * */ public class CamelMessageConsumer implements MessageConsumer { private final CamelDestination destination; private final Endpoint endpoint; private final ActiveMQSession session; private final String messageSelector; private final boolean noLocal; private MessageListener messageListener; private Consumer consumer; private PollingConsumer pollingConsumer; private boolean closed; public CamelMessageConsumer(CamelDestination destination, Endpoint endpoint, ActiveMQSession session, String messageSelector, boolean noLocal) { this.destination = destination; this.endpoint = endpoint; this.session = session; this.messageSelector = messageSelector; this.noLocal = noLocal; } public void close() throws JMSException { if (!closed) { closed = true; try { if (consumer != null) { consumer.stop(); } if (pollingConsumer != null) { pollingConsumer.stop(); } } catch (JMSException e) { throw e; } catch (Exception e) { throw JMSExceptionSupport.create(e); } } } public MessageListener getMessageListener() throws JMSException { return messageListener; } public void setMessageListener(MessageListener messageListener) throws JMSException { this.messageListener = messageListener; if (messageListener != null && consumer == null) { consumer = createConsumer(); } } public Message receive() throws JMSException { Exchange exchange = getPollingConsumer().receive(); return createMessage(exchange); } public Message receive(long timeoutMillis) throws JMSException { Exchange exchange = getPollingConsumer().receive(timeoutMillis); return createMessage(exchange); } public Message receiveNoWait() throws JMSException { Exchange exchange = getPollingConsumer().receiveNoWait(); return createMessage(exchange); } // Properties // ----------------------------------------------------------------------- public CamelDestination getDestination() { return destination; } public Endpoint getEndpoint() { return endpoint; } public String getMessageSelector() { return messageSelector; } public boolean isNoLocal() { return noLocal; } public ActiveMQSession getSession() { return session; } // Implementation methods // ----------------------------------------------------------------------- protected PollingConsumer getPollingConsumer() throws JMSException { try { if (pollingConsumer == null) { pollingConsumer = endpoint.createPollingConsumer(); pollingConsumer.start(); } return pollingConsumer; } catch (JMSException e) { throw e; } catch (Exception e) { throw JMSExceptionSupport.create(e); } } protected Message createMessage(Exchange exchange) throws JMSException { if (exchange != null) { Message message = destination.getBinding().makeJmsMessage(exchange, session); return message; } else { return null; } } protected Consumer createConsumer() throws JMSException { try { Consumer answer = endpoint.createConsumer(new Processor() { public void process(Exchange exchange) throws Exception { Message message = createMessage(exchange); getMessageListener().onMessage(message); } }); answer.start(); return answer; } catch (JMSException e) { throw e; } catch (Exception e) { throw JMSExceptionSupport.create(e); } } protected void checkClosed() throws javax.jms.IllegalStateException { if (closed) { throw new IllegalStateException("The producer is closed"); } } } activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java000066400000000000000000000071631175753554600334260ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import javax.jms.Destination; import javax.jms.IllegalStateException; import javax.jms.JMSException; import javax.jms.Message; import org.apache.activemq.ActiveMQMessageProducerSupport; import org.apache.activemq.ActiveMQSession; import org.apache.activemq.util.JMSExceptionSupport; import org.apache.camel.Endpoint; import org.apache.camel.Exchange; import org.apache.camel.ExchangePattern; import org.apache.camel.Producer; import org.apache.camel.component.jms.JmsMessage; import org.apache.camel.util.ObjectHelper; /** * A JMS {@link javax.jms.MessageProducer} which sends message exchanges to a * Camel {@link Endpoint} * * */ public class CamelMessageProducer extends ActiveMQMessageProducerSupport { protected Producer producer; private final CamelDestination destination; private final Endpoint endpoint; private boolean closed; public CamelMessageProducer(CamelDestination destination, Endpoint endpoint, ActiveMQSession session) throws JMSException { super(session); this.destination = destination; this.endpoint = endpoint; try { this.producer = endpoint.createProducer(); } catch (JMSException e) { throw e; } catch (Exception e) { throw JMSExceptionSupport.create(e); } } public CamelDestination getDestination() throws JMSException { return destination; } public Endpoint getEndpoint() { return endpoint; } public void close() throws JMSException { if (!closed) { closed = true; try { producer.stop(); } catch (JMSException e) { throw e; } catch (Exception e) { throw JMSExceptionSupport.create(e); } } } public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { CamelDestination camelDestination = null; if (ObjectHelper.equal(destination, this.destination)) { camelDestination = this.destination; } else { // TODO support any CamelDestination? throw new IllegalArgumentException("Invalid destination setting: " + destination + " when expected: " + this.destination); } try { Exchange exchange = endpoint.createExchange(ExchangePattern.InOnly); exchange.setIn(new JmsMessage(message, camelDestination.getBinding())); producer.process(exchange); } catch (JMSException e) { throw e; } catch (Exception e) { throw JMSExceptionSupport.create(e); } } protected void checkClosed() throws IllegalStateException { if (closed) { throw new IllegalStateException("The producer is closed"); } } } activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/CamelQueue.java000066400000000000000000000032001175753554600314060ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import javax.jms.JMSException; import javax.jms.Queue; import javax.jms.QueueReceiver; import javax.jms.QueueSender; import org.apache.activemq.ActiveMQSession; /** * A JMS {@link Queue} object which refers to a Camel endpoint * * */ public class CamelQueue extends CamelDestination implements Queue { public CamelQueue(String uri) { super(uri); } public String getQueueName() throws JMSException { return getUri(); } public QueueSender createSender(ActiveMQSession session) throws JMSException { return new CamelQueueSender(this, resolveEndpoint(session), session); } public QueueReceiver createReceiver(ActiveMQSession session, String messageSelector) { return new CamelQueueReceiver(this, resolveEndpoint(session), session, messageSelector); } } activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/CamelQueueReceiver.java000066400000000000000000000034571175753554600331110ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import javax.jms.JMSException; import javax.jms.Queue; import javax.jms.QueueReceiver; import org.apache.activemq.ActiveMQSession; import org.apache.camel.Endpoint; /** * A JMS {@link javax.jms.QueueReceiver} which consumes message exchanges from a * Camel {@link org.apache.camel.Endpoint} * * */ public class CamelQueueReceiver extends CamelMessageConsumer implements QueueReceiver { public CamelQueueReceiver(CamelQueue destination, Endpoint endpoint, ActiveMQSession session, String name) { super(destination, endpoint, session, null, false); } /** * Gets the Queue associated with this queue receiver. * * @return this receiver's Queue * @throws JMSException if the JMS provider fails to get the queue for this queue * receiver due to some internal error. */ public Queue getQueue() throws JMSException { checkClosed(); return (Queue) super.getDestination(); } }activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/CamelQueueSender.java000066400000000000000000000072231175753554600325600ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.Queue; import javax.jms.QueueSender; import org.apache.activemq.ActiveMQSession; import org.apache.camel.Endpoint; /** * A JMS {@link javax.jms.QueueSender} which sends message exchanges to a Camel * {@link org.apache.camel.Endpoint} * * */ public class CamelQueueSender extends CamelMessageProducer implements QueueSender { public CamelQueueSender(CamelQueue destination, Endpoint endpoint, ActiveMQSession session) throws JMSException { super(destination, endpoint, session); } /** * Gets the queue associated with this QueueSender. * * @return this sender's queue * @throws JMSException if the JMS provider fails to get the queue for this * QueueSender due to some internal error. */ public Queue getQueue() throws JMSException { return (Queue)super.getDestination(); } /** * Sends a message to a queue for an unidentified message producer. Uses the * QueueSender's default delivery mode, priority, and time * to live.

Typically, a message producer is assigned a queue at * creation time; however, the JMS API also supports unidentified message * producers, which require that the queue be supplied every time a message * is sent. * * @param queue the queue to send this message to * @param message the message to send * @throws JMSException if the JMS provider fails to send the message due to * some internal error. * @see javax.jms.MessageProducer#getDeliveryMode() * @see javax.jms.MessageProducer#getTimeToLive() * @see javax.jms.MessageProducer#getPriority() */ public void send(Queue queue, Message message) throws JMSException { super.send(queue, message); } /** * Sends a message to a queue for an unidentified message producer, * specifying delivery mode, priority and time to live.

Typically, * a message producer is assigned a queue at creation time; however, the JMS * API also supports unidentified message producers, which require that the * queue be supplied every time a message is sent. * * @param queue the queue to send this message to * @param message the message to send * @param deliveryMode the delivery mode to use * @param priority the priority for this message * @param timeToLive the message's lifetime (in milliseconds) * @throws JMSException if the JMS provider fails to send the message due to * some internal error. */ public void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { super.send(queue, message, deliveryMode, priority, timeToLive); } } activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/CamelTopic.java000066400000000000000000000033231175753554600314060ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import javax.jms.JMSException; import javax.jms.Topic; import javax.jms.TopicPublisher; import javax.jms.TopicSubscriber; import org.apache.activemq.ActiveMQSession; /** * A JMS {@link javax.jms.Topic} object which refers to a Camel endpoint * * */ public class CamelTopic extends CamelDestination implements Topic { public CamelTopic(String uri) { super(uri); } public String getTopicName() throws JMSException { return getUri(); } public TopicPublisher createPublisher(ActiveMQSession session) throws JMSException { return new CamelTopicPublisher(this, resolveEndpoint(session), session); } public TopicSubscriber createDurableSubscriber(ActiveMQSession session, String name, String messageSelector, boolean noLocal) { return new CamelTopicSubscriber(this, resolveEndpoint(session), session, name, messageSelector, noLocal); } }activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/CamelTopicPublisher.java000066400000000000000000000151011175753554600332610ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.Topic; import javax.jms.TopicPublisher; import org.apache.activemq.ActiveMQSession; import org.apache.camel.Endpoint; /** * A JMS {@link javax.jms.TopicPublisher} which sends message exchanges to a * Camel {@link Endpoint} * * */ public class CamelTopicPublisher extends CamelMessageProducer implements TopicPublisher { public CamelTopicPublisher(CamelTopic destination, Endpoint endpoint, ActiveMQSession session) throws JMSException { super(destination, endpoint, session); } /** * Gets the topic associated with this TopicPublisher. * * @return this publisher's topic * @throws JMSException if the JMS provider fails to get the topic for this * TopicPublisher due to some internal error. */ public Topic getTopic() throws JMSException { return (Topic) super.getDestination(); } /** * Publishes a message to the topic. Uses the TopicPublisher's * default delivery mode, priority, and time to live. * * @param message the message to publish * @throws JMSException if the JMS provider fails to publish the message due to * some internal error. * @throws javax.jms.MessageFormatException if an invalid message is specified. * @throws javax.jms.InvalidDestinationException if a client uses this method with a TopicPublisher * with an invalid topic. * @throws java.lang.UnsupportedOperationException * if a client uses this method with a TopicPublisher * that did not specify a topic at creation time. * @see javax.jms.MessageProducer#getDeliveryMode() * @see javax.jms.MessageProducer#getTimeToLive() * @see javax.jms.MessageProducer#getPriority() */ public void publish(Message message) throws JMSException { super.send(message); } /** * Publishes a message to the topic, specifying delivery mode, priority, * and time to live. * * @param message the message to publish * @param deliveryMode the delivery mode to use * @param priority the priority for this message * @param timeToLive the message's lifetime (in milliseconds) * @throws JMSException if the JMS provider fails to publish the message due to * some internal error. * @throws javax.jms.MessageFormatException if an invalid message is specified. * @throws javax.jms.InvalidDestinationException if a client uses this method with a TopicPublisher * with an invalid topic. * @throws java.lang.UnsupportedOperationException * if a client uses this method with a TopicPublisher * that did not specify a topic at creation time. */ public void publish(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { super.send(message, deliveryMode, priority, timeToLive); } /** * Publishes a message to a topic for an unidentified message producer. * Uses the TopicPublisher's default delivery mode, * priority, and time to live. *

*

* Typically, a message producer is assigned a topic at creation time; * however, the JMS API also supports unidentified message producers, which * require that the topic be supplied every time a message is published. * * @param topic the topic to publish this message to * @param message the message to publish * @throws JMSException if the JMS provider fails to publish the message due to * some internal error. * @throws javax.jms.MessageFormatException if an invalid message is specified. * @throws javax.jms.InvalidDestinationException if a client uses this method with an invalid topic. * @see javax.jms.MessageProducer#getDeliveryMode() * @see javax.jms.MessageProducer#getTimeToLive() * @see javax.jms.MessageProducer#getPriority() */ public void publish(Topic topic, Message message) throws JMSException { super.send(topic, message); } /** * Publishes a message to a topic for an unidentified message producer, * specifying delivery mode, priority and time to live. *

*

* Typically, a message producer is assigned a topic at creation time; * however, the JMS API also supports unidentified message producers, which * require that the topic be supplied every time a message is published. * * @param topic the topic to publish this message to * @param message the message to publish * @param deliveryMode the delivery mode to use * @param priority the priority for this message * @param timeToLive the message's lifetime (in milliseconds) * @throws JMSException if the JMS provider fails to publish the message due to * some internal error. * @throws javax.jms.MessageFormatException if an invalid message is specified. * @throws javax.jms.InvalidDestinationException if a client uses this method with an invalid topic. */ public void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { super.send(topic, message, deliveryMode, priority, timeToLive); } } activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/CamelTopicSubscriber.java000066400000000000000000000046201175753554600334330ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import javax.jms.JMSException; import javax.jms.Topic; import javax.jms.TopicSubscriber; import org.apache.activemq.ActiveMQSession; import org.apache.camel.Endpoint; /** * A JMS {@link javax.jms.TopicSubscriber} which consumes message exchanges from a * Camel {@link Endpoint} * * */ public class CamelTopicSubscriber extends CamelMessageConsumer implements TopicSubscriber { public CamelTopicSubscriber(CamelTopic destination, Endpoint endpoint, ActiveMQSession session, String name, String messageSelector, boolean noLocal) { super(destination, endpoint, session, messageSelector, noLocal); } /** * Gets the Topic associated with this subscriber. * * @return this subscriber's Topic * @throws javax.jms.JMSException if the JMS provider fails to get the topic for this topic * subscriber due to some internal error. */ public Topic getTopic() throws JMSException { checkClosed(); return (Topic) super.getDestination(); } /** * Gets the NoLocal attribute for this subscriber. The * default value for this attribute is false. * * @return true if locally published messages are being inhibited * @throws JMSException if the JMS provider fails to get the NoLocal * attribute for this topic subscriber due to some * internal error. */ public boolean getNoLocal() throws JMSException { checkClosed(); return super.isNoLocal(); } } activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/component/000077500000000000000000000000001175753554600305245ustar00rootroot00000000000000ActiveMQComponent.java000066400000000000000000000161421175753554600346500ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/component/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import java.net.URISyntaxException; import java.util.Map; import java.util.concurrent.CopyOnWriteArrayList; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.Service; import org.apache.camel.CamelContext; import org.apache.camel.component.jms.JmsComponent; import org.apache.camel.component.jms.JmsConfiguration; import org.apache.camel.util.IntrospectionSupport; import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.URISupport; import org.springframework.jms.connection.SingleConnectionFactory; /** * The ActiveMQ Component * * */ public class ActiveMQComponent extends JmsComponent { private final CopyOnWriteArrayList singleConnectionFactoryList = new CopyOnWriteArrayList(); private final CopyOnWriteArrayList pooledConnectionFactoryServiceList = new CopyOnWriteArrayList(); private boolean exposeAllQueues; private CamelEndpointLoader endpointLoader; /** * Creates an ActiveMQ Component * * @return the created component */ public static ActiveMQComponent activeMQComponent() { return new ActiveMQComponent(); } /** * Creates an ActiveMQ Component * connecting to the given broker URL * * @param brokerURL the URL to connect to * @return the created component */ public static ActiveMQComponent activeMQComponent(String brokerURL) { ActiveMQComponent answer = new ActiveMQComponent(); if (answer.getConfiguration() instanceof ActiveMQConfiguration) { ((ActiveMQConfiguration) answer.getConfiguration()) .setBrokerURL(brokerURL); } // set the connection factory with the provided broker url answer.setConnectionFactory(new ActiveMQConnectionFactory(brokerURL)); return answer; } public ActiveMQComponent() { } public ActiveMQComponent(CamelContext context) { super(context); } public ActiveMQComponent(ActiveMQConfiguration configuration) { super(configuration); } public void setBrokerURL(String brokerURL) { if (getConfiguration() instanceof ActiveMQConfiguration) { ((ActiveMQConfiguration)getConfiguration()).setBrokerURL(brokerURL); } } public void setUserName(String userName) { if (getConfiguration() instanceof ActiveMQConfiguration) { ((ActiveMQConfiguration)getConfiguration()).setUserName(userName); } } public void setPassword(String password) { if (getConfiguration() instanceof ActiveMQConfiguration) { ((ActiveMQConfiguration)getConfiguration()).setPassword(password); } } public boolean isExposeAllQueues() { return exposeAllQueues; } /** * If enabled this will cause all Queues in the ActiveMQ broker to be eagerly populated into the CamelContext * so that they can be easily browsed by any Camel tooling. This option is disabled by default. * * @param exposeAllQueues */ public void setExposeAllQueues(boolean exposeAllQueues) { this.exposeAllQueues = exposeAllQueues; } public void setUsePooledConnection(boolean usePooledConnection) { if (getConfiguration() instanceof ActiveMQConfiguration) { ((ActiveMQConfiguration)getConfiguration()).setUsePooledConnection(usePooledConnection); } } public void setUseSingleConnection(boolean useSingleConnection) { if (getConfiguration() instanceof ActiveMQConfiguration) { ((ActiveMQConfiguration)getConfiguration()).setUseSingleConnection(useSingleConnection); } } protected void addPooledConnectionFactoryService(Service pooledConnectionFactoryService) { pooledConnectionFactoryServiceList.add(pooledConnectionFactoryService); } protected void addSingleConnectionFactory(SingleConnectionFactory singleConnectionFactory) { singleConnectionFactoryList.add(singleConnectionFactory); } @Override @SuppressWarnings("unchecked") protected String convertPathToActualDestination(String path, Map parameters) { // support ActiveMQ destination options using the destination. prefix // http://activemq.apache.org/destination-options.html Map options = IntrospectionSupport.extractProperties(parameters, "destination."); String query; try { query = URISupport.createQueryString(options); } catch (URISyntaxException e) { throw ObjectHelper.wrapRuntimeCamelException(e); } // if we have destination options then append them to the destination name if (ObjectHelper.isNotEmpty(query)) { return path + "?" + query; } else { return path; } } @Override protected void doStart() throws Exception { super.doStart(); if (isExposeAllQueues()) { endpointLoader = new CamelEndpointLoader(getCamelContext()); endpointLoader.afterPropertiesSet(); } } @Override protected void doStop() throws Exception { if (endpointLoader != null) { endpointLoader.destroy(); endpointLoader = null; } for (Service s : pooledConnectionFactoryServiceList) { s.stop(); } pooledConnectionFactoryServiceList.clear(); for (SingleConnectionFactory s : singleConnectionFactoryList) { s.destroy(); } singleConnectionFactoryList.clear(); super.doStop(); } @Override public void setConfiguration(JmsConfiguration configuration) { if (configuration instanceof ActiveMQConfiguration) { ((ActiveMQConfiguration) configuration).setActiveMQComponent(this); } super.setConfiguration(configuration); } @Override protected JmsConfiguration createConfiguration() { ActiveMQConfiguration answer = new ActiveMQConfiguration(); answer.setActiveMQComponent(this); return answer; } } ActiveMQConfiguration.java000066400000000000000000000164741175753554600355250ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/component/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import java.lang.reflect.Constructor; import javax.jms.ConnectionFactory; import org.apache.activemq.Service; import org.apache.activemq.spring.ActiveMQConnectionFactory; import org.apache.camel.component.jms.JmsConfiguration; import org.springframework.jms.connection.SingleConnectionFactory; import org.springframework.jms.connection.JmsTransactionManager; import org.springframework.jms.core.JmsTemplate; import org.springframework.transaction.PlatformTransactionManager; /** * */ public class ActiveMQConfiguration extends JmsConfiguration { private String brokerURL = ActiveMQConnectionFactory.DEFAULT_BROKER_URL; private boolean useSingleConnection = false; private boolean usePooledConnection = true; private String userName; private String password; private ActiveMQComponent activeMQComponent; public ActiveMQConfiguration() { } public String getBrokerURL() { return brokerURL; } /** * Sets the broker URL to use to connect to ActiveMQ using the * ActiveMQ URI format * * @param brokerURL the URL of the broker. */ public void setBrokerURL(String brokerURL) { this.brokerURL = brokerURL; } public boolean isUseSingleConnection() { return useSingleConnection; } public String getUserName() { return userName; } /** * Sets the username to be used to login to ActiveMQ * @param userName */ public void setUserName(String userName) { this.userName = userName; } public String getPassword() { return password; } /** * Sets the password/passcode used to login to ActiveMQ * * @param password */ public void setPassword(String password) { this.password = password; } /** * Enables or disables whether a Spring {@link SingleConnectionFactory} will be used so that when * messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather * than the default with the Spring {@link JmsTemplate} which will create a new connection, session, producer * for each message then close them all down again. *

* The default value is true so that a single connection is used by default. * * @param useSingleConnection */ public void setUseSingleConnection(boolean useSingleConnection) { this.useSingleConnection = useSingleConnection; } public boolean isUsePooledConnection() { return usePooledConnection; } /** * Enables or disables whether a PooledConnectionFactory will be used so that when * messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather * than the default with the Spring {@link JmsTemplate} which will create a new connection, session, producer * for each message then close them all down again. *

* The default value is false by default as it requires an extra dependency on commons-pool. */ public void setUsePooledConnection(boolean usePooledConnection) { this.usePooledConnection = usePooledConnection; } @Override public PlatformTransactionManager getTransactionManager() { PlatformTransactionManager answer = super.getTransactionManager(); if (isTransacted() && answer == null) { // lets auto-default the transaction manager if its not specified answer = createTransactionManager(); setTransactionManager(answer); answer = getTransactionManager(); } return answer; } /** * Factory method to create a default transaction manager if one is not specified */ protected PlatformTransactionManager createTransactionManager() { JmsTransactionManager answer = new JmsTransactionManager(getConnectionFactory()); answer.afterPropertiesSet(); return answer; } protected void setActiveMQComponent(ActiveMQComponent activeMQComponent) { this.activeMQComponent = activeMQComponent; } @Override protected ConnectionFactory createConnectionFactory() { ActiveMQConnectionFactory answer = new ActiveMQConnectionFactory(); if (userName != null) { answer.setUserName(userName); } if (password != null) { answer.setPassword(password); } if (answer.getBeanName() == null) { answer.setBeanName("Camel"); } answer.setBrokerURL(getBrokerURL()); if (isUseSingleConnection()) { SingleConnectionFactory scf = new SingleConnectionFactory(answer); if (activeMQComponent != null) { activeMQComponent.addSingleConnectionFactory(scf); } return scf; } else if (isUsePooledConnection()) { ConnectionFactory pcf = createPooledConnectionFactory(answer); if (activeMQComponent != null) { activeMQComponent.addPooledConnectionFactoryService((Service) pcf); } return pcf; } else { return answer; } } protected ConnectionFactory createPooledConnectionFactory(ActiveMQConnectionFactory connectionFactory) { // lets not use classes directly to avoid a runtime dependency on commons-pool // for folks not using this option try { Class type = loadClass("org.apache.activemq.pool.PooledConnectionFactory", getClass().getClassLoader()); Constructor constructor = type.getConstructor(org.apache.activemq.ActiveMQConnectionFactory.class); return (ConnectionFactory) constructor.newInstance(connectionFactory); } catch (Exception e) { throw new RuntimeException("Failed to instantiate PooledConnectionFactory: " + e, e); } } public static Class loadClass(String name, ClassLoader loader) throws ClassNotFoundException { ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); if (contextClassLoader != null) { try { return contextClassLoader.loadClass(name); } catch (ClassNotFoundException e) { try { return loader.loadClass(name); } catch (ClassNotFoundException e1) { throw e1; } } } else { return loader.loadClass(name); } } } CamelEndpointLoader.java000066400000000000000000000167261175753554600351750ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/component/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import java.util.Set; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.jms.Connection; import javax.jms.ConnectionFactory; import org.apache.activemq.EnhancedConnection; import org.apache.activemq.advisory.DestinationEvent; import org.apache.activemq.advisory.DestinationListener; import org.apache.activemq.advisory.DestinationSource; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.apache.camel.CamelContext; import org.apache.camel.CamelContextAware; import org.apache.camel.Endpoint; import org.apache.camel.component.jms.JmsEndpoint; import org.apache.camel.component.jms.JmsQueueEndpoint; import org.apache.camel.util.ObjectHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * A helper bean which populates a {@link CamelContext} with ActiveMQ Queue endpoints * * * @org.apache.xbean.XBean */ public class CamelEndpointLoader implements CamelContextAware { private static final transient Logger LOG = LoggerFactory.getLogger(CamelEndpointLoader.class); private CamelContext camelContext; private EnhancedConnection connection; private ConnectionFactory connectionFactory; private ActiveMQComponent component; public CamelEndpointLoader() { } public CamelEndpointLoader(CamelContext camelContext) { this.camelContext = camelContext; } /** * * @throws Exception * @org.apache.xbean.InitMethod */ @PostConstruct public void afterPropertiesSet() throws Exception { ObjectHelper.notNull(camelContext, "camelContext"); if (connection == null) { Connection value = getConnectionFactory().createConnection(); if (value instanceof EnhancedConnection) { connection = (EnhancedConnection) value; } else { throw new IllegalArgumentException("Created JMS Connection is not an EnhancedConnection: " + value); } } connection.start(); DestinationSource source = connection.getDestinationSource(); source.setDestinationListener(new DestinationListener() { public void onDestinationEvent(DestinationEvent event) { try { ActiveMQDestination destination = event.getDestination(); if (destination instanceof ActiveMQQueue) { ActiveMQQueue queue = (ActiveMQQueue) destination; if (event.isAddOperation()) { addQueue(queue); } else { removeQueue(queue); } } else if (destination instanceof ActiveMQTopic) { ActiveMQTopic topic = (ActiveMQTopic) destination; if (event.isAddOperation()) { addTopic(topic); } else { removeTopic(topic); } } } catch (Exception e) { LOG.warn("Caught: " + e, e); } } }); Set queues = source.getQueues(); for (ActiveMQQueue queue : queues) { addQueue(queue); } Set topics = source.getTopics(); for (ActiveMQTopic topic : topics) { addTopic(topic); } } /** * * @throws Exception * @org.apache.xbean.DestroyMethod */ @PreDestroy public void destroy() throws Exception { if (connection != null) { connection.close(); connection = null; } } // Properties //------------------------------------------------------------------------- public CamelContext getCamelContext() { return camelContext; } public void setCamelContext(CamelContext camelContext) { this.camelContext = camelContext; } public EnhancedConnection getConnection() { return connection; } public ConnectionFactory getConnectionFactory() { if (connectionFactory == null && getComponent().getConfiguration() instanceof ActiveMQConfiguration) { connectionFactory = ((ActiveMQConfiguration) getComponent() .getConfiguration()).createConnectionFactory(); } return connectionFactory; } public void setConnectionFactory(ConnectionFactory connectionFactory) { this.connectionFactory = connectionFactory; } public ActiveMQComponent getComponent() { if (component == null) { component = camelContext.getComponent("activemq", ActiveMQComponent.class); } return component; } public void setComponent(ActiveMQComponent component) { this.component = component; } // Implementation methods //------------------------------------------------------------------------- protected void addQueue(ActiveMQQueue queue) throws Exception { String queueUri = getQueueUri(queue); ActiveMQComponent jmsComponent = getComponent(); Endpoint endpoint = new JmsQueueEndpoint(queueUri, jmsComponent, queue.getPhysicalName(), jmsComponent.getConfiguration()); camelContext.addEndpoint(queueUri, endpoint); } protected String getQueueUri(ActiveMQQueue queue) { return "activemq:" + queue.getPhysicalName(); } protected void removeQueue(ActiveMQQueue queue) throws Exception { String queueUri = getQueueUri(queue); // lur cache of endpoints so they will disappear in time // this feature needs a new component api - list available endpoints camelContext.removeEndpoints(queueUri); } protected void addTopic(ActiveMQTopic topic) throws Exception { String topicUri = getTopicUri(topic); ActiveMQComponent jmsComponent = getComponent(); Endpoint endpoint = new JmsEndpoint(topicUri, jmsComponent, topic.getPhysicalName(), true, jmsComponent.getConfiguration()); camelContext.addEndpoint(topicUri, endpoint); } protected String getTopicUri(ActiveMQTopic topic) { return "activemq:topic:" + topic.getPhysicalName(); } protected void removeTopic(ActiveMQTopic topic) throws Exception { String topicUri = getTopicUri(topic); // lur cache of endpoints so they will disappear in time // this feature needs a new component api - list available endpoints camelContext.removeEndpoints(topicUri); } } JournalComponent.java000066400000000000000000000026741175753554600346160ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/component/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import org.apache.camel.Endpoint; import org.apache.camel.Exchange; import org.apache.camel.impl.DefaultComponent; import java.io.File; import java.util.Map; /** * The ActiveMQ Journal Component * * */ public class JournalComponent extends DefaultComponent { @Override protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws Exception { JournalEndpoint endpoint = new JournalEndpoint(uri, this, new File(remaining)); setProperties(endpoint, parameters); return endpoint; } } JournalEndpoint.java000066400000000000000000000202451175753554600344260ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/component/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import java.io.File; import java.io.IOException; import java.io.InterruptedIOException; import java.util.concurrent.atomic.AtomicReference; import org.apache.activemq.kaha.impl.async.AsyncDataManager; import org.apache.activemq.kaha.impl.async.Location; import org.apache.activemq.util.ByteSequence; import org.apache.camel.CamelExchangeException; import org.apache.camel.Consumer; import org.apache.camel.Exchange; import org.apache.camel.NoTypeConversionAvailableException; import org.apache.camel.Processor; import org.apache.camel.Producer; import org.apache.camel.RuntimeCamelException; import org.apache.camel.ExchangePattern; import org.apache.camel.impl.DefaultConsumer; import org.apache.camel.impl.DefaultEndpoint; import org.apache.camel.impl.DefaultExchange; import org.apache.camel.impl.DefaultProducer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class JournalEndpoint extends DefaultEndpoint { private static final transient Logger LOG = LoggerFactory.getLogger(JournalEndpoint.class); private final File directory; private final AtomicReference consumer = new AtomicReference(); private final Object activationMutex = new Object(); private int referenceCount; private AsyncDataManager dataManager; private Thread thread; private Location lastReadLocation; private long idleDelay = 1000; private boolean syncProduce = true; private boolean syncConsume; public JournalEndpoint(String uri, JournalComponent journalComponent, File directory) { super(uri, journalComponent.getCamelContext()); this.directory = directory; } public JournalEndpoint(String endpointUri, File directory) { super(endpointUri); this.directory = directory; } public boolean isSingleton() { return true; } public File getDirectory() { return directory; } public Consumer createConsumer(Processor processor) throws Exception { return new DefaultConsumer(this, processor) { @Override public void start() throws Exception { super.start(); activateConsumer(this); } @Override public void stop() throws Exception { deactivateConsumer(this); super.stop(); } }; } protected void decrementReference() throws IOException { synchronized (activationMutex) { referenceCount--; if (referenceCount == 0) { LOG.debug("Closing data manager: " + directory); LOG.debug("Last mark at: " + lastReadLocation); dataManager.close(); dataManager = null; } } } protected void incrementReference() throws IOException { synchronized (activationMutex) { referenceCount++; if (referenceCount == 1) { LOG.debug("Opening data manager: " + directory); dataManager = new AsyncDataManager(); dataManager.setDirectory(directory); dataManager.start(); lastReadLocation = dataManager.getMark(); LOG.debug("Last mark at: " + lastReadLocation); } } } protected void deactivateConsumer(DefaultConsumer consumer) throws IOException { synchronized (activationMutex) { if (this.consumer.get() != consumer) { throw new RuntimeCamelException("Consumer was not active."); } this.consumer.set(null); try { thread.join(); } catch (InterruptedException e) { throw new InterruptedIOException(); } decrementReference(); } } protected void activateConsumer(DefaultConsumer consumer) throws IOException { synchronized (activationMutex) { if (this.consumer.get() != null) { throw new RuntimeCamelException("Consumer already active: journal endpoints only support 1 active consumer"); } incrementReference(); this.consumer.set(consumer); thread = new Thread() { @Override public void run() { dispatchToConsumer(); } }; thread.setName("Dipatch thread: " + getEndpointUri()); thread.setDaemon(true); thread.start(); } } protected void dispatchToConsumer() { try { DefaultConsumer consumer; while ((consumer = this.consumer.get()) != null) { // See if there is a new record to process Location location = dataManager.getNextLocation(lastReadLocation); if (location != null) { // Send it on. ByteSequence read = dataManager.read(location); Exchange exchange = createExchange(); exchange.getIn().setBody(read); exchange.getIn().setHeader("journal", getEndpointUri()); exchange.getIn().setHeader("location", location); consumer.getProcessor().process(exchange); // Setting the mark makes the data manager forget about // everything // before that record. if (LOG.isDebugEnabled()) { LOG.debug("Consumed record at: " + location); } dataManager.setMark(location, syncConsume); lastReadLocation = location; } else { // Avoid a tight CPU loop if there is no new record to read. LOG.debug("Sleeping due to no records being available."); Thread.sleep(idleDelay); } } } catch (Throwable e) { e.printStackTrace(); } } public Producer createProducer() throws Exception { return new DefaultProducer(this) { public void process(Exchange exchange) throws Exception { incrementReference(); try { ByteSequence body = exchange.getIn().getBody(ByteSequence.class); if (body == null) { byte[] bytes = exchange.getIn().getBody(byte[].class); if (bytes != null) { body = new ByteSequence(bytes); } } if (body == null) { throw new CamelExchangeException("In body message could not be converted to a ByteSequence or a byte array.", exchange); } dataManager.write(body, syncProduce); } finally { decrementReference(); } } }; } public boolean isSyncConsume() { return syncConsume; } public void setSyncConsume(boolean syncConsume) { this.syncConsume = syncConsume; } public boolean isSyncProduce() { return syncProduce; } public void setSyncProduce(boolean syncProduce) { this.syncProduce = syncProduce; } boolean isOpen() { synchronized (activationMutex) { return referenceCount > 0; } } } activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/component/package.html000066400000000000000000000022311175753554600330030ustar00rootroot00000000000000 Defines the ActiveMQ Component for Camel to provide great Enterprise Integration Patterns integration for ActiveMQ users. activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/converter/000077500000000000000000000000001175753554600305315ustar00rootroot00000000000000ActiveMQConverter.java000066400000000000000000000031121175753554600346530ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/converter/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.converter; import org.apache.activemq.command.ActiveMQDestination; import org.apache.camel.Converter; /** * */ @Converter public class ActiveMQConverter { /** * Converts a URL in ActiveMQ syntax to a destination such as to support * "queue://foo.bar" or 'topic://bar.whatnot". Things default to queues if no scheme. * * This allows ActiveMQ destinations to be passed around as Strings and converted back again. * * @param name is the name of the queue or the full URI using prefixes queue:// or topic:// * @return the ActiveMQ destination */ @Converter public static ActiveMQDestination toDestination(String name) { return ActiveMQDestination.createDestination(name, ActiveMQDestination.QUEUE_TYPE); } } ActiveMQMessageConverter.java000066400000000000000000000070021175753554600361620ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/converter/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.converter; import java.io.Serializable; import javax.jms.JMSException; import javax.jms.MessageListener; import javax.jms.Message; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ActiveMQObjectMessage; import org.apache.activemq.command.ActiveMQTextMessage; import org.apache.camel.Converter; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.component.jms.JmsBinding; import org.apache.camel.component.jms.JmsEndpoint; /** * */ @Converter public class ActiveMQMessageConverter { private JmsBinding binding = new JmsBinding(); /** * Converts the inbound message exchange to an ActiveMQ JMS message * * @return the ActiveMQ message */ @Converter public ActiveMQMessage toMessage(Exchange exchange) throws JMSException { ActiveMQMessage message = createActiveMQMessage(exchange); getBinding().appendJmsProperties(message, exchange); return message; } /** * Allows a JMS {@link MessageListener} to be converted to a Camel {@link Processor} * so that we can provide better * Bean Integration so that we can use any JMS MessageListener in * in Camel as a bean * @param listener the JMS message listener * @return a newly created Camel Processor which when invoked will invoke * {@link MessageListener#onMessage(Message)} */ @Converter public Processor toProcessor(final MessageListener listener) { return new Processor() { public void process(Exchange exchange) throws Exception { Message message = toMessage(exchange); listener.onMessage(message); } @Override public String toString() { return "Processor of MessageListener: " + listener; } }; } private static ActiveMQMessage createActiveMQMessage(Exchange exchange) throws JMSException { Object body = exchange.getIn().getBody(); if (body instanceof String) { ActiveMQTextMessage answer = new ActiveMQTextMessage(); answer.setText((String) body); return answer; } else if (body instanceof Serializable) { ActiveMQObjectMessage answer = new ActiveMQObjectMessage(); answer.setObject((Serializable) body); return answer; } else { return new ActiveMQMessage(); } } // Properties //------------------------------------------------------------------------- public JmsBinding getBinding() { return binding; } public void setBinding(JmsBinding binding) { this.binding = binding; } }IdentityMessageReuseConverter.java000066400000000000000000000046521175753554600373160ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/converter/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.converter; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.Session; import org.apache.activemq.command.ActiveMQMessage; import org.springframework.jms.support.converter.MessageConversionException; import org.springframework.jms.support.converter.MessageConverter; import org.springframework.util.ObjectUtils; /** * Identity conversion, return the original ActiveMQMessage as is, useful when camel does message * redelivery routing. ReadOnlyPropertes flag inverted to allow * additional properties to be appended or existing properties to be modified */ public class IdentityMessageReuseConverter implements MessageConverter { /* (non-Javadoc) * @see org.springframework.jms.support.converter.MessageConverter#fromMessage(javax.jms.Message) */ public Object fromMessage(Message message) throws JMSException, MessageConversionException { return message; } /* (non-Javadoc) * @see org.springframework.jms.support.converter.MessageConverter#toMessage(java.lang.Object, javax.jms.Session) */ public Message toMessage(Object object, Session session) throws JMSException, MessageConversionException { if (object instanceof ActiveMQMessage) { // allow setting additional properties ((ActiveMQMessage)object).setReadOnlyProperties(false); return (Message)object; } else { throw new MessageConversionException("Cannot reuse object of type [" + ObjectUtils.nullSafeClassName(object) + "] as ActiveMQMessage message. Message must already be an ActiveMQMessage."); } } } activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/converter/package.html000066400000000000000000000022161175753554600330130ustar00rootroot00000000000000 Defines the Type Converters for working with JMS and ActiveMQ with Camel Enterprise Integration Patterns activemq-5.6.0+dfsg/activemq-camel/src/main/java/org/apache/activemq/camel/package.html000066400000000000000000000023201175753554600310000ustar00rootroot00000000000000 Defines a JMS client which is capable of sending and receiving messages to Camel endpoints to provide Enterprise Integration Patterns integration in any JMS client application. activemq-5.6.0+dfsg/activemq-camel/src/main/resources/000077500000000000000000000000001175753554600227115ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/resources/META-INF/000077500000000000000000000000001175753554600240515ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/resources/META-INF/services/000077500000000000000000000000001175753554600256745ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/resources/META-INF/services/org/000077500000000000000000000000001175753554600264635ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/resources/META-INF/services/org/apache/000077500000000000000000000000001175753554600277045ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/resources/META-INF/services/org/apache/camel/000077500000000000000000000000001175753554600307655ustar00rootroot00000000000000TypeConverter000066400000000000000000000016001175753554600334370ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/resources/META-INF/services/org/apache/camel# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # org.apache.activemq.camel.converter.ActiveMQConverter org.apache.activemq.camel.converter.ActiveMQMessageConverteractivemq-5.6.0+dfsg/activemq-camel/src/main/resources/META-INF/services/org/apache/camel/component/000077500000000000000000000000001175753554600327675ustar00rootroot00000000000000activemq000066400000000000000000000015121175753554600344430ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/resources/META-INF/services/org/apache/camel/component# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # class=org.apache.activemq.camel.component.ActiveMQComponent activemq.journal000066400000000000000000000015111175753554600361130ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/main/resources/META-INF/services/org/apache/camel/component# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # class=org.apache.activemq.camel.component.JournalComponent activemq-5.6.0+dfsg/activemq-camel/src/test/000077500000000000000000000000001175753554600207325ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/data/000077500000000000000000000000001175753554600216435ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/data/message1.xml000066400000000000000000000017031175753554600240730ustar00rootroot00000000000000 James Strachan London activemq-5.6.0+dfsg/activemq-camel/src/test/java/000077500000000000000000000000001175753554600216535ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/000077500000000000000000000000001175753554600224425ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/000077500000000000000000000000001175753554600236635ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/000077500000000000000000000000001175753554600254745ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/000077500000000000000000000000001175753554600265555ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/AMQ2240Test.java000066400000000000000000000047551175753554600312210ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import static org.junit.Assert.*; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.camel.component.ActiveMQComponent; import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class AMQ2240Test { private static final Logger LOG = LoggerFactory.getLogger(AMQ2240Test.class); @Test public void testBadVMTransportOptionsJMSPrefix() throws Exception { try{ final String vmUri = "vm://localhost?" + "jms.redeliveryPolicy.maximumRedeliveries=0&" + "jms.redeliveryPolicy.initialRedeliveryDelay=500&" + "jms.useAsyncSend=false&jms.sendTimeout=ABC&" + "jms.maxXXXXReconnectAttempts=1&jms.timeout=3000"; LOG.info("creating context with bad URI: " + vmUri); ActiveMQComponent.activeMQComponent(vmUri); fail("Should have received an exception from the bad URI."); } catch(Exception e) { // Expected } } @Test public void testBadVMTransportOptionsBrokerPrefix() throws Exception { try{ final String vmUri = "vm://localhost?" + "broker.XXX=foo&broker.persistent=XXX&broker.useJmx=false"; LOG.info("creating context with bad URI: " + vmUri); ActiveMQComponent.activeMQComponent(vmUri).start(); fail("Should have received an exception from the bad URI."); } catch(Exception e) { // Expected } } } activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/AMQ2611Test.java000066400000000000000000000066601175753554600312200ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import java.util.Timer; import java.util.TimerTask; import junit.framework.TestCase; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.camel.component.ActiveMQComponent; import org.apache.camel.Body; import org.apache.camel.CamelContext; import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class AMQ2611Test extends TestCase { private static final String BROKER_URL = "tcp://localhost:61616"; private static final String QUEUE_NAME = "test.queue"; private static final Logger log = LoggerFactory.getLogger(AMQ2611Test.class); private BrokerService brokerService = null; private Timer statisticsTimer = null; private CamelContext camelContext = null; public AMQ2611Test() { } private void createBroker() throws Exception { brokerService = new BrokerService(); brokerService.addConnector(BROKER_URL); brokerService.start(); } public static class Consumer { public void consume(@Body String message) { log.info("consume message = " + message); } } private void createCamelContext() throws Exception { log.info("creating context and sending message"); camelContext = new DefaultCamelContext(); camelContext.addComponent("activemq", ActiveMQComponent .activeMQComponent(BROKER_URL)); final String queueEndpointName = "activemq:queue" + QUEUE_NAME; camelContext.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from(queueEndpointName).bean(Consumer.class, "consume"); } }); camelContext.start(); final ProducerTemplate producerTemplate = camelContext .createProducerTemplate(); producerTemplate.sendBody(queueEndpointName, "message"); } private void destroyCamelContext() throws Exception { log.info("destroying context"); camelContext.stop(); camelContext = null; } public void testConnections() { try { createBroker(); int i = 0; while (i++ < 5) { createCamelContext(); Thread.sleep(1000); destroyCamelContext(); Thread.sleep(1000); assertEquals(0, brokerService.getConnectorByName(BROKER_URL).getConnections().size()); } } catch (Exception e) { log.warn("run", e); } } } CamelDestinationExclusiveConsumerTest.java000066400000000000000000000031241175753554600370300ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import org.apache.camel.CamelContext; import org.apache.camel.EndpointInject; import org.apache.camel.component.mock.MockEndpoint; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests; /** * */ @ContextConfiguration public class CamelDestinationExclusiveConsumerTest extends AbstractJUnit38SpringContextTests { @Autowired protected CamelContext camelContext; @EndpointInject(uri = "mock:results") protected MockEndpoint expectedEndpoint; public void testMocksAreValid() throws Exception { expectedEndpoint.expectedMessageCount(1); MockEndpoint.assertIsSatisfied(camelContext); } } CamelEmbeddedBrokerTestSupport.java000066400000000000000000000113041175753554600353750ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import java.util.Hashtable; import javax.naming.Context; import org.apache.activemq.EmbeddedBrokerTestSupport; import org.apache.camel.CamelContext; import org.apache.camel.ProducerTemplate; import org.apache.camel.Endpoint; import org.apache.camel.Exchange; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.util.jndi.JndiContext; /** * A helper class for test cases which use an embedded broker and use Camel to do the routing * * */ public abstract class CamelEmbeddedBrokerTestSupport extends EmbeddedBrokerTestSupport { protected CamelContext camelContext; protected ProducerTemplate template; @Override protected void setUp() throws Exception { bindAddress = "tcp://localhost:61616"; super.setUp(); camelContext = createCamelContext(); addCamelRoutes(camelContext); assertValidContext(camelContext); camelContext.start(); template = camelContext.createProducerTemplate(); template.start(); } @Override protected void tearDown() throws Exception { super.tearDown(); if (template != null) { template.stop(); } if (camelContext != null) { camelContext.stop(); } } protected CamelContext createCamelContext() throws Exception { return new DefaultCamelContext(createJndiContext()); } protected Context createJndiContext() throws Exception { return new JndiContext(new Hashtable()); } protected void addCamelRoutes(CamelContext camelContext) throws Exception { } /** * Resolves a mandatory endpoint for the given URI or an exception is thrown * * @param uri the Camel URI to use to create or resolve an endpoint * @return the endpoint */ protected Endpoint resolveMandatoryEndpoint(String uri) { return resolveMandatoryEndpoint(camelContext, uri); } /** * Resolves a mandatory endpoint for the given URI and expected type or an exception is thrown * * @param uri the Camel URI to use to create or resolve an endpoint * @return the endpoint */ protected T resolveMandatoryEndpoint(String uri, Class endpointType) { return resolveMandatoryEndpoint(camelContext, uri, endpointType); } /** * Resolves an endpoint and asserts that it is found */ protected Endpoint resolveMandatoryEndpoint(CamelContext context, String uri) { Endpoint endpoint = context.getEndpoint(uri); assertNotNull("No endpoint found for URI: " + uri, endpoint); return endpoint; } /** * Resolves an endpoint and asserts that it is found */ protected T resolveMandatoryEndpoint(CamelContext context, String uri, Class endpointType) { T endpoint = context.getEndpoint(uri, endpointType); assertNotNull("No endpoint found for URI: " + uri, endpoint); return endpoint; } /** * Resolves the mandatory Mock endpoint using a URI of the form mock:someName * * @param uri the URI which typically starts with "mock:" and has some name * @return the mandatory mock endpoint or an exception is thrown if it could not be resolved */ protected MockEndpoint getMockEndpoint(String uri) { return resolveMandatoryEndpoint(uri, MockEndpoint.class); } /** * Asserts that all the expectations of the Mock endpoints are valid */ protected void assertMockEndpointsSatisifed() throws InterruptedException { MockEndpoint.assertIsSatisfied(camelContext); } protected void assertValidContext(CamelContext context) { assertNotNull("No context found!", context); } } activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/CamelJmsTest.java000066400000000000000000000101211175753554600317460ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.Destination; import javax.jms.Message; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.ObjectMessage; import javax.jms.Session; import javax.jms.TextMessage; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.ProducerTemplate; import org.apache.camel.test.junit4.CamelSpringTestSupport; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * */ public class CamelJmsTest extends CamelSpringTestSupport { private static final Logger LOG = LoggerFactory.getLogger(CamelJmsTest.class); protected String expectedBody = "world!"; @Test public void testSendingViaJmsIsReceivedByCamel() throws Exception { MockEndpoint result = resolveMandatoryEndpoint("mock:result", MockEndpoint.class); result.expectedBodiesReceived(expectedBody); result.message(0).header("foo").isEqualTo("bar"); // lets create a message Destination destination = getMandatoryBean(Destination.class, "sendTo"); ConnectionFactory factory = getMandatoryBean(ConnectionFactory.class, "connectionFactory"); Connection connection = factory.createConnection(); connection.start(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = session.createProducer(destination); // now lets send a message ObjectMessage message = session.createObjectMessage(expectedBody); message.setStringProperty("foo", "bar"); producer.send(message); result.assertIsSatisfied(); LOG.info("Received message: " + result.getReceivedExchanges()); } @Test public void testConsumingViaJMSReceivesMessageFromCamel() throws Exception { // lets create a message Destination destination = getMandatoryBean(Destination.class, "consumeFrom"); ConnectionFactory factory = getMandatoryBean(ConnectionFactory.class, "connectionFactory"); ProducerTemplate template = getMandatoryBean(ProducerTemplate.class, "camelTemplate"); assertNotNull("template is valid", template); Connection connection = factory.createConnection(); connection.start(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); LOG.info("Consuming from: " + destination); MessageConsumer consumer = session.createConsumer(destination); // now lets send a message template.sendBody("seda:consumer", expectedBody); Message message = consumer.receive(5000); assertNotNull("Should have received a message from destination: " + destination, message); TextMessage textMessage = assertIsInstanceOf(TextMessage.class, message); assertEquals("Message body", expectedBody, textMessage.getText()); LOG.info("Received message: " + message); } protected int getExpectedRouteCount() { return 0; } protected ClassPathXmlApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("org/apache/activemq/camel/spring.xml"); } } activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/CamelRedeliveryTest.java000066400000000000000000000077121175753554600333430ustar00rootroot00000000000000/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.RedeliveryPolicy; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ActiveMQQueue; import org.apache.camel.CamelContext; import org.apache.camel.Handler; import org.apache.camel.RecipientList; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests; /** * */ @ContextConfiguration public class CamelRedeliveryTest extends AbstractJUnit38SpringContextTests { private static final transient Logger LOG = LoggerFactory.getLogger(CamelRedeliveryTest.class); @Autowired protected CamelContext camelContext; public void testRedeliveryViaCamel() throws Exception { ActiveMQConnectionFactory factory = applicationContext.getBean("connectionFactory", ActiveMQConnectionFactory.class); ActiveMQConnection connection = (ActiveMQConnection) factory.createConnection(); // send message to dlq immediately RedeliveryPolicy policy = connection.getRedeliveryPolicy(); policy.setMaximumRedeliveries(0); connection.start(); Session session = connection.createSession(true, Session.SESSION_TRANSACTED); ActiveMQQueue destination = new ActiveMQQueue("camelRedeliveryQ"); MessageProducer producer = session.createProducer(destination); MessageConsumer consumer = session.createConsumer(destination); // Send the messages producer.send(session.createTextMessage("1st")); session.commit(); LOG.info("sent 1st message"); TextMessage m; m = (TextMessage)consumer.receive(1000); assertNotNull(m); assertEquals("1st", m.getText()); session.rollback(); LOG.info("received and rolledback 1st message: " + m); m = (TextMessage)consumer.receive(1); assertNull("no immediate redelivery", m); m = (TextMessage)consumer.receive(20000); LOG.info("received redelivery on second wait attempt, message: " + m); assertNotNull("got redelivery on second attempt", m); assertEquals("text matches original", "1st", m.getText()); // came from camel assertTrue("redelivery marker header set, so came from camel", m.getBooleanProperty("CamelRedeliveryMarker")); } public static class DestinationExtractor { @RecipientList @Handler public String routeTo(ActiveMQMessage body) throws Exception { ActiveMQDestination originalDestination = body.getOriginalDestination(); return "activemq:" + originalDestination.getPhysicalName() + "?explicitQosEnabled=true&messageConverter=#messageConverter"; } } } CamelVMTransportRoutingTest.java000066400000000000000000000122611175753554600347540ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import javax.jms.Connection; import javax.jms.Destination; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.TransportConnector; import org.apache.activemq.camel.component.ActiveMQComponent; import org.apache.activemq.util.ThreadTracker; import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.junit.Assert; // see: https://issues.apache.org/activemq/browse/AMQ-2966 public class CamelVMTransportRoutingTest extends TestCase { private static final Logger log = LoggerFactory.getLogger(CamelVMTransportRoutingTest.class); private BrokerService broker = null; private TransportConnector connector = null; private CamelContext camelContext = null; private Connection senderConnection; private Connection receiverConnection1; private Connection receiverConnection2; private final String MSG_STRING = "MESSAGE-TEXT"; private final String SENDER_TOPIC = "A"; private final String RECEIVER_TOPIC = "B"; public void testSendReceiveWithCamelRouteIntercepting() throws Exception { final int MSG_COUNT = 1000; Session sendSession = senderConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); Session receiverSession1 = receiverConnection1.createSession(false, Session.AUTO_ACKNOWLEDGE); Session receiverSession2 = receiverConnection2.createSession(false, Session.AUTO_ACKNOWLEDGE); Destination sendTo = sendSession.createTopic(SENDER_TOPIC); Destination receiveFrom = receiverSession1.createTopic(RECEIVER_TOPIC); TextMessage message = sendSession.createTextMessage(MSG_STRING); MessageConsumer receiver1 = receiverSession1.createConsumer(receiveFrom); MessageConsumer receiver2 = receiverSession2.createConsumer(receiveFrom); MessageProducer sender = sendSession.createProducer(sendTo); for( int i = 0; i < MSG_COUNT; ++i ) { sender.send(message); } for( int i = 0; i < MSG_COUNT; ++i ) { log.debug("Attempting Received for Message #" + i); TextMessage received1 = (TextMessage) receiver1.receive(5000); Assert.assertNotNull(received1); Assert.assertEquals(MSG_STRING, received1.getText()); } } protected BrokerService createBroker() throws Exception { BrokerService service = new BrokerService(); service.setPersistent(false); service.setUseJmx(false); connector = service.addConnector("tcp://localhost:0"); return service; } public void setUp() throws Exception { broker = createBroker(); broker.start(); broker.waitUntilStarted(); Thread.sleep(1000); createCamelContext(); ActiveMQConnectionFactory connFactory = new ActiveMQConnectionFactory(connector.getConnectUri()); senderConnection = connFactory.createConnection(); receiverConnection1 = connFactory.createConnection(); receiverConnection2 = connFactory.createConnection(); receiverConnection1.start(); receiverConnection2.start(); } public void tearDown() throws Exception { if( senderConnection != null ) { senderConnection.close(); } if( receiverConnection1 != null ) { receiverConnection1.close(); } if( receiverConnection2 != null ) { receiverConnection2.close(); } camelContext.stop(); broker.stop(); ThreadTracker.result(); } private void createCamelContext() throws Exception { final String fromEndpoint = "activemq:topic:" + SENDER_TOPIC; final String toEndpoint = "activemq:topic:" + RECEIVER_TOPIC; log.info("creating context and sending message"); camelContext = new DefaultCamelContext(); camelContext.addComponent("activemq", ActiveMQComponent.activeMQComponent("vm://localhost?create=false&waitForStart=10000")); camelContext.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from(fromEndpoint).to(toEndpoint); } }); camelContext.start(); } } activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/DlqTest.java000066400000000000000000000074021175753554600310030ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import javax.jms.Connection; import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.util.Wait; import org.apache.camel.test.junit4.CamelSpringTestSupport; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.support.AbstractXmlApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class DlqTest extends CamelSpringTestSupport { private static final Logger LOG = LoggerFactory.getLogger(DlqTest.class); BrokerService broker = null; int messageCount; @Test public void testSendToDlq() throws Exception { sendJMSMessageToKickOffRoute(); LOG.info("Wait for dlq message..."); assertTrue(Wait.waitFor(new Wait.Condition() { @Override public boolean isSatisified() throws Exception { return broker.getAdminView().getTotalEnqueueCount() == 2; } })); } private void sendJMSMessageToKickOffRoute() throws Exception { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://testDlq"); factory.setWatchTopicAdvisories(false); Connection connection = factory.createConnection(); connection.start(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = session.createProducer(new ActiveMQQueue("fidEtpOrders")); TextMessage message = session.createTextMessage("Some Text, messageCount:" + messageCount++); message.setJMSCorrelationID("pleaseCorrelate"); producer.send(message); connection.close(); } private BrokerService createBroker(boolean deleteAllMessages) throws Exception { BrokerService brokerService = new BrokerService(); brokerService.setDeleteAllMessagesOnStartup(deleteAllMessages); brokerService.setBrokerName("testDlq"); brokerService.setAdvisorySupport(false); brokerService.setDataDirectory("target/data"); return brokerService; } @Override protected AbstractXmlApplicationContext createApplicationContext() { deleteDirectory("target/data"); // make broker available to recovery processing on app context start try { broker = createBroker(true); broker.start(); } catch (Exception e) { throw new RuntimeException("Failed to start broker", e); } return new ClassPathXmlApplicationContext("org/apache/activemq/camel/dlq.xml"); } public static class CanError { public String enrich(String body) throws Exception { LOG.info("Got body: " + body); throw new RuntimeException("won't enrich today!"); } } }activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/JmsJdbcXATest.java000066400000000000000000000211331175753554600320250ustar00rootroot00000000000000/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import java.sql.ResultSet; import java.sql.SQLException; import java.util.concurrent.Executors; import javax.jms.Connection; import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerPlugin; import org.apache.activemq.broker.BrokerPluginSupport; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.ConnectionContext; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.TransactionId; import org.apache.activemq.util.Wait; import org.apache.camel.test.junit4.CamelSpringTestSupport; import org.apache.commons.dbcp.BasicDataSource; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.support.AbstractXmlApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * shows broker 'once only delivery' and recovery with XA */ public class JmsJdbcXATest extends CamelSpringTestSupport { private static final Logger LOG = LoggerFactory.getLogger(JmsJdbcXATest.class); BrokerService broker = null; int messageCount; public java.sql.Connection initDb() throws Exception { String createStatement = "CREATE TABLE SCP_INPUT_MESSAGES (" + "id int NOT NULL GENERATED ALWAYS AS IDENTITY, " + "messageId varchar(96) NOT NULL, " + "messageCorrelationId varchar(96) NOT NULL, " + "messageContent varchar(2048) NOT NULL, " + "PRIMARY KEY (id) )"; java.sql.Connection conn = getJDBCConnection(); try { conn.createStatement().execute(createStatement); } catch (SQLException alreadyExists) { log.info("ex on create tables", alreadyExists); } try { conn.createStatement().execute("DELETE FROM SCP_INPUT_MESSAGES"); } catch (SQLException ex) { log.info("ex on create delete all", ex); } return conn; } private java.sql.Connection getJDBCConnection() throws Exception { BasicDataSource dataSource = getMandatoryBean(BasicDataSource.class, "managedDataSourceWithRecovery"); return dataSource.getConnection(); } private int dumpDb(java.sql.Connection jdbcConn) throws Exception { int count = 0; ResultSet resultSet = jdbcConn.createStatement().executeQuery("SELECT * FROM SCP_INPUT_MESSAGES"); while (resultSet.next()) { count++; log.info("message - seq:" + resultSet.getInt(1) + ", id: " + resultSet.getString(2) + ", corr: " + resultSet.getString(3) + ", content: " + resultSet.getString(4)); } return count; } @Test public void testRecoveryCommit() throws Exception { java.sql.Connection jdbcConn = initDb(); sendJMSMessageToKickOffRoute(); LOG.info("waiting for route to kick in, it will kill the broker on first 2pc commit"); // will be stopped by the plugin on first 2pc commit broker.waitUntilStopped(); assertEquals("message in db, commit to db worked", 1, dumpDb(jdbcConn)); LOG.info("Broker stopped, restarting..."); broker = createBroker(false); broker.start(); broker.waitUntilStarted(); assertEquals("pending transactions", 1, broker.getBroker().getPreparedTransactions(null).length); // TM stays actively committing first message ack which won't get redelivered - xa once only delivery LOG.info("waiting for recovery to complete"); assertTrue("recovery complete in time", Wait.waitFor(new Wait.Condition() { @Override public boolean isSatisified() throws Exception { return broker.getBroker().getPreparedTransactions(null).length == 0; } })); // verify recovery complete assertEquals("recovery complete", 0, broker.getBroker().getPreparedTransactions(null).length); final java.sql.Connection freshConnection = getJDBCConnection(); assertTrue("did not get replay", Wait.waitFor(new Wait.Condition() { @Override public boolean isSatisified() throws Exception { return 1 == dumpDb(freshConnection); } })); assertEquals("still one message in db", 1, dumpDb(freshConnection)); // let once complete ok sendJMSMessageToKickOffRoute(); assertTrue("got second message", Wait.waitFor(new Wait.Condition() { @Override public boolean isSatisified() throws Exception { return 2 == dumpDb(freshConnection); } })); assertEquals("two messages in db", 2, dumpDb(freshConnection)); } private void sendJMSMessageToKickOffRoute() throws Exception { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://testXA"); factory.setWatchTopicAdvisories(false); Connection connection = factory.createConnection(); connection.start(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = session.createProducer(new ActiveMQQueue("scp_transacted")); TextMessage message = session.createTextMessage("Some Text, messageCount:" + messageCount++); message.setJMSCorrelationID("pleaseCorrelate"); producer.send(message); connection.close(); } private BrokerService createBroker(boolean deleteAllMessages) throws Exception { BrokerService brokerService = new BrokerService(); brokerService.setDeleteAllMessagesOnStartup(deleteAllMessages); brokerService.setBrokerName("testXA"); brokerService.setAdvisorySupport(false); brokerService.setUseJmx(false); brokerService.setDataDirectory("target/data"); brokerService.addConnector("tcp://0.0.0.0:61616"); return brokerService; } @Override protected AbstractXmlApplicationContext createApplicationContext() { deleteDirectory("target/data/howl"); // make broker available to recovery processing on app context start try { broker = createBroker(true); broker.setPlugins(new BrokerPlugin[]{ new BrokerPluginSupport() { @Override public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception { if (onePhase) { super.commitTransaction(context, xid, onePhase); } else { // die before doing the commit // so commit will hang as if reply is lost context.setDontSendReponse(true); Executors.newSingleThreadExecutor().execute(new Runnable() { public void run() { LOG.info("Stopping broker post commit..."); try { broker.stop(); } catch (Exception e) { e.printStackTrace(); } } }); } } } }); broker.start(); } catch (Exception e) { throw new RuntimeException("Failed to start broker", e); } return new ClassPathXmlApplicationContext("org/apache/activemq/camel/jmsXajdbc.xml"); } } activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/SetGroupIdProcessor.java000066400000000000000000000024061175753554600333470ustar00rootroot00000000000000/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.Message; /** * */ public class SetGroupIdProcessor implements Processor { public void process(Exchange exchange) throws Exception { // lets copy the IN to the OUT message Message out = exchange.getOut(); out.copyFrom(exchange.getIn()); // now lets set a header out.setHeader("JMSXGroupID", "ABC"); } } activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/SetHeaderTest.java000066400000000000000000000043741175753554600321340ustar00rootroot00000000000000/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import java.util.List; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.EndpointInject; import org.apache.camel.CamelContext; import org.apache.camel.Exchange; import org.apache.camel.util.ObjectHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests; import org.springframework.beans.factory.annotation.Autowired; /** * */ @ContextConfiguration public class SetHeaderTest extends AbstractJUnit38SpringContextTests { private static final transient Logger LOG = LoggerFactory.getLogger(SetHeaderTest.class); @Autowired protected CamelContext camelContext; @EndpointInject(uri = "mock:results") protected MockEndpoint expectedEndpoint; public void testMocksAreValid() throws Exception { // lets add more expectations expectedEndpoint.expectedMessageCount(1); expectedEndpoint.message(0).header("JMSXGroupID").isEqualTo("ABC"); MockEndpoint.assertIsSatisfied(camelContext); // lets dump the received messages List list = expectedEndpoint.getReceivedExchanges(); for (Exchange exchange : list) { Object body = exchange.getIn().getBody(); LOG.debug("Received: body: " + body + " of type: " + ObjectHelper.className(body) + " on: " + exchange); } } } TransactedConsumeTest.java000066400000000000000000000132521175753554600336260ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel; import java.util.concurrent.atomic.AtomicLong; import javax.jms.Connection; import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyMap; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTextMessage; import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter; import org.apache.activemq.util.Wait; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.component.jms.JmsMessage; import org.apache.camel.test.junit4.CamelSpringTestSupport; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.support.AbstractXmlApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class TransactedConsumeTest extends CamelSpringTestSupport { private static final Logger LOG = LoggerFactory.getLogger(TransactedConsumeTest.class); BrokerService broker = null; int messageCount = 100000; @Test public void testConsume() throws Exception { LOG.info("Wait for dequeue message..."); assertTrue(Wait.waitFor(new Wait.Condition() { @Override public boolean isSatisified() throws Exception { return broker.getAdminView().getTotalDequeueCount() >= messageCount; } }, 20 * 60 * 1000)); long duration = System.currentTimeMillis() - firstConsumed.get(); LOG.info("Done message consumption in " + duration + "millis"); } private void sendJMSMessageToKickOffRoute() throws Exception { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://test"); factory.setWatchTopicAdvisories(false); Connection connection = factory.createConnection(); connection.start(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = session.createProducer(new ActiveMQQueue("scp_transacted")); for (int i=0; i"; protected ActiveMQQueue replyQueue = new ActiveMQQueue("test.reply.queue"); protected String correlationID = "ABC-123"; protected String messageType = getClass().getName(); @Test public void testForwardingAMessageAcrossJMSKeepingCustomJMSHeaders() throws Exception { MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class); resultEndpoint.expectedBodiesReceived(expectedBody); AssertionClause firstMessageExpectations = resultEndpoint.message(0); firstMessageExpectations.header("cheese").isEqualTo(123); firstMessageExpectations.header("JMSReplyTo").isEqualTo(replyQueue); firstMessageExpectations.header("JMSCorrelationID").isEqualTo(correlationID); firstMessageExpectations.header("JMSType").isEqualTo(messageType); template.sendBodyAndHeader("activemq:test.a", expectedBody, "cheese", 123); resultEndpoint.assertIsSatisfied(); List list = resultEndpoint.getReceivedExchanges(); Exchange exchange = list.get(0); Object replyTo = exchange.getIn().getHeader("JMSReplyTo"); LOG.info("Reply to is: " + replyTo); Destination destination = assertIsInstanceOf(Destination.class, replyTo); assertEquals("ReplyTo", replyQueue.toString(), destination.toString()); } protected CamelContext createCamelContext() throws Exception { CamelContext camelContext = super.createCamelContext(); // START SNIPPET: example camelContext.addComponent("activemq", activeMQComponent("vm://localhost?broker.persistent=false")); // END SNIPPET: example return camelContext; } protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { from("activemq:test.a").process(new Processor() { public void process(Exchange exchange) throws Exception { // lets set the custom JMS headers using the JMS API JmsMessage jmsMessage = assertIsInstanceOf(JmsMessage.class, exchange.getIn()); jmsMessage.getJmsMessage().setJMSReplyTo(replyQueue); jmsMessage.getJmsMessage().setJMSCorrelationID(correlationID); jmsMessage.getJmsMessage().setJMSType(messageType); } }).to("activemq:test.b?preserveMessageQos=true"); from("activemq:test.b").to("mock:result"); } }; } } ActiveMQReplyToHeaderUsingConverterTest.java000066400000000000000000000110401175753554600411760ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/component/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.jms.Destination; import static org.apache.activemq.camel.component.ActiveMQComponent.activeMQComponent; import org.apache.activemq.camel.converter.ActiveMQConverter; import org.apache.camel.CamelContext; import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.AssertionClause; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * */ public class ActiveMQReplyToHeaderUsingConverterTest extends CamelTestSupport { private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQReplyToHeaderUsingConverterTest.class); protected Object expectedBody = ""; protected String replyQueueName = "queue://test.my.reply.queue"; protected String correlationID = "ABC-123"; protected String groupID = "GROUP-XYZ"; protected String messageType = getClass().getName(); protected boolean useReplyToHeader = false; @Test public void testSendingAMessageFromCamelSetsCustomJmsHeaders() throws Exception { MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class); resultEndpoint.expectedBodiesReceived(expectedBody); AssertionClause firstMessage = resultEndpoint.message(0); firstMessage.header("cheese").isEqualTo(123); firstMessage.header("JMSCorrelationID").isEqualTo(correlationID); if (useReplyToHeader) { firstMessage.header("JMSReplyTo").isEqualTo(ActiveMQConverter.toDestination(replyQueueName)); } firstMessage.header("JMSType").isEqualTo(messageType); firstMessage.header("JMSXGroupID").isEqualTo(groupID); Map headers = new HashMap(); headers.put("cheese", 123); if (useReplyToHeader) { headers.put("JMSReplyTo", replyQueueName); } headers.put("JMSCorrelationID", correlationID); headers.put("JMSType", messageType); headers.put("JMSXGroupID", groupID); template.sendBodyAndHeaders("activemq:test.a", expectedBody, headers); resultEndpoint.assertIsSatisfied(); List list = resultEndpoint.getReceivedExchanges(); Exchange exchange = list.get(0); Message in = exchange.getIn(); Object replyTo = in.getHeader("JMSReplyTo"); LOG.info("Reply to is: " + replyTo); if (useReplyToHeader) { Destination destination = assertIsInstanceOf(Destination.class, replyTo); assertEquals("ReplyTo", replyQueueName, destination.toString()); } assertMessageHeader(in, "cheese", 123); assertMessageHeader(in, "JMSCorrelationID", correlationID); assertMessageHeader(in, "JMSType", messageType); assertMessageHeader(in, "JMSXGroupID", groupID); } protected CamelContext createCamelContext() throws Exception { CamelContext camelContext = super.createCamelContext(); // START SNIPPET: example camelContext.addComponent("activemq", activeMQComponent("vm://localhost?broker.persistent=false")); // END SNIPPET: example return camelContext; } protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { from("activemq:test.a").to("activemq:test.b?preserveMessageQos=true"); from("activemq:test.b").to("mock:result"); } }; } } ActiveMQRouteTest.java000066400000000000000000000105771175753554600347050ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/component/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import java.util.concurrent.TimeUnit; import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.jms.JmsEndpoint; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Before; import org.junit.Test; import org.springframework.jms.connection.JmsTransactionManager; import static org.apache.activemq.camel.component.ActiveMQComponent.activeMQComponent; /** * */ public class ActiveMQRouteTest extends CamelTestSupport { protected MockEndpoint resultEndpoint; protected String startEndpointUri = "activemq:queue:test.a"; @Test public void testJmsRouteWithTextMessage() throws Exception { String expectedBody = "Hello there!"; resultEndpoint.expectedBodiesReceived(expectedBody); resultEndpoint.message(0).header("cheese").isEqualTo(123); sendExchange(expectedBody); resultEndpoint.assertIsSatisfied(); } protected void sendExchange(final Object expectedBody) { template.sendBodyAndHeader(startEndpointUri, expectedBody, "cheese", 123); } @Before public void setUp() throws Exception { super.setUp(); resultEndpoint = (MockEndpoint) context.getEndpoint("mock:result"); } protected CamelContext createCamelContext() throws Exception { CamelContext camelContext = super.createCamelContext(); // START SNIPPET: example camelContext.addComponent("activemq", activeMQComponent("vm://localhost?broker.persistent=false")); // END SNIPPET: example return camelContext; } @Test public void testInvalidDestinationOptionOnConsumer() throws Exception { getMockEndpoint("mock:result").expectedMessageCount(0); assertMockEndpointsSatisfied(1, TimeUnit.SECONDS); try { new RouteBuilder() { public void configure() throws Exception { from("activemq:queue:foo?destination.consumer.exclusive=true&destination.consumer.unknown=foo") .to("mock:result"); } }; } catch (Exception e) { fail("Should not have accepted bad destination options."); } } @Test public void testInvalidDestinationOptionOnProducer() throws Exception { try { new RouteBuilder() { public void configure() throws Exception { from("activemq:queue:foo") .to("activemq:queue:bar?destination.producer.exclusive=true"); } }; } catch (Exception e) { fail("Should not have accepted bad destination options."); } } protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { from(startEndpointUri).to("activemq:queue:test.b"); from("activemq:queue:test.b").to("mock:result"); JmsEndpoint endpoint1 = (JmsEndpoint) endpoint("activemq:topic:quote.IONA"); endpoint1.getConfiguration().setTransactionManager(new JmsTransactionManager()); endpoint1.getConfiguration().setTransacted(true); from(endpoint1).to("mock:transactedClient"); JmsEndpoint endpoint2 = (JmsEndpoint) endpoint("activemq:topic:quote.IONA"); endpoint2.getConfiguration().setTransacted(false); from(endpoint2).to("mock:nonTrasnactedClient"); } }; } }AdvisoryConsumerExample.java000066400000000000000000000057111175753554600361770ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/component/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.DataStructure; import org.apache.activemq.command.DestinationInfo; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.Message; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.jms.JmsMessage; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; /** * */ public class AdvisoryConsumerExample extends CamelTestSupport { @Test public void testWorks() throws Exception { // lets create a new queue template.sendBody("activemq:NewQueue." + System.currentTimeMillis(), "world!"); Thread.sleep(10000); } protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { // lets force the creation of a queue up front from("activemq:InitialQueue").to("log:Messages"); from("activemq:topic:ActiveMQ.Advisory.Queue?cacheLevelName=CACHE_CONSUMER").process(new Processor() { public void process(Exchange exchange) throws Exception { Message in = exchange.getIn(); if (in instanceof JmsMessage) { JmsMessage jmsMessage = (JmsMessage) in; javax.jms.Message value = jmsMessage.getJmsMessage(); if (value instanceof ActiveMQMessage) { ActiveMQMessage activeMQMessage = (ActiveMQMessage) value; DataStructure structure = activeMQMessage.getDataStructure(); if (structure instanceof DestinationInfo) { DestinationInfo destinationInfo = (DestinationInfo) structure; System.out.println("Received: " + destinationInfo); } } } } }); } }; } }AutoExposeQueuesInCamelTest.java000066400000000000000000000073031175753554600367230ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/component/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ActiveMQTopic; import org.apache.activemq.EmbeddedBrokerTestSupport; import org.apache.activemq.broker.BrokerService; import org.apache.camel.CamelContext; import org.apache.camel.Endpoint; import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.spi.BrowsableEndpoint; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Shows that we can see the queues inside ActiveMQ via Camel * by enabling the {@link ActiveMQComponent#setExposeAllQueues(boolean)} flag * * */ public class AutoExposeQueuesInCamelTest extends EmbeddedBrokerTestSupport { private static final transient Logger LOG = LoggerFactory.getLogger(AutoExposeQueuesInCamelTest.class); protected ActiveMQQueue sampleQueue = new ActiveMQQueue("foo.bar"); protected ActiveMQTopic sampleTopic = new ActiveMQTopic("cheese"); protected CamelContext camelContext = new DefaultCamelContext(); public void testWorks() throws Exception { Thread.sleep(2000); LOG.debug("Looking for endpoints..."); // Changed from using CamelContextHelper.getSingletonEndpoints here because JMS Endpoints in Camel // are always non-singleton List endpoints = getEndpoints(camelContext, BrowsableEndpoint.class); for (BrowsableEndpoint endpoint : endpoints) { LOG.debug("Endpoint: " + endpoint); } assertEquals("Should have found an endpoint: "+ endpoints, 1, endpoints.size()); } public List getEndpoints(CamelContext camelContext, Class type) { List answer = new ArrayList(); Collection endpoints = camelContext.getEndpoints(); for (Endpoint endpoint : endpoints) { if (type.isInstance(endpoint)) { T value = type.cast(endpoint); answer.add(value); } } return answer; } @Override protected void setUp() throws Exception { super.setUp(); // lets configure the ActiveMQ component for Camel ActiveMQComponent component = new ActiveMQComponent(); component.setBrokerURL(bindAddress); component.setExposeAllQueues(true); camelContext.addComponent("activemq", component); camelContext.start(); } @Override protected void tearDown() throws Exception { camelContext.stop(); super.tearDown(); } @Override protected BrokerService createBroker() throws Exception { BrokerService broker = super.createBroker(); broker.setDestinations(new ActiveMQDestination[]{ sampleQueue, sampleTopic }); return broker; } } InvokeRequestReplyUsingJmsReplyToHeaderTest.java000066400000000000000000000135671175753554600421470ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/component/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import static org.apache.activemq.camel.component.ActiveMQComponent.activeMQComponent; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.hasEntry; import static org.hamcrest.Matchers.hasKey; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.jms.Destination; import org.apache.camel.CamelContext; import org.apache.camel.Exchange; import org.apache.camel.Headers; import org.apache.camel.Message; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.AssertionClause; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * */ public class InvokeRequestReplyUsingJmsReplyToHeaderTest extends CamelTestSupport { private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQReplyToHeaderUsingConverterTest.class); protected String replyQueueName = "queue://test.reply"; protected Object correlationID = "ABC-123"; protected Object groupID = "GROUP-XYZ"; private MyServer myBean = new MyServer(); @Test public void testPerformRequestReplyOverJms() throws Exception { MockEndpoint resultEndpoint = getMockEndpoint("mock:result"); resultEndpoint.expectedBodiesReceived("Hello James"); AssertionClause firstMessage = resultEndpoint.message(0); firstMessage.header("JMSCorrelationID").isEqualTo(correlationID); /* TODO - allow JMS headers to be copied? firstMessage.header("cheese").isEqualTo(123); firstMessage.header("JMSXGroupID").isEqualTo(groupID); firstMessage.header("JMSReplyTo").isEqualTo(ActiveMQConverter.toDestination(replyQueueName)); */ Map headers = new HashMap(); headers.put("cheese", 123); headers.put("JMSReplyTo", replyQueueName); headers.put("JMSCorrelationID", correlationID); headers.put("JMSXGroupID", groupID); // Camel 2.0 ignores JMSReplyTo, so we're using replyTo MEP property template.request("activemq:test.server?replyTo=queue:test.reply", new Processor() { public void process(Exchange exchange) { exchange.getIn().setBody("James"); Map headers = new HashMap(); headers.put("cheese", 123); headers.put("JMSReplyTo", replyQueueName); headers.put("JMSCorrelationID", correlationID); headers.put("JMSXGroupID", groupID); exchange.getIn().setHeaders(headers); } }); resultEndpoint.assertIsSatisfied(); List list = resultEndpoint.getReceivedExchanges(); Exchange exchange = list.get(0); Message in = exchange.getIn(); Object replyTo = in.getHeader("JMSReplyTo"); LOG.info("Reply to is: " + replyTo); LOG.info("Received headers: " + in.getHeaders()); LOG.info("Received body: " + in.getBody()); assertMessageHeader(in, "JMSCorrelationID", correlationID); /* TODO Destination destination = assertIsInstanceOf(Destination.class, replyTo); assertEquals("ReplyTo", replyQueueName, destination.toString()); assertMessageHeader(in, "cheese", 123); assertMessageHeader(in, "JMSXGroupID", groupID); */ Map receivedHeaders = myBean.getHeaders(); assertThat(receivedHeaders, hasKey("JMSReplyTo")); assertThat(receivedHeaders, hasEntry("JMSXGroupID", groupID)); assertThat(receivedHeaders, hasEntry("JMSCorrelationID", correlationID)); replyTo = receivedHeaders.get("JMSReplyTo"); LOG.info("Reply to is: " + replyTo); Destination destination = assertIsInstanceOf(Destination.class, replyTo); assertEquals("ReplyTo", replyQueueName, destination.toString()); } protected CamelContext createCamelContext() throws Exception { CamelContext camelContext = super.createCamelContext(); // START SNIPPET: example camelContext.addComponent("activemq", activeMQComponent("vm://localhost?broker.persistent=false")); // END SNIPPET: example return camelContext; } protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { from("activemq:test.server").bean(myBean); from("activemq:test.reply").to("mock:result"); } }; } protected static class MyServer { private Map headers; public String process(@Headers Map headers, String body) { this.headers = headers; LOG.info("process() invoked with headers: " + headers); return "Hello " + body; } public Map getHeaders() { return headers; } } } JmsSimpleRequestReplyTest.java000066400000000000000000000063151175753554600365000ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/component/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import javax.jms.ConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.pool.PooledConnectionFactory; import org.apache.camel.CamelContext; import org.apache.camel.Exchange; import org.apache.camel.ExchangePattern; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge; /** * A simple request / reply test */ public class JmsSimpleRequestReplyTest extends CamelTestSupport { protected String componentName = "activemq"; @Test public void testRequestReply() throws Exception { MockEndpoint result = getMockEndpoint("mock:result"); result.expectedMessageCount(1); template.requestBody("activemq:queue:hello", "Hello World"); result.assertIsSatisfied(); } protected CamelContext createCamelContext() throws Exception { CamelContext camelContext = super.createCamelContext(); ConnectionFactory connectionFactory = createConnectionFactory(null); camelContext.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory)); return camelContext; } public static ConnectionFactory createConnectionFactory(String options) { String url = "vm://test-broker?broker.persistent=false&broker.useJmx=false"; if (options != null) { url = url + "&" + options; } ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url); // use a pooled connection factory PooledConnectionFactory pooled = new PooledConnectionFactory(connectionFactory); pooled.setMaxConnections(8); return pooled; } protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { from("activemq:queue:hello").process(new Processor() { public void process(Exchange exchange) throws Exception { exchange.getIn().setBody("Bye World"); assertNotNull(exchange.getIn().getHeader("JMSReplyTo")); } }).to("mock:result"); } }; } } JournalConfigureTest.java000066400000000000000000000040701175753554600354600ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/component/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import java.io.File; import org.apache.camel.Endpoint; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; /** * */ public class JournalConfigureTest extends CamelTestSupport { @Test public void testDefaltConfig() throws Exception { JournalEndpoint endpoint = resolveMandatoryEndpoint("activemq.journal:target/test"); assertEquals("directory", new File("target", "test"), endpoint.getDirectory()); assertEquals("syncConsume", false, endpoint.isSyncConsume()); assertEquals("syncProduce", true, endpoint.isSyncProduce()); } @Test public void testConfigViaOptions() throws Exception { JournalEndpoint endpoint = resolveMandatoryEndpoint("activemq.journal:target/test?syncConsume=true&syncProduce=false"); assertEquals("directory", new File("target", "test"), endpoint.getDirectory()); assertEquals("syncConsume", true, endpoint.isSyncConsume()); assertEquals("syncProduce", false, endpoint.isSyncProduce()); } @Override protected JournalEndpoint resolveMandatoryEndpoint(String uri) { Endpoint endpoint = super.resolveMandatoryEndpoint(uri); return assertIsInstanceOf(JournalEndpoint.class, endpoint); } } JournalRoutePerformance.java000066400000000000000000000073351175753554600361660ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/component/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; /** * Used to get an idea of what kind of performance can be expected from * the journal. * * */ public class JournalRoutePerformance extends CamelTestSupport { AtomicLong produceCounter = new AtomicLong(); AtomicLong consumeCounter = new AtomicLong(); AtomicBoolean running = new AtomicBoolean(true); @Test public void testPerformance() throws Exception { int payLoadSize = 1024; int concurrentProducers = 50; long delayBetweenSample = 1000; long perfTestDuration = 1000 * 60; // 1 min StringBuffer t = new StringBuffer(); for (int i = 0; i < payLoadSize; i++) { t.append('a' + (i % 26)); } final byte[] payload = t.toString().getBytes("UTF-8"); for (int i = 0; i < concurrentProducers; i++) { Thread thread = new Thread("Producer: " + i) { @Override public void run() { while (running.get()) { template.sendBody("direct:in", payload); produceCounter.incrementAndGet(); } } }; thread.start(); } long produceTotal = 0; long consumeTotal = 0; long start = System.currentTimeMillis(); long end = start + perfTestDuration; while (System.currentTimeMillis() < end) { Thread.sleep(delayBetweenSample); long totalTime = System.currentTimeMillis() - start; long p = produceCounter.getAndSet(0); long c = consumeCounter.getAndSet(0); produceTotal += p; consumeTotal += c; System.out.println("Interval Produced " + stat(p, delayBetweenSample) + " m/s, Consumed " + stat(c, delayBetweenSample) + " m/s"); System.out.println("Total Produced " + stat(produceTotal, totalTime) + " m/s, Consumed " + stat(consumeTotal, totalTime) + " m/s"); } running.set(false); } private String stat(long pd, long delayBetweenSample) { return "" + (1.0 * pd / delayBetweenSample) * 1000.0; } protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { from("direct:in").to("activemq.journal:target/perf-test"); from("activemq.journal:target/perf-test").process(new Processor() { public void process(Exchange exchange) throws Exception { consumeCounter.incrementAndGet(); } }); } }; } } JournalRouteTest.java000066400000000000000000000050771175753554600346450ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/component/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.component; import java.util.List; import org.apache.activemq.util.ByteSequence; import org.apache.camel.Exchange; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.AssertionClause; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; /** * */ public class JournalRouteTest extends CamelTestSupport { @Test public void testSimpleJournalRoute() throws Exception { byte[] payload = "Hello World".getBytes(); MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:out", MockEndpoint.class); resultEndpoint.expectedMessageCount(1); AssertionClause firstMessageExpectations = resultEndpoint.message(0); firstMessageExpectations.header("journal").isEqualTo("activemq.journal://target/test.a"); firstMessageExpectations.header("location").isNotNull(); firstMessageExpectations.body().isInstanceOf(ByteSequence.class); template.sendBody("direct:in", payload); resultEndpoint.assertIsSatisfied(); List list = resultEndpoint.getReceivedExchanges(); Exchange exchange = list.get(0); ByteSequence body = (ByteSequence)exchange.getIn().getBody(); body.compact(); // trims the byte array to the actual size. assertEquals("body", new String(payload), new String(body.data)); } protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { from("direct:in").to("activemq.journal:target/test.a"); from("activemq.journal:target/test.a").to("mock:out"); } }; } }activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/converter/000077500000000000000000000000001175753554600305645ustar00rootroot00000000000000InvokeJmsMessageListenerTest.java000066400000000000000000000041761175753554600371400ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/converter/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.converter; import javax.jms.MessageListener; import javax.jms.Message; import javax.jms.TextMessage; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; /** * */ public class InvokeJmsMessageListenerTest extends CamelTestSupport { protected MyMessageListener messageListener = new MyMessageListener(); private String expectedBody = "world!"; @Test public void testCamelInvokesMessageListener() throws Exception { template.sendBody("direct:start", expectedBody); Message message = messageListener.message; assertNotNull("Should have invoked the message listener!", message); TextMessage textMessage = assertIsInstanceOf(TextMessage.class, message); assertEquals("body", expectedBody, textMessage.getText()); } @Override protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { from("direct:start").bean(messageListener); } }; } protected static class MyMessageListener implements MessageListener { public Message message; public void onMessage(Message message) { this.message = message; } } } InvokeMessageListenerTest.java000066400000000000000000000052171175753554600364630ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/java/org/apache/activemq/camel/converter/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.camel.converter; import java.util.List; import javax.jms.Message; import javax.jms.TextMessage; import static org.apache.activemq.camel.component.ActiveMQComponent.activeMQComponent; import org.apache.activemq.spring.ConsumerBean; import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; /** * */ public class InvokeMessageListenerTest extends CamelTestSupport { protected MockEndpoint resultEndpoint; protected String startEndpointUri = "activemq:queue:test.a"; protected ConsumerBean listener = new ConsumerBean(); @Test public void testSendTextMessage() throws Exception { String expectedBody = "Hello there!"; template.sendBodyAndHeader(startEndpointUri, expectedBody, "cheese", 123); listener.assertMessagesArrived(1); List list = listener.flushMessages(); assertTrue("Should have received some messages!", !list.isEmpty()); Message message = list.get(0); log.debug("Received: " + message); TextMessage textMessage = assertIsInstanceOf(TextMessage.class, message); assertEquals("Text mesage body: " + textMessage, expectedBody, textMessage.getText()); } protected CamelContext createCamelContext() throws Exception { CamelContext camelContext = super.createCamelContext(); camelContext.addComponent("activemq", activeMQComponent("vm://localhost?broker.persistent=false")); return camelContext; } protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { from(startEndpointUri).bean(listener); } }; } }activemq-5.6.0+dfsg/activemq-camel/src/test/resources/000077500000000000000000000000001175753554600227445ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/resources/log4j.properties000077500000000000000000000031021175753554600261000ustar00rootroot00000000000000## --------------------------------------------------------------------------- ## Licensed to the Apache Software Foundation (ASF) under one or more ## contributor license agreements. See the NOTICE file distributed with ## this work for additional information regarding copyright ownership. ## The ASF licenses this file to You under the Apache License, Version 2.0 ## (the "License"); you may not use this file except in compliance with ## the License. You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. ## --------------------------------------------------------------------------- # # The logging properties used during tests.. # log4j.rootLogger=INFO, out, stdout #log4j.logger.org.apache.activemq=DEBUG # CONSOLE appender not used by default log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n # File appender log4j.appender.out=org.apache.log4j.FileAppender log4j.appender.out.layout=org.apache.log4j.PatternLayout log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n log4j.appender.out.file=target/activemq-test.log log4j.appender.out.append=true activemq-5.6.0+dfsg/activemq-camel/src/test/resources/org/000077500000000000000000000000001175753554600235335ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/resources/org/apache/000077500000000000000000000000001175753554600247545ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/resources/org/apache/activemq/000077500000000000000000000000001175753554600265655ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/resources/org/apache/activemq/camel/000077500000000000000000000000001175753554600276465ustar00rootroot00000000000000CamelDestinationExclusiveConsumerTest-context.xml000066400000000000000000000036231175753554600414660ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/resources/org/apache/activemq/camel CamelRedeliveryTest-context.xml000066400000000000000000000047351175753554600357200ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/resources/org/apache/activemq/camel true 1000 SetHeaderTest-context.xml000066400000000000000000000037541175753554600345100ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/resources/org/apache/activemq/camel activemq-5.6.0+dfsg/activemq-camel/src/test/resources/org/apache/activemq/camel/component/000077500000000000000000000000001175753554600316505ustar00rootroot00000000000000BrowseQueuesInUFace-context.xml000066400000000000000000000031441175753554600376230ustar00rootroot00000000000000activemq-5.6.0+dfsg/activemq-camel/src/test/resources/org/apache/activemq/camel/component